1
+ name : Build C Boilerplate application and check if C SDK build parameters are still correct
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ schedule :
6
+ # * is a special character in YAML so you have to quote this string
7
+ - cron : ' 0 12 * * *'
8
+
9
+ jobs :
10
+ build_csdk_build_parameters_extractor :
11
+ runs-on : ubuntu-latest
12
+ container :
13
+ image : ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
14
+ steps :
15
+ - name : Checkout C SDK Build Parameters Extractor
16
+ uses : actions/checkout@v4
17
+ with :
18
+ repository : LedgerHQ/csdk_build_params_x
19
+ path : c_sdk_build_params_x
20
+ - name : Build C SDK Build Parameters Extractor
21
+ run : |
22
+ cd c_sdk_build_params_x
23
+ cargo build --release
24
+ - name : Upload C SDK Build Parameters Extractor
25
+ uses : actions/upload-artifact@v4
26
+ with :
27
+ name : c_sdk_build_params_extractor
28
+ path : c_sdk_build_params_x/target/release/cbpx
29
+ check_csdk_build_parameters :
30
+ runs-on : ubuntu-latest
31
+ needs : build_csdk_build_parameters_extractor
32
+ container :
33
+ image : ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
34
+ strategy :
35
+ matrix :
36
+ target : ["nanox", "nanosplus", "stax", "flex"]
37
+ steps :
38
+ - name : Checkout Rust SDK
39
+ uses : actions/checkout@v4
40
+ - name : Checkout C BP
41
+ uses : actions/checkout@v4
42
+ with :
43
+ repository : LedgerHQ/app-boilerplate
44
+ path : c_boilerplate
45
+ - name : Download C SDK Build Parameters Extractor
46
+ uses : actions/download-artifact@v4
47
+ with :
48
+ name : c_sdk_build_params_extractor
49
+ - name : Run C SDK Build Parameters Extractor
50
+ run : |
51
+ c_sdk_build_params_extractor --app-path c_boilerplate \
52
+ --device ${{ matrix.target }}
53
+ # Compare output with matching file
54
+ diff c_sdk_build_${{ matrix.target }}.cflags ledger_secure_sdk_sys/c_sdk_build_${{ matrix.target }}.cflags
55
+ if [ $? -ne 0 ]; then
56
+ echo "C SDK build parameters CFLAGS do not match for target ${{ matrix.target }}"
57
+ exit 1
58
+ fi
59
+ diff c_sdk_build_${{ matrix.target }}.defines ledger_secure_sdk_sys/c_sdk_build_${{ matrix.target }}.defines
60
+ if [ $? -ne 0 ]; then
61
+ echo "C SDK build parameters DEFINES do not match for target ${{ matrix.target }}"
62
+ exit 1
63
+ fi
0 commit comments