29
29
make deps
30
30
- run : make cpp_test
31
31
32
+ setup_rust :
33
+ runs-on : ubuntu-latest
34
+ outputs :
35
+ cargo_home : ${{ steps.set_paths.outputs.cargo_home }}
36
+ rustup_home : ${{ steps.set_paths.outputs.rustup_home }}
37
+ steps :
38
+ - id : set_paths
39
+ run : |
40
+ echo "cargo_home=$GITHUB_WORKSPACE/app/rust/.cargo" >> $GITHUB_OUTPUT
41
+ echo "rustup_home=$GITHUB_WORKSPACE/app/rust/.rustup" >> $GITHUB_OUTPUT
42
+
43
+
32
44
build_ledger :
33
45
needs : [configure, setup_rust]
34
46
runs-on : ubuntu-latest
@@ -39,15 +51,15 @@ jobs:
39
51
BOLOS_SDK : /opt/nanos-secure-sdk
40
52
HOME : /root
41
53
CARGO_HOME : ${{ needs.setup_rust.outputs.cargo_home }}
42
- RUSTUP_HOME : ${{ needs.setup_rust.outputs.rustup_home }}
54
+ RUSTUP_HOME : ${{ needs.setup_rust.outputs.rustup_home }}
43
55
PATH : /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${{ needs.setup_rust.outputs.cargo_home }}/bin
44
56
outputs :
45
57
size : ${{steps.build.outputs.size}}
46
58
steps :
47
59
- name : Checkout
48
60
uses : actions/checkout@v4
49
61
with :
50
- submodules : recursive
62
+ submodules : true
51
63
- name : Setup Rust environment
52
64
uses : actions-rs/toolchain@v1
53
65
with :
63
75
key : ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
64
76
restore-keys : |
65
77
${{ runner.os }}-rust-
78
+ - name : Install rust-src component
79
+ run : rustup component add rust-src --toolchain stable-x86_64-unknown-linux-gnu
66
80
- name : Build Standard app
67
81
id : build
68
82
shell : bash -l {0}
@@ -111,16 +125,6 @@ jobs:
111
125
run : cd ./app/rust
112
126
cargo test
113
127
114
- setup_rust :
115
- runs-on : ubuntu-latest
116
- outputs :
117
- cargo_home : ${{ steps.set_paths.outputs.cargo_home }}
118
- rustup_home : ${{ steps.set_paths.outputs.rustup_home }}
119
- steps :
120
- - id : set_paths
121
- run : |
122
- echo "cargo_home=$GITHUB_WORKSPACE/app/rust/.cargo" >> $GITHUB_OUTPUT
123
- echo "rustup_home=$GITHUB_WORKSPACE/app/rust/.rustup" >> $GITHUB_OUTPUT
124
128
125
129
build_application :
126
130
name : Build application using the reusable workflow
@@ -225,20 +229,21 @@ jobs:
225
229
BOLOS_SDK : /opt/nanos-secure-sdk
226
230
HOME : /root
227
231
CARGO_HOME : ${{ needs.setup_rust.outputs.cargo_home }}
228
- RUSTUP_HOME : ${{ needs.setup_rust.outputs.rustup_home }}
232
+ RUSTUP_HOME : ${{ needs.setup_rust.outputs.rustup_home }}
229
233
PATH : /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${{ needs.setup_rust.outputs.cargo_home }}/bin
230
234
steps :
231
235
- name : Checkout
232
236
uses : actions/checkout@v4
233
237
with :
234
- submodules : recursive
238
+ submodules : true
239
+ - name : Install deps
240
+ run : pip install ledgerblue --break-system-packages
235
241
- name : Setup Rust environment
236
242
uses : actions-rs/toolchain@v1
237
243
with :
238
244
toolchain : stable
239
245
target : thumbv6m-none-eabi
240
246
override : true
241
- profile : minimal
242
247
- name : Cache Rust dependencies
243
248
uses : actions/cache@v3
244
249
with :
@@ -248,9 +253,8 @@ jobs:
248
253
key : ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
249
254
restore-keys : |
250
255
${{ runner.os }}-rust-
251
- - name : Install deps
252
- run : pip install ledgerblue --break-system-packages
253
-
256
+ - name : Install rust-src component
257
+ run : rustup component add rust-src --toolchain stable-x86_64-unknown-linux-gnu
254
258
- name : Build NanoS
255
259
shell : bash -l {0}
256
260
run : |
@@ -289,20 +293,21 @@ jobs:
289
293
BOLOS_SDK : /opt/nanosplus-secure-sdk
290
294
HOME : /root
291
295
CARGO_HOME : ${{ needs.setup_rust.outputs.cargo_home }}
292
- RUSTUP_HOME : ${{ needs.setup_rust.outputs.rustup_home }}
296
+ RUSTUP_HOME : ${{ needs.setup_rust.outputs.rustup_home }}
293
297
PATH : /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${{ needs.setup_rust.outputs.cargo_home }}/bin
294
298
steps :
295
299
- name : Checkout
296
300
uses : actions/checkout@v4
297
301
with :
298
- submodules : recursive
302
+ submodules : true
303
+ - name : Install deps
304
+ run : pip install ledgerblue --break-system-packages
299
305
- name : Setup Rust environment
300
306
uses : actions-rs/toolchain@v1
301
307
with :
302
308
toolchain : stable
303
309
target : thumbv6m-none-eabi
304
310
override : true
305
- profile : minimal
306
311
- name : Cache Rust dependencies
307
312
uses : actions/cache@v3
308
313
with :
@@ -312,9 +317,8 @@ jobs:
312
317
key : ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
313
318
restore-keys : |
314
319
${{ runner.os }}-rust-
315
- - name : Install deps
316
- run : pip install ledgerblue --break-system-packages
317
-
320
+ - name : Install rust-src component
321
+ run : rustup component add rust-src --toolchain stable-x86_64-unknown-linux-gnu
318
322
- name : Build NanoSP
319
323
shell : bash -l {0}
320
324
run : |
@@ -353,20 +357,21 @@ jobs:
353
357
BOLOS_SDK : /opt/stax-secure-sdk
354
358
HOME : /root
355
359
CARGO_HOME : ${{ needs.setup_rust.outputs.cargo_home }}
356
- RUSTUP_HOME : ${{ needs.setup_rust.outputs.rustup_home }}
360
+ RUSTUP_HOME : ${{ needs.setup_rust.outputs.rustup_home }}
357
361
PATH : /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${{ needs.setup_rust.outputs.cargo_home }}/bin
358
362
steps :
359
363
- name : Checkout
360
364
uses : actions/checkout@v4
361
365
with :
362
- submodules : recursive
366
+ submodules : true
367
+ - name : Install deps
368
+ run : pip install ledgerblue --break-system-packages
363
369
- name : Setup Rust environment
364
370
uses : actions-rs/toolchain@v1
365
371
with :
366
372
toolchain : stable
367
373
target : thumbv6m-none-eabi
368
374
override : true
369
- profile : minimal
370
375
- name : Cache Rust dependencies
371
376
uses : actions/cache@v3
372
377
with :
@@ -376,8 +381,8 @@ jobs:
376
381
key : ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
377
382
restore-keys : |
378
383
${{ runner.os }}-rust-
379
- - name : Install deps
380
- run : pip install ledgerblue --break-system-packages
384
+ - name : Install rust-src component
385
+ run : rustup component add rust-src --toolchain stable-x86_64-unknown-linux-gnu
381
386
382
387
- name : Build Stax
383
388
shell : bash -l {0}
@@ -392,8 +397,7 @@ jobs:
392
397
env :
393
398
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
394
399
with :
395
- files : |
396
- ./app/pkg/installer_stax.sh
400
+ files : ./app/pkg/installer_stax.sh
397
401
tag_name : ${{ steps.stax.outputs.tag_name }}
398
402
draft : false
399
403
prerelease : false
@@ -417,20 +421,21 @@ jobs:
417
421
BOLOS_SDK : /opt/flex-secure-sdk
418
422
HOME : /root
419
423
CARGO_HOME : ${{ needs.setup_rust.outputs.cargo_home }}
420
- RUSTUP_HOME : ${{ needs.setup_rust.outputs.rustup_home }}
424
+ RUSTUP_HOME : ${{ needs.setup_rust.outputs.rustup_home }}
421
425
PATH : /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${{ needs.setup_rust.outputs.cargo_home }}/bin
422
426
steps :
423
427
- name : Checkout
424
428
uses : actions/checkout@v4
425
429
with :
426
- submodules : recursive
430
+ submodules : true
431
+ - name : Install deps
432
+ run : pip install ledgerblue --break-system-packages
427
433
- name : Setup Rust environment
428
434
uses : actions-rs/toolchain@v1
429
435
with :
430
436
toolchain : stable
431
437
target : thumbv6m-none-eabi
432
438
override : true
433
- profile : minimal
434
439
- name : Cache Rust dependencies
435
440
uses : actions/cache@v3
436
441
with :
@@ -440,8 +445,8 @@ jobs:
440
445
key : ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
441
446
restore-keys : |
442
447
${{ runner.os }}-rust-
443
- - name : Install deps
444
- run : pip install ledgerblue --break-system-packages
448
+ - name : Install rust-src component
449
+ run : rustup component add rust-src --toolchain stable-x86_64-unknown-linux-gnu
445
450
446
451
- name : Build Flex
447
452
shell : bash -l {0}
@@ -456,8 +461,7 @@ jobs:
456
461
env :
457
462
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
458
463
with :
459
- files : |
460
- ./app/pkg/installer_flex.sh
464
+ files : ./app/pkg/installer_flex.sh
461
465
tag_name : ${{ steps.flex.outputs.tag_name }}
462
466
draft : false
463
467
prerelease : false
0 commit comments