BC2A-1408: Fix duplicate symbols #73
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: Compilation & tests | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
pull_request: | |
branches: | |
- master | |
- develop | |
jobs: | |
job_build_debug: | |
name: Build debug | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest | |
steps: | |
- name: Clone | |
uses: actions/checkout@v3 | |
- name: Build | |
run: | | |
make | |
- name: Upload app binary | |
uses: actions/upload-artifact@v3 | |
with: | |
name: hive-app | |
path: bin | |
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-legacy:latest | |
steps: | |
- name: Install required packages | |
run: | | |
apt update && apt install -qy libcmocka-dev lcov doxygen | |
- name: Clone | |
uses: actions/checkout@v3 | |
- name: Build unit tests | |
run: | | |
cd unit-tests/ | |
cmake -Bbuild -H. && make -C build && CTEST_OUTPUT_ON_FAILURE=1 make -C build test | |
- name: Generate code coverage | |
run: | | |
cd unit-tests/ | |
./gen_coverage.sh | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: code-coverage | |
path: unit-tests/coverage | |
- name: Upload to codecov.io | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./unit-tests/coverage.info | |
flags: unittests | |
name: codecov-app-hive | |
fail_ci_if_error: true | |
verbose: true | |
- name: HTML documentation | |
run: doxygen .doxygen/Doxyfile | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: documentation | |
path: doc/html | |
job_test: | |
name: Test | |
needs: job_build_debug | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/ledgerhq/speculos:latest | |
ports: | |
- 1234:1234 | |
- 9999:9999 | |
- 40000:40000 | |
- 41000:41000 | |
- 42000:42000 | |
- 43000:43000 | |
options: --entrypoint /bin/bash | |
steps: | |
- name: Clone | |
uses: actions/checkout@v3 | |
- name: Install required packages | |
run: | | |
apt update && apt install -qy npm curl unzip wget gcc # /!\ workaround for pysha3 | |
- name: Prepare NodeJS environment | |
uses: actions/setup-node@v3 | |
- name: Download app binary | |
uses: actions/download-artifact@v3 | |
with: | |
name: hive-app | |
path: bin | |
- name: Run test | |
run: | | |
nohup bash -c "python /speculos/speculos.py bin/app.elf --sdk 2.0 --apdu-port 40000 --api-port 5000 --display headless -s 'salon stock memory business develop elegant chronic kite aspect nothing tone essay huge knock flip bar noise main cloth coin flavor only melody gain'" > speculos.log 2<&1 & | |
cd test && npm ci && npm test | |
- name: Upload Speculos log | |
uses: actions/upload-artifact@v3 | |
with: | |
name: speculos-log | |
path: speculos.log |