Skip to content

feat: signal bits and authority outputs #437

feat: signal bits and authority outputs

feat: signal bits and authority outputs #437

Workflow file for this run

---
name: Compilation & tests
on:
push:
branches: ["master", "dev", "main", "develop"]
pull_request:
branches: ["master", "dev", "main", "develop"]
jobs:
job_build_debug:
name: Build debug
strategy:
matrix:
device: [nanos, nanox, nanosp]
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
steps:
- name: Clone
uses: actions/checkout@v4
- name: Build
run: |
echo "Building for ${{ matrix.device }}..." && \
eval "BOLOS_SDK=\$$(echo ${{ matrix.device }} | tr [:lower:] [:upper:])_SDK" && \
echo "BOLOS_SDK value will be ${BOLOS_SDK}" && \
make BOLOS_SDK=${BOLOS_SDK} DEBUG=1
- name: Prepare upload
run: |
find build/ -mindepth 2 -maxdepth 2 -type d ! -name 'bin' -exec rm -r {} +
- name: Upload app binary
uses: actions/upload-artifact@v4
with:
name: hathor-app-debug-${{ matrix.device }}
path: build/
if-no-files-found: error
job_unit_test:
name: Unit test
needs: job_build_debug
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
steps:
- name: Clone
uses: actions/checkout@v4
- name: Build unit tests
run:
cd unit-tests/
bash run_tests.sh
job_test:
name: Test
needs: job_build_debug
strategy:
matrix:
device: [nanos, nanox, nanosp]
include:
- device: nanos
build_dir: nanos
- device: nanosp
build_dir: nanos2
- device: nanox
build_dir: nanox
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/speculos:latest
ports:
- 5000:5000
- 1234:1234
- 9999:9999
- 40000:40000
- 41000:41000
- 42000:42000
- 43000:43000
options: --entrypoint /bin/bash
steps:
- name: Clone
uses: actions/checkout@v4
- name: Download app binary
uses: actions/download-artifact@v4
with:
name: hathor-app-debug-${{ matrix.device }}
path: build
- name: Install Poetry
run: |
apt update && apt install -qy make gcc # /!\ workaround for pysha3
pip -q --no-input install poetry
- name: Run test
run: |
nohup bash -c "python /speculos/speculos.py build/${{ matrix.build_dir }}/bin/app.elf --model ${{ matrix.device }} --display headless" > speculos.log 2<&1 &
cd tests && make install && make test
- name: Show speculos log
if: success() || failure()
run: |
cat speculos.log
- name: Upload Speculos log
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.device }}-speculos-log.log
path: speculos.log