Merge pull request #77 from LedgerHQ/y333/fix_assert_macro #214
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [ master, develop ] | |
pull_request: | |
branches: [ master, develop ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build_application: | |
name: Build application using the reusable workflow | |
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@v1 | |
with: | |
upload_app_binaries_artifact: "compiled_app_binaries" | |
build_and_test: | |
name: Build and test app for all supported devices | |
strategy: | |
fail-fast: false | |
matrix: | |
device: ["nanos", "nanox", "nanosp", "stax", "flex"] | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools:latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Build application in developer + headless mode | |
id: "build" | |
shell: bash | |
run: | | |
eval "BOLOS_SDK=\$$(echo ${{ matrix.device }} | tr [:lower:] [:upper:])_SDK" && \ | |
echo "BOLOS_SDK value will be: ${BOLOS_SDK}" && \ | |
BOLOS_SDK=${BOLOS_SDK} DEVEL=1 DEFINES+=HEADLESS make | |
echo "Build complete" | |
- name: Install Node.js | |
run : apk add --update nodejs npm | |
- name : Install yarn | |
run: npm install --global yarn | |
- name: Install Cardano JS Library | |
run: git clone https://github.com/vacuumlabs/ledgerjs-cardano-shelley.git | |
- name : Run tests | |
run: | | |
BUILD_DEVICE_NAME="$(echo ${{ matrix.device }} | sed 's/nanosp/nanos2/')" | |
speculos --model ${{ matrix.device }} build/$BUILD_DEVICE_NAME/bin/app.elf --seed "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about" --display headless & | |
apk add g++ libusb-dev libusb eudev-dev eudev && | |
cd ledgerjs-cardano-shelley && | |
yarn install && | |
yarn test-speculos |