Skip to content

Commit

Permalink
Merge pull request #10 from blooo-io/fix/LDG-481--nano-app-fix-build-…
Browse files Browse the repository at this point in the history
…on-mainnet

Fix/ldg 481  nano app fix build on mainnet
  • Loading branch information
Z4karia authored Sep 23, 2024
2 parents 622038f + 7223375 commit 2d4a233
Show file tree
Hide file tree
Showing 502 changed files with 511 additions and 9,951 deletions.
2 changes: 1 addition & 1 deletion .doxygen/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
# title of most generated pages and in a few other places.
# The default value is: My Project.

PROJECT_NAME = "Bitcoin"
PROJECT_NAME = "Acre"

# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/Dockerfile

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/build_and_functional_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ jobs:
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_ragger_tests.yml@v1
with:
download_app_binaries_artifact: "compiled_app_binaries"

30 changes: 0 additions & 30 deletions .github/workflows/builder-image-workflow.yml

This file was deleted.

184 changes: 21 additions & 163 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ on:
push:
branches:
- master
- main
- develop
pull_request:
branches:
- master
- main
- develop

jobs:
Expand Down Expand Up @@ -38,42 +40,20 @@ jobs:

- name: Build
run: |
make DEBUG=0 COIN=bitcoin BOLOS_SDK=${{ matrix.SDK }} && mv bin/ bitcoin-bin/
make DEBUG=0 COIN=bitcoin BOLOS_SDK=${{ matrix.SDK }} && mv bin/ acre-bin/
make clean
make DEBUG=0 COIN=bitcoin_testnet BOLOS_SDK=${{ matrix.SDK }} && mv bin/ bitcoin-testnet-bin/
- name: Upload Bitcoin app binary
make DEBUG=0 COIN=bitcoin_testnet BOLOS_SDK=${{ matrix.SDK }} && mv bin/ acre-testnet-bin/
- name: Upload Acre app binary
uses: actions/upload-artifact@v4
with:
name: bitcoin-app-${{ matrix.model }}
path: bitcoin-bin
name: acre-app-${{ matrix.model }}
path: acre-bin

- name: Upload Bitcoin Testnet app binary
- name: Upload Acre Testnet app binary
uses: actions/upload-artifact@v4
with:
name: bitcoin-testnet-app-${{ matrix.model }}
path: bitcoin-testnet-bin

job_build_app_perftest:
name: Compile the UX-less version of the app on Nano S+ for performance tests

runs-on: ubuntu-latest

container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest

steps:
- name: Clone
uses: actions/checkout@v2

- name: Build
run: |
make DEBUG=0 COIN=bitcoin_testnet BOLOS_SDK="$NANOSP_SDK" AUTOAPPROVE_FOR_PERF_TESTS=1
- name: Upload Bitcoin Testnet app binary
uses: actions/upload-artifact@v4
with:
name: bitcoin-testnet-perftest-app-nanosp
path: bin
name: acre-testnet-app-${{ matrix.model }}
path: acre-testnet-bin

job_unit_test:
name: Unit test
Expand Down Expand Up @@ -104,15 +84,15 @@ jobs:
name: code-coverage
path: unit-tests/coverage

- name: Upload to codecov.io
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./unit-tests/coverage.info
flags: unittests
name: codecov-app-bitcoin
fail_ci_if_error: true
verbose: true
# - name: Upload to codecov.io
# uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# files: ./unit-tests/coverage.info
# flags: unittests
# name: app-acre
# fail_ci_if_error: true
# verbose: true

- name: HTML documentation
run: doxygen .doxygen/Doxyfile
Expand Down Expand Up @@ -150,136 +130,14 @@ jobs:
- name: Clone
uses: actions/checkout@v2

- name: Download Bitcoin app binary
- name: Download Acre app binary
uses: actions/download-artifact@v4
with:
name: bitcoin-app-${{matrix.model}}
name: acre-app-${{matrix.model}}
path: bin

- name: Run tests
run: |
cd tests_mainnet
pip install -r requirements.txt
PYTHONPATH=$PYTHONPATH:/speculos pytest --headless --model=${{ matrix.model }} --timeout=300
job_test_python_lib_legacyapp:
name: Tests with the Python library and legacy Bitcoin app
needs: job_build
runs-on: ubuntu-latest

container:
image: ghcr.io/ledgerhq/app-bitcoin-new/speculos-bitcoin:latest
ports:
- 1234:1234
- 9999:9999
- 40000:40000
- 41000:41000
- 42000:42000
- 43000:43000
options: --entrypoint /bin/bash

steps:
- name: Clone
uses: actions/checkout@v2

- name: Run tests
run: |
cd bitcoin_client/tests
pip install -r requirements.txt
PYTHONPATH=$PYTHONPATH:/speculos pytest --headless --timeout=300 --model=nanos
job_perftests:
name: Performance report

needs: job_build_app_perftest
runs-on: ubuntu-latest

container:
image: ghcr.io/ledgerhq/app-bitcoin-new/speculos-bitcoin:latest
ports:
- 1234:1234
- 9999:9999
- 40000:40000
- 41000:41000
- 42000:42000
- 43000:43000
options: --entrypoint /bin/bash

steps:
- name: Clone
uses: actions/checkout@v2

- name: Download Bitcoin app binary for perftests
uses: actions/download-artifact@v4
with:
name: bitcoin-testnet-perftest-app-nanosp
path: bin

- name: Run tests
run: |
cd tests_perf
pip install -r requirements.txt
PYTHONPATH=$PYTHONPATH:/speculos pytest --headless --model=nanosp --benchmark-json=benchmarks.json
- name: Upload benchmarks summary
uses: actions/upload-artifact@v4
with:
name: benchmarks-log
path: tests_perf/benchmarks.json

job_test_js_lib:
name: Tests with the JS library
needs: job_build
runs-on: ubuntu-latest

container:
image: ghcr.io/ledgerhq/app-bitcoin-new/speculos-bitcoin:latest
ports:
- 1234:1234
- 9999:9999
- 40000:40000
- 41000:41000
- 42000:42000
- 43000:43000
options: --entrypoint /bin/bash

steps:
- name: Clone
uses: actions/checkout@v2

- name: Install node
uses: actions/setup-node@v2
with:
node-version: "16"

- name: Install yarn
run: |
npm install -g yarn
- name: Download Bitcoin Testnet app binary
uses: actions/download-artifact@v4
with:
name: bitcoin-testnet-app-nanosp
path: bin

- name: Run tests
run: |
cd bitcoin_client_js
yarn install
LOG_SPECULOS=1 LOG_APDUS=1 SPECULOS="/speculos/speculos.py" yarn test
job_test_rust_client:
name: Tests for rust client library
needs: job_build
runs-on: ubuntu-latest

container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest

steps:
- name: Clone
uses: actions/checkout@v2

- name: Run tests
run: |
cd bitcoin_client_rs/
cargo test --no-default-features --features="async"
45 changes: 0 additions & 45 deletions .github/workflows/codeql-workflow.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/guidelines-enforcer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
push:
branches:
- master
- main
- develop
pull_request:

Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/lint-workflow.yml

This file was deleted.

Loading

0 comments on commit 2d4a233

Please sign in to comment.