name: Compilation & tests on: push: branches: - master pull_request: branches: - master jobs: job_build_debug_nano_s: name: Build debug Nano S 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 run: | make DEBUG=1 ALLOW_DATA=1 CHAIN=ethereum_classic mv bin/app.elf ethereum_classic_nanos.elf - name: Upload altcoin binary uses: actions/upload-artifact@v2 with: name: ethereum_classic_nanos path: ./ethereum_classic_nanos.elf - name: Build Ethereum run: | make clean make DEBUG=1 ALLOW_DATA=1 mv bin/app.elf ethereum_nanos.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 scan-build: name: Clang Static Analyzer runs-on: ubuntu-latest container: image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest steps: - uses: actions/checkout@v2 - name: Build with Clang Static Analyzer run: | make clean scan-build --use-cc=clang -analyze-headers -enable-checker security -enable-checker unix -enable-checker valist -o scan-build --status-bugs make default - uses: actions/upload-artifact@v2 if: failure() with: name: scan-build path: scan-build jobs-e2e-tests: needs: [job_build_debug_nano_s, job_build_debug_nano_x] runs-on: ubuntu-latest steps: - name: Test run: | id echo $HOME echo $DISPLAY - name: Checkout uses: actions/checkout@v2 - run: sudo apt-get update -y && sudo apt-get install -y libusb-1.0.0 libudev-dev - name: Install node uses: actions/setup-node@v2 with: node-version: "14.4.0" - name: Install yarn run: | npm install -g yarn - name: Build/Install build js deps run: | cd tests && yarn install - name: Create tmp folder for artifacts run: | mkdir tests/elfs - name: Download app binaries uses: actions/download-artifact@v2 with: path: tests/elfs - name: Gather elfs run: | cd tests/elfs cp `find . -name "*.elf"` . - name: Run zemu tests run: | cd tests && yarn test