Skip to content

Commit ee6fa58

Browse files
authored
Merge pull request #274 from LedgerHQ/y333/apex_support
Y333/apex support
2 parents 7deb410 + 4b98f24 commit ee6fa58

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1050
-641
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build C Boilerplate application and check if C SDK build parameters are still correct
2+
permissions:
3+
contents: read
4+
5+
on:
6+
pull_request:
7+
workflow_dispatch:
8+
schedule:
9+
# * is a special character in YAML so you have to quote this string
10+
- cron: '0 12 * * *'
11+
12+
jobs:
13+
check_csdk_build_parameters:
14+
runs-on: ubuntu-latest
15+
container:
16+
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
17+
strategy:
18+
matrix:
19+
target: ["nanox", "nanosplus", "stax", "flex", "apex_p"]
20+
steps:
21+
- name: Checkout C BP
22+
uses: actions/checkout@v4
23+
with:
24+
repository: LedgerHQ/app-boilerplate
25+
path: c_boilerplate
26+
- name: Checkout C SDK Build Parameters Extractor
27+
uses: actions/checkout@v4
28+
with:
29+
repository: LedgerHQ/csdk_build_parameters_extractor
30+
path: c_sdk_build_params_x
31+
- name: Build C SDK Build Parameters Extractor
32+
run: |
33+
cd c_sdk_build_params_x
34+
cargo build --release
35+
- name: Run C SDK Build Parameters Extractor
36+
run: |
37+
cd c_sdk_build_params_x
38+
./target/release/cbpx --app-path ../c_boilerplate \
39+
--device ${{ matrix.target }}
40+
if [ $? -ne 0 ]; then
41+
echo "C SDK build parameters do not match with ref ones for target ${{ matrix.target }}"
42+
exit 1
43+
fi

.github/workflows/reusable_build_all_apps.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ jobs:
9393
cd ${{ matrix.app-name }}
9494
build_directory=$(ledger-manifest --output-build-directory ledger_app.toml)
9595
cd $build_directory
96+
# Required as patch has a different version from what is locked in Cargo.lock
97+
cargo update include_gif
98+
cargo update ledger_secure_sdk_sys
99+
cargo update ledger_device_sdk
100+
96101
workspace_root=$(cargo metadata --no-deps --format-version 1 | jq -r '.workspace_root')
97102
cargo_toml_path="$workspace_root/Cargo.toml"
98103
@@ -121,6 +126,9 @@ jobs:
121126
echo "Cargo.toml:"
122127
cat $cargo_toml_path
123128
129+
cargo update include_gif
130+
cargo update ledger_secure_sdk_sys
131+
cargo update ledger_device_sdk
124132
- name: Build
125133
run: |
126134
# Clone C SDK if provided
@@ -134,10 +142,7 @@ jobs:
134142
cd ${{ matrix.app-name }}
135143
build_directory=$(ledger-manifest --output-build-directory ledger_app.toml)
136144
cd $build_directory
137-
# Use last published versions of the Rust SDK
138-
cargo update include_gif
139-
cargo update ledger_secure_sdk_sys
140-
cargo update ledger_device_sdk
145+
echo "Building app for ${{ matrix.device }}"
141146
device=$(echo ${{ matrix.device }} | sed 's/+/plus/')
142147
echo "Build for "$device
143148
cargo ledger build $device

Cargo.lock

Lines changed: 129 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)