From de036b38e8eb4bf7771c1bffa097a3466341fdb1 Mon Sep 17 00:00:00 2001 From: Coline Date: Fri, 22 Jul 2022 10:18:11 +0200 Subject: [PATCH] fix: ci use matrix for build nano app fix: ; into && in ci --- .github/workflows/build-workflow.yml | 107 +++++---------------------- .github/workflows/ci-workflow.yml | 6 +- 2 files changed, 22 insertions(+), 91 deletions(-) diff --git a/.github/workflows/build-workflow.yml b/.github/workflows/build-workflow.yml index 0c5ddc6..0c9ef5f 100644 --- a/.github/workflows/build-workflow.yml +++ b/.github/workflows/build-workflow.yml @@ -11,10 +11,18 @@ on: - develop jobs: - job_build_debug_nano_s: - name: Build debug Nano S + nano_debug_build: + name: Build debug application for NanoS, X and S+ + strategy: + matrix: + include: + - SDK: "$NANOS_SDK" + artifact: nanos + - SDK: "$NANOX_SDK" + artifact: nanox + - SDK: "$NANOSP_SDK" + artifact: nanosp runs-on: ubuntu-latest - container: image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest @@ -26,100 +34,23 @@ jobs: - name: Build an altcoin run: | - make DEBUG=1 ALLOW_DATA=1 CHAIN=ethereum_classic - mv bin/app.elf ethereum_classic_nanos.elf + make BOLOS_SDK=${{ matrix.SDK }} DEBUG=1 ALLOW_DATA=1 CHAIN=ethereum_classic + mv bin/app.elf ethereum_classic_${{ matrix.artifact }}.elf - name: Upload altcoin binary uses: actions/upload-artifact@v2 with: - name: ethereum_classic_nanos - path: ./ethereum_classic_nanos.elf + name: ethereum_classic_${{ matrix.artifact }} + path: ./ethereum_classic_${{ matrix.artifact }}.elf - name: Build Ethereum run: | make clean - make DEBUG=1 ALLOW_DATA=1 - mv bin/app.elf ethereum_nanos.elf + make BOLOS_SDK=${{ matrix.SDK }} DEBUG=1 ALLOW_DATA=1 + mv bin/app.elf ethereum_${{ matrix.artifact }}.elf - name: Upload app binary uses: actions/upload-artifact@v2 with: - name: ethereum_nanos - path: ./ethereum_nanos.elf - - - - job_build_debug_nano_x: - name: Build debug Nano X - runs-on: ubuntu-latest - - container: - image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest - - steps: - - name: Clone - uses: actions/checkout@v2 - with: - submodules: recursive - - - name: Build an altcoin Nano X - run: | - make clean - make BOLOS_SDK=$NANOX_SDK DEBUG=1 ALLOW_DATA=1 CHAIN=ethereum_classic - mv bin/app.elf ethereum_classic_nanox.elf - - - name: Upload altcoin binary - uses: actions/upload-artifact@v2 - with: - name: ethereum_classic_nanox - path: ./ethereum_classic_nanox.elf - - - name: Build Ethereum Nano X - run: | - make clean - make BOLOS_SDK=$NANOX_SDK DEBUG=1 ALLOW_DATA=1 - mv bin/app.elf ethereum_nanox.elf - - - name: Upload app binary - uses: actions/upload-artifact@v2 - with: - name: ethereum_nanox - path: ./ethereum_nanox.elf - - - job_build_debug_nano_sp: - name: Build debug Nano SP - runs-on: ubuntu-latest - - container: - image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest - - steps: - - name: Clone - uses: actions/checkout@v2 - with: - submodules: recursive - - - name: Build an altcoin Nano SP - run: | - make clean - make BOLOS_SDK=$NANOSP_SDK DEBUG=1 ALLOW_DATA=1 CHAIN=ethereum_classic - mv bin/app.elf ethereum_classic_nanosp.elf - - - name: Upload altcoin binary - uses: actions/upload-artifact@v2 - with: - name: ethereum_classic_nanosp - path: ./ethereum_classic_nanosp.elf - - - name: Build Ethereum Nano SP - run: | - make clean - make BOLOS_SDK=$NANOSP_SDK DEBUG=1 ALLOW_DATA=1 - mv bin/app.elf ethereum_nanosp.elf - - - name: Upload app binary - uses: actions/upload-artifact@v2 - with: - name: ethereum_nanosp - path: ./ethereum_nanosp.elf \ No newline at end of file + name: ethereum_${{ matrix.artifact }} + path: ./ethereum_${{ matrix.artifact }}.elf \ No newline at end of file diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index 12ebca8..1da55b7 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -112,9 +112,9 @@ jobs: - name: Build testing binaries run: | mkdir tests/speculos/elfs - make clean; make DEBUG=1 NFT_TESTING_KEY=1 BOLOS_SDK=$NANOS_SDK; mv bin/app.elf .; mv app.elf nanos.elf; mv nanos.elf tests/speculos/elfs - make clean; make DEBUG=1 NFT_TESTING_KEY=1 BOLOS_SDK=$NANOX_SDK; mv bin/app.elf .; mv app.elf nanox.elf; mv nanox.elf tests/speculos/elfs - make clean; make DEBUG=1 NFT_TESTING_KEY=1 BOLOS_SDK=$NANOSP_SDK; mv bin/app.elf .; mv app.elf nanosp.elf; mv nanosp.elf tests/speculos/elfs + make clean && make DEBUG=1 NFT_TESTING_KEY=1 BOLOS_SDK=$NANOS_SDK && mv bin/app.elf . && mv app.elf nanos.elf && mv nanos.elf tests/speculos/elfs + make clean && make DEBUG=1 NFT_TESTING_KEY=1 BOLOS_SDK=$NANOX_SDK && mv bin/app.elf . && mv app.elf nanox.elf && mv nanox.elf tests/speculos/elfs + make clean && make DEBUG=1 NFT_TESTING_KEY=1 BOLOS_SDK=$NANOSP_SDK && mv bin/app.elf . && mv app.elf nanosp.elf && mv nanosp.elf tests/speculos/elfs - name: Upload app binaries uses: actions/upload-artifact@v2