Skip to content

Commit

Permalink
Fix CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cedelavergne-ledger committed Nov 3, 2023
1 parent b5ceb22 commit 15e3bf6
Showing 1 changed file with 22 additions and 18 deletions.
40 changes: 22 additions & 18 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ jobs:

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

- name: Build
run: |
make
- name: Upload app binary
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: hive-app
path: bin
Expand All @@ -37,30 +37,38 @@ jobs:
needs: job_build_debug
runs-on: ubuntu-latest

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

steps:
- name: Install required packages
run: |
sudo apt update && sudo apt install -qy cmake libcmocka-dev
- name: Clone
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Clone SDK
uses: actions/checkout@v3
with:
repository: ledgerHQ/ledger-secure-sdk
path: sdk

- name: Build unit tests
run: |
cd unit-tests/
export BOLOS_SDK=../sdk
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@v2
- uses: actions/upload-artifact@v3
with:
name: code-coverage
path: unit-tests/coverage

- name: Upload to codecov.io
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./unit-tests/coverage.info
Expand All @@ -72,13 +80,11 @@ jobs:
- name: HTML documentation
run: doxygen .doxygen/Doxyfile

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: documentation
path: doc/html



job_test:
name: Test
needs: job_build_debug
Expand All @@ -97,19 +103,17 @@ jobs:

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

- name: Install required packages
run: |
apt update && apt install -qy curl unzip wget gcc # /!\ workaround for pysha3
apt update && apt install -qy npm curl unzip wget gcc # /!\ workaround for pysha3
- name: Prepare NodeJS environment
run: |
curl -sL https://deb.nodesource.com/setup_14.x | bash
apt-get install nodejs -yq
uses: actions/setup-node@v3

- name: Download app binary
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: hive-app
path: bin
Expand All @@ -120,7 +124,7 @@ jobs:
cd test && npm ci && npm test
- name: Upload Speculos log
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: speculos-log
path: speculos.log

0 comments on commit 15e3bf6

Please sign in to comment.