Skip to content

Commit

Permalink
fix: reorganize ci
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelm41 committed Oct 29, 2024
1 parent 5594411 commit 2f17182
Showing 1 changed file with 72 additions and 35 deletions.
107 changes: 72 additions & 35 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,32 +58,6 @@ jobs:
cd ./app/rust
cargo test
build_ledger:
needs: configure
runs-on: ubuntu-latest
container:
image: zondax/ledger-app-builder:latest
options: --user ${{ needs.configure.outputs.uid_gid }}
env:
BOLOS_SDK: /opt/nanos-secure-sdk
outputs:
size: ${{steps.build.outputs.size}}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Build Standard app
id: build
shell: bash -l {0}
run: |
SUBSTRATE_PARSER_FULL=1 make
echo "size=$(python3 deps/ledger-zxlib/scripts/getSize.py s)" >> $GITHUB_OUTPUT
- name: Build SR25519 app
shell: bash -l {0}
run: |
SUBSTRATE_PARSER_FULL=1 SUPPORT_SR25519=1 make
test_zemu:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -116,8 +90,44 @@ jobs:
name: snapshots-tmp
path: tests_zemu/snapshots-tmp/

build_ledger_light:
needs: configure
runs-on: ubuntu-latest
container:
image: zondax/ledger-app-builder:latest
options: --user ${{ needs.configure.outputs.uid_gid }}
env:
BOLOS_SDK: /opt/nanos-secure-sdk
outputs:
size: ${{steps.build.outputs.size}}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Build Light app
id: build
shell: bash -l {0}
run: |
SUBSTRATE_PARSER_FULL=0 make
echo "size=$(python3 deps/ledger-zxlib/scripts/getSize.py s)" >> $GITHUB_OUTPUT
- name: Build SR25519 app
shell: bash -l {0}
run: |
SUBSTRATE_PARSER_FULL=0 SUPPORT_SR25519=1 make
size_nano_s:
needs: build_ledger_light
runs-on: ubuntu-latest
env:
NANOS_LIMIT_SIZE: 136
steps:
- run: |
echo "LNS app size: ${{needs.build_ledger_light.outputs.size}} KiB"
[ ${{needs.build_ledger_light.outputs.size}} -le $NANOS_LIMIT_SIZE ]
build_package_nanos:
needs: [configure, build, build_ledger, test_zemu]
needs: [configure, build, build_ledger_light, test_zemu]
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
container:
Expand Down Expand Up @@ -156,18 +166,45 @@ jobs:
# Comment out nanoS XL build, the device is not supported anymore due to the size limit.
# The github workflow for the latest supported version is running in nanos.yml

# size_nano_s:
# needs: build_ledger
# build_ledger_xl:
# needs: configure
# runs-on: ubuntu-latest
# container:
# image: zondax/ledger-app-builder:latest
# options: --user ${{ needs.configure.outputs.uid_gid }}
# env:
# BOLOS_SDK: /opt/nanos-secure-sdk
# outputs:
# size: ${{steps.build.outputs.size}}
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# submodules: true
# - name: Build XL app
# id: build
# shell: bash -l {0}
# run: |
# SUBSTRATE_PARSER_FULL=1 make
# echo "size=$(python3 deps/ledger-zxlib/scripts/getSize.py s)" >> $GITHUB_OUTPUT
# - name: Build SR25519 app
# shell: bash -l {0}
# run: |
# SUBSTRATE_PARSER_FULL=1 SUPPORT_SR25519=1 make
#
#
# size_nano_s_xl:
# needs: build_ledger_xl
# runs-on: ubuntu-latest
# env:
# NANOS_LIMIT_SIZE: 136
# steps:
# - run: |
# echo "LNS app size: ${{needs.build_ledger.outputs.size}} KiB"
# [ ${{needs.build_ledger.outputs.size}} -le $NANOS_LIMIT_SIZE ]
# echo "LNS app size: ${{needs.build_ledger_xl.outputs.size}} KiB"
# [ ${{needs.build_ledger_xl.outputs.size}} -le $NANOS_LIMIT_SIZE ]

# build_package_nanos_xl:
# needs: [configure, build, build_ledger, test_zemu]
# needs: [configure, build, build_ledger_xl, test_zemu, size_nano_s_xl]
# if: ${{ github.ref == 'refs/heads/main' }}
# runs-on: ubuntu-latest
# container:
Expand Down Expand Up @@ -203,7 +240,7 @@ jobs:
# prerelease: false

build_package_nanosp:
needs: [configure, build, build_ledger, test_zemu]
needs: [configure, build, build_ledger_light, test_zemu]
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
container:
Expand Down Expand Up @@ -239,7 +276,7 @@ jobs:
prerelease: false

build_package_stax:
needs: [configure, build, build_ledger, test_zemu]
needs: [configure, build, build_ledger_light, test_zemu]
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
container:
Expand Down Expand Up @@ -273,7 +310,7 @@ jobs:
prerelease: false

build_package_flex:
needs: [configure, build, build_ledger, test_zemu]
needs: [configure, build, build_ledger_light, test_zemu]
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
container:
Expand Down

0 comments on commit 2f17182

Please sign in to comment.