Skip to content

Commit 7deb410

Browse files
authored
Merge pull request #275 from LedgerHQ/y333/update_ci
Update CI
2 parents 6a521b4 + 96558a5 commit 7deb410

File tree

2 files changed

+6
-21
lines changed

2 files changed

+6
-21
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@ jobs:
2929
- name: Cargo clippy
3030
working-directory: ${{ matrix.package }}
3131
run: |
32-
# to be suppressed when C SDK API_LEVEL_24 is available in dev-tools
33-
git clone https://github.com/LedgerHQ/ledger-secure-sdk.git --branch API_LEVEL_24 --single-branch c_sdk
34-
echo "setting LEDGER_SDK_PATH to $(realpath c_sdk)"
35-
export LEDGER_SDK_PATH=$(realpath c_sdk)
36-
# ####################################### #
3732
cargo clippy --target ${{ matrix.target }}
3833
3934
format:
@@ -62,11 +57,6 @@ jobs:
6257
- name: Cargo build
6358
working-directory: ledger_device_sdk
6459
run: |
65-
# to be suppressed when C SDK API_LEVEL_24 is available in dev-tools
66-
git clone https://github.com/LedgerHQ/ledger-secure-sdk.git --branch API_LEVEL_24 --single-branch c_sdk
67-
echo "setting LEDGER_SDK_PATH to $(realpath c_sdk)"
68-
export LEDGER_SDK_PATH=$(realpath c_sdk)
69-
# ####################################### #
7060
cargo build --target ${{ matrix.target }}
7161
if [[ "${{ matrix.target }}" == "nanosplus" || "${{ matrix.target }}" == "nanox" ]]; then
7262
cargo build --target ${{ matrix.target }} --features nano_nbgl;
@@ -86,17 +76,10 @@ jobs:
8676
- name: Unit tests
8777
working-directory: ledger_device_sdk
8878
run: |
89-
# to be suppressed when C SDK API_LEVEL_24 is available in dev-tools
90-
git clone https://github.com/LedgerHQ/ledger-secure-sdk.git --branch API_LEVEL_24 --single-branch c_sdk
91-
echo "setting LEDGER_SDK_PATH to $(realpath c_sdk)"
92-
export LEDGER_SDK_PATH=$(realpath c_sdk)
93-
pip install -U speculos --break-system-packages
94-
# ####################################### #
9579
cargo test --target ${{ matrix.target }} --features speculos,debug --tests
9680
9781
build-apps:
9882
name: Build all Rust apps
9983
uses: ./.github/workflows/reusable_build_all_apps.yml
10084
with:
10185
rust_sdk_branch: ${{ github.ref }}
102-
c_sdk_branch: API_LEVEL_24

.github/workflows/reusable_build_all_apps.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
type: string
1010
rust_sdk_branch:
1111
required: false
12-
default: 'master'
12+
default: ''
1313
type: string
1414
workflow_dispatch:
1515
inputs:
@@ -19,7 +19,7 @@ on:
1919
type: string
2020
rust_sdk_branch:
2121
required: false
22-
default: 'master'
22+
default: ''
2323
type: string
2424

2525
env:
@@ -36,7 +36,7 @@ jobs:
3636
uses: actions/checkout@v4
3737
with:
3838
repository: LedgerHQ/ledger-device-rust-sdk
39-
ref: ${{ inputs.rust_sdk_branch }}
39+
ref: 'master'
4040
- name: Set up Python
4141
uses: actions/setup-python@v4
4242
with:
@@ -74,6 +74,7 @@ jobs:
7474
- name: Install ledgered
7575
run: pip install ledgered --break-system-packages
7676
- name: Clone SDK
77+
if: ${{ inputs.rust_sdk_branch != '' }}
7778
uses: actions/checkout@v4
7879
with:
7980
path: sdk
@@ -87,6 +88,7 @@ jobs:
8788
path: ${{ matrix.app-name }}
8889
- name: Patch Cargo.toml
8990
continue-on-error: false
91+
if: ${{ inputs.rust_sdk_branch != '' }}
9092
run: |
9193
cd ${{ matrix.app-name }}
9294
build_directory=$(ledger-manifest --output-build-directory ledger_app.toml)
@@ -132,7 +134,7 @@ jobs:
132134
cd ${{ matrix.app-name }}
133135
build_directory=$(ledger-manifest --output-build-directory ledger_app.toml)
134136
cd $build_directory
135-
# Required as patch has a different version from what is locked in Cargo.lock
137+
# Use last published versions of the Rust SDK
136138
cargo update include_gif
137139
cargo update ledger_secure_sdk_sys
138140
cargo update ledger_device_sdk

0 commit comments

Comments
 (0)