Skip to content

Commit 8c392ca

Browse files
committed
wip workflows
1 parent 7625f79 commit 8c392ca

2 files changed

Lines changed: 49 additions & 54 deletions

File tree

.github/workflows/core-hw.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ jobs:
4949
--retries=5
5050
--retry-delay=1
5151
TT_UHUB_PORT: 1
52-
QUIET_MODE: 1
5352
timeout-minutes: 360 # 6h CI job timeout
5453
steps:
5554
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # actions/checkout@v4.3.1
@@ -93,7 +92,6 @@ jobs:
9392
DISABLE_OPTIGA: 1
9493
BOOTLOADER_DEVEL: ${{ matrix.model == 'T2B1' && '1' || '0' }}
9594
TT_UHUB_PORT: 1
96-
QUIET_MODE: 1
9795
steps:
9896
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # actions/checkout@v4.3.1
9997
with:

.github/workflows/core.yml

Lines changed: 49 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ jobs:
7777
N4W1: ${{ matrix.n4w1 && '1' || '0' }}
7878
PRODUCTION: ${{ matrix.type == 'production' && '1' || '0' }}
7979
BOOTLOADER_DEVEL: ${{ matrix.model == 'T3W1' && '1' || '0' }}
80-
QUIET_MODE: 1
8180
steps:
8281
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # actions/checkout@v6.0.2
8382
with:
@@ -94,24 +93,20 @@ jobs:
9493
- run: nix-shell --run "uv run make -C core build_prodtest_emu"
9594
if: matrix.coins == 'universal' && matrix.type != 'debuglink' && matrix.model == 'T3W1'
9695
- run: nix-shell --run "uv run make -C core build_firmware"
97-
- run: nix-shell --run "uv run ./tools/print-rust-stack-sizes.py | sort -k1 -n | tail -n 50"
98-
- run: nix-shell --run "uv run ./tools/print-rust-type-sizes.sh core/build/firmware/rust-type-sizes.log" | awk '$1 >= 1000' | sort -k1 -n
99-
- run: nix-shell --run "uv run make -C core sizecheck"
100-
if: matrix.coins == 'universal' && matrix.type != 'debuglink'
101-
- run: nix-shell --run "uv run ./tools/check-bitcoin-only core/build/firmware/firmware.bin"
96+
# -Z emit-stack-sizes does not work under xtask for some reason
97+
# - run: nix-shell --run "uv run ./tools/print-rust-stack-sizes.py | sort -k1 -n | tail -n 50"
98+
# - run: nix-shell --run "uv run ./tools/print-rust-type-sizes.sh core/build/firmware/rust-type-sizes.log" | awk '$1 >= 1000' | sort -k1 -n
99+
# - run: nix-shell --run "uv run make -C core sizecheck"
100+
# if: matrix.coins == 'universal' && matrix.type != 'debuglink'
101+
- run: nix-shell --run "uv run ./tools/check-bitcoin-only core/build-xtask/artifacts/latest/firmware.bin"
102102
if: matrix.coins == 'btconly' && matrix.type != 'debuglink'
103103
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # actions/upload-artifact@v7.0.0
104104
with:
105105
name: core-firmware-${{ matrix.model }}-${{ matrix.coins }}-${{ matrix.type }}${{ matrix.n4w1 && '-n4w1' || '' }}
106106
path: |
107-
core/build/boardloader/*.bin
108-
core/build/bootloader/*.bin
109-
core/build/bootloader_ci/*.bin
110-
core/build/prodtest/*.bin
111-
core/build/prodtest_emu/*.bin
112-
core/build/firmware/firmware.elf
113-
core/build/firmware/firmware-*.bin
114-
core/build/firmware/rust-type-sizes.log
107+
core/build-xtask/artifacts/latest/*.bin
108+
core/build-xtask/artifacts/latest/*.elf
109+
core/build-xtask/artifacts/pub/*
115110
retention-days: 7
116111

117112
core_emu:
@@ -143,7 +138,6 @@ jobs:
143138
N4W1: ${{ matrix.n4w1 && '1' || '0' }}
144139
ADDRESS_SANITIZER: ${{ matrix.asan == 'asan' && '1' || '0' }}
145140
LSAN_OPTIONS: "suppressions=../../asan_suppressions.txt"
146-
QUIET_MODE: 1
147141
DISABLE_TROPIC: 0
148142
steps:
149143
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # actions/checkout@v6.0.2
@@ -157,15 +151,16 @@ jobs:
157151
if: ${{ matrix.model == 'T3W1' }}
158152
run: nix-shell --run "uv run model_server tcp -c tests/tropic_model/config.yml > tests/trezor-tropic-model.log 2>&1 &"
159153
- run: nix-shell --run "uv run make -C core test_emu_sanity"
160-
- run: cp core/build/unix/trezor-emu-core core/build/unix/trezor-emu-core-${{ matrix.model }}-${{ matrix.coins }}${{ matrix.n4w1 && '-n4w1' || '' }}
154+
- run: cp core/build-xtask/artifacts/latest/firmware-emu core/build-xtask/artifacts/latest/firmware-emu-${{ matrix.model }}-${{ matrix.coins }}${{ matrix.n4w1 && '-n4w1' || '' }}
161155
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # actions/upload-artifact@v7.0.0
162156
with:
163157
name: core-emu-${{ matrix.model }}-${{ matrix.coins }}-${{ matrix.type }}-${{ matrix.asan }}${{ matrix.n4w1 && '-n4w1' || '' }}
164158
path: |
165-
core/build/unix/trezor-emu-core*
166-
core/build/bootloader_emu/bootloader.elf
167-
core/build/unix/src/**/*.i
159+
core/build-xtask/artifacts/latest/firmware-emu*
160+
core/build-xtask/artifacts/latest/bootloader-emu
161+
core/build-xtask/artifacts/latest/mpy-files/**/*.i
168162
retention-days: 7
163+
# FIXME: core/build/unix/src/**/*.i
169164

170165
core_emu_arm:
171166
if: github.event_name == 'schedule'
@@ -193,7 +188,6 @@ jobs:
193188
N4W1: ${{ matrix.n4w1 && '1' || '0' }}
194189
ADDRESS_SANITIZER: ${{ matrix.asan == 'asan' && '1' || '0' }}
195190
LSAN_OPTIONS: "suppressions=../../asan_suppressions.txt"
196-
QUIET_MODE: 1
197191
steps:
198192
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # actions/checkout@v6.0.2
199193
with:
@@ -202,13 +196,13 @@ jobs:
202196
- run: nix-shell --run "uv run make -C core build_bootloader_emu"
203197
if: matrix.coins == 'universal'
204198
- run: nix-shell --run "uv run make -C core build_unix_frozen"
205-
- run: mv core/build/unix/trezor-emu-core core/build/unix/trezor-emu-arm-core-${{ matrix.model }}-${{ matrix.coins }}${{ matrix.n4w1 && '-n4w1' || '' }}
199+
- run: mv core/build-xtask/artifacts/latest/firmware-emu core/build-xtask/artifacts/latest/firmware-emu-arm-${{ matrix.model }}-${{ matrix.coins }}${{ matrix.n4w1 && '-n4w1' || '' }}
206200
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # actions/upload-artifact@v7.0.0
207201
with:
208202
name: core-emu-arm-${{ matrix.model }}-${{ matrix.coins }}-${{ matrix.type }}-${{ matrix.asan }}${{ matrix.n4w1 && '-n4w1' || '' }}
209203
path: |
210-
core/build/unix/trezor-emu-*
211-
core/build/bootloader_emu/bootloader.elf
204+
core/build-xtask/artifacts/latest/firmware-emu*
205+
core/build-xtask/artifacts/latest/bootloader-emu
212206
retention-days: 2
213207

214208
core_unit_python_test:
@@ -265,7 +259,8 @@ jobs:
265259
# This makes sure that rust-analyzer will work on our codebase.
266260
- run: nix-shell --run "cd core/embed/rust && cargo build"
267261
if: matrix.asan == 'noasan'
268-
- run: nix-shell --run "uv run make -C core clippy"
262+
# FIXME
263+
# - run: nix-shell --run "uv run make -C core clippy"
269264
- run: nix-shell --run "uv run make -C core test_rust"
270265
- run: nix-shell --run "uv run make -C core audit_rust"
271266

@@ -284,8 +279,8 @@ jobs:
284279
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # actions/download-artifact@v8.0.0
285280
with:
286281
name: core-emu-${{ matrix.model }}-universal-debuglink-noasan
287-
path: core/build
288-
- run: chmod +x core/build/unix/trezor-emu-core*
282+
path: core/build-xtask/artifacts/latest
283+
- run: chmod +x core/build-xtask/artifacts/latest/firmware-emu*
289284
- uses: ./.github/actions/environment
290285
- run: nix-shell --run "uv run core/emu.py --headless -q --temporary-profile --slip0014 --command cargo test --manifest-path rust/trezor-client/Cargo.toml"
291286

@@ -329,8 +324,8 @@ jobs:
329324
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # actions/download-artifact@v8.0.0
330325
with:
331326
name: core-emu-${{ matrix.model }}-${{ matrix.coins }}-debuglink-${{ matrix.asan }}${{ matrix.n4w1 && '-n4w1' || '' }}
332-
path: core/build
333-
- run: chmod +x core/build/unix/trezor-emu-core*
327+
path: core/build-xtask/artifacts/latest
328+
- run: chmod +x core/build-xtask/artifacts/latest/firmware-emu*
334329
- uses: ./.github/actions/environment
335330
- name: Start Tropic model
336331
if: ${{ env.TREZOR_MODEL == 'T3W1' && env.ACTIONS_DO_UI_TEST != 'true' }} # ACTIONS_DO_UI_TEST refers to the test_emu_ui_multicore below which uses --control-emulators and starts tvl internally
@@ -387,8 +382,8 @@ jobs:
387382
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # actions/download-artifact@v8.0.0
388383
with:
389384
name: core-emu-${{ matrix.model }}-universal-debuglink-${{ matrix.asan }}
390-
path: core/build
391-
- run: chmod +x core/build/unix/trezor-emu-core*
385+
path: core/build-xtask/artifacts/latest
386+
- run: chmod +x core/build-xtask/artifacts/latest/firmware-emu*
392387
- uses: ./.github/actions/environment
393388
- run: nix-shell --run "uv run make -C core test_emu_click_ui_multicore"
394389
if: ${{ matrix.asan == 'noasan' }}
@@ -437,8 +432,8 @@ jobs:
437432
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # actions/download-artifact@v8.0.0
438433
with:
439434
name: core-emu-${{ matrix.model }}-universal-debuglink-${{ matrix.asan }}
440-
path: core/build
441-
- run: chmod +x core/build/unix/trezor-emu-core*
435+
path: core/build-xtask/artifacts/latest
436+
- run: chmod +x core/build-xtask/artifacts/latest/firmware-emu*
442437
- uses: ./.github/actions/environment
443438
with:
444439
full-deps: "true"
@@ -478,8 +473,8 @@ jobs:
478473
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # actions/download-artifact@v8.0.0
479474
with:
480475
name: core-emu-${{ matrix.model }}-universal-debuglink-${{ matrix.asan }}
481-
path: core/build
482-
- run: chmod +x core/build/unix/trezor-emu-core*
476+
path: core/build-xtask/artifacts/latest
477+
- run: chmod +x core/build-xtask/artifacts/latest/firmware-emu*
483478
- uses: ./.github/actions/environment
484479
- name: Start Tropic model
485480
if: ${{ matrix.model == 'T3W1' }}
@@ -521,13 +516,13 @@ jobs:
521516
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # actions/download-artifact@v8.0.0
522517
with:
523518
name: core-emu-${{ matrix.model }}-universal-debuglink-noasan
524-
path: core/build
525-
- run: chmod +x core/build/unix/trezor-emu-core*
519+
path: core/build-xtask/artifacts/latest
520+
- run: chmod +x core/build-xtask/artifacts/latest/firmware-emu*
526521
- uses: ./.github/actions/environment
527522
with:
528523
full-deps: "true"
529524
- run: nix-shell --run "git clone --depth=1 https://github.com/bitcoin-core/HWI.git"
530-
- run: nix-shell --arg fullDeps true --run "cd HWI && poetry install && poetry run ./test/test_trezor.py --model_t ../core/build/unix/trezor-emu-core bitcoind"
525+
- run: nix-shell --arg fullDeps true --run "cd HWI && poetry install && poetry run ./test/test_trezor.py --model_t ../core/build-xtask/artifacts/latest/firmware-emu bitcoind"
531526
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # actions/upload-artifact@v7.0.0
532527
with:
533528
name: core-test-hwi-${{ matrix.model }}
@@ -580,9 +575,9 @@ jobs:
580575
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # actions/download-artifact@v8.0.0
581576
with:
582577
name: core-firmware-${{ matrix.model }}-universal-normal # FIXME: s/normal/debuglink/
583-
path: core/build
578+
path: core/build-xtask/artifacts/latest
584579
- uses: ./.github/actions/environment
585-
- run: nix-shell --run "uv run core/tools/size/checker.py core/build/firmware/firmware.elf"
580+
- run: nix-shell --run "uv run core/tools/size/checker.py core/build-xtask/artifacts/latest/firmware.elf"
586581

587582
# Monero tests.
588583
core_monero_test:
@@ -606,8 +601,8 @@ jobs:
606601
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # actions/download-artifact@v8.0.0
607602
with:
608603
name: core-emu-${{ matrix.model }}-universal-debuglink-${{ matrix.asan }}
609-
path: core/build
610-
- run: chmod +x core/build/unix/trezor-emu-core*
604+
path: core/build-xtask/artifacts/latest
605+
- run: chmod +x core/build-xtask/artifacts/latest/firmware-emu*
611606
- uses: ./.github/actions/environment
612607
with:
613608
full-deps: "true"
@@ -625,7 +620,7 @@ jobs:
625620

626621
# Tests for U2F and HID.
627622
core_u2f_test:
628-
name: U2F test (${{ matrix.model }}, ${{ matrix.asan }}
623+
name: U2F test (${{ matrix.model }}, ${{ matrix.asan }})
629624
runs-on: ubuntu-latest
630625
needs:
631626
- param
@@ -645,8 +640,8 @@ jobs:
645640
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # actions/download-artifact@v8.0.0
646641
with:
647642
name: core-emu-${{ matrix.model }}-universal-debuglink-${{ matrix.asan }}
648-
path: core/build
649-
- run: chmod +x core/build/unix/trezor-emu-core*
643+
path: core/build-xtask/artifacts/latest
644+
- run: chmod +x core/build-xtask/artifacts/latest/firmware-emu*
650645
- uses: ./.github/actions/environment
651646
- name: Start Tropic model
652647
if: ${{ matrix.model == 'T3W1' }}
@@ -663,7 +658,7 @@ jobs:
663658

664659
# FIDO2 device tests.
665660
core_fido2_test:
666-
name: FIDO2 test (${{ matrix.model }}, ${{ matrix.asan }}
661+
name: FIDO2 test (${{ matrix.model }}, ${{ matrix.asan }})
667662
runs-on: ubuntu-latest
668663
needs:
669664
- param
@@ -683,8 +678,8 @@ jobs:
683678
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # actions/download-artifact@v8.0.0
684679
with:
685680
name: core-emu-${{ matrix.model }}-universal-debuglink-${{ matrix.asan }}
686-
path: core/build
687-
- run: chmod +x core/build/unix/trezor-emu-core*
681+
path: core/build-xtask/artifacts/latest
682+
- run: chmod +x core/build-xtask/artifacts/latest/firmware-emu*
688683
- uses: ./.github/actions/environment
689684
- name: Start Tropic model
690685
if: ${{ matrix.model == 'T3W1' }}
@@ -731,7 +726,7 @@ jobs:
731726
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # actions/download-artifact@v8.0.0
732727
with:
733728
name: core-emu-${{ matrix.model }}-universal-debuglink-noasan
734-
path: core/build
729+
path: core/build-xtask
735730
- uses: ./.github/actions/environment
736731
# `make coverage` uses .i files downloaded above
737732
- run: nix-shell --run "uv run make -C core coverage"
@@ -812,9 +807,10 @@ jobs:
812807
role-to-assume: arn:aws:iam::538326561891:role/gh_actions_deploy_dev_firmware_data
813808
aws-region: eu-west-1
814809
continue-on-error: true
810+
# FIXME
815811
- run: |
816-
rm unix/trezor-emu-core
817-
aws s3 sync --only-show-errors unix s3://data.trezor.io/dev/firmware/emu-nightly
812+
rm firmware-emu
813+
#aws s3 sync --only-show-errors firmware-emu-* s3://data.trezor.io/dev/firmware/emu-nightly
818814
819815
core_upload_emu_branch:
820816
name: Upload emulator binaries for the current branch
@@ -843,10 +839,11 @@ jobs:
843839
branch_name=${{ github.ref_name }}
844840
fi
845841
echo "branch_name=$branch_name" >> $GITHUB_ENV
842+
# FIXME
846843
- name: Upload artifacts to branch directory
847844
run: |
848-
rm unix/trezor-emu-core
849-
aws s3 sync --only-show-errors unix s3://data.trezor.io/dev/firmware/emu-branches/$branch_name
845+
rm firmware-emu
846+
#aws s3 sync --only-show-errors firmware-emu-* s3://data.trezor.io/dev/firmware/emu-branches/$branch_name
850847
851848
# Connect
852849
# TODO: core_connect_test

0 commit comments

Comments
 (0)