1919 LANGUAGE : ' C.UTF-8'
2020
2121jobs :
22- type-check :
23- name : Type check
24- runs-on : ubuntu-latest
25- container : python:3.12
26- steps :
27- - uses : actions/checkout@v4
28-
29- - run : |
30- pip install poetry
31- poetry install
32-
33- - name : Run check
34- run : >
35- poetry run
36- mypy
37- hwi.py
38- hwilib/_base58.py
39- hwilib/_bech32.py
40- hwilib/_cli.py
41- hwilib/commands.py
42- hwilib/common.py
43- hwilib/descriptor.py
44- hwilib/devices/bitbox02.py
45- hwilib/devices/coldcard.py
46- hwilib/devices/digitalbitbox.py
47- hwilib/devices/jade.py
48- hwilib/devices/__init__.py
49- hwilib/devices/keepkey.py
50- hwilib/devices/ledger.py
51- hwilib/devices/trezor.py
52- hwilib/errors.py
53- hwilib/_script.py
54- hwilib/_serialize.py
55- hwilib/tx.py
56- hwilib/hwwclient.py
57- hwilib/__init__.py
58- hwilib/key.py
59- hwilib/udevinstaller.py
60-
6122 non-device-tests :
6223 name : Non-device tests
6324 runs-on : ubuntu-latest
@@ -142,126 +103,58 @@ jobs:
142103 name : dist
143104 path : dist/
144105
106+ # Individual sim builders (top-level jobs so tests can `needs` them)
145107 sim-builder-trezor :
146- name : Trezor sim builder
147- # Ubuntu 22.04 ships with glibc 2.35, which is needed to keep Trezor 1
148- # binaries compatible with Debian Bookworm (glibc 2.36) Python containers.
149- # Trezor T binaries don't need this.
150- runs-on : ubuntu-22.04
151-
152- strategy :
153- fail-fast : false
154- matrix :
155- device :
156- - { name: 'trezor-1', archive: 'trezor-firmware', paths: 'test/work/trezor-firmware' }
157- - { name: 'trezor-t', archive: 'trezor-firmware', paths: 'test/work/trezor-firmware' }
158-
159- steps :
160- - uses : actions/checkout@v4
161- - uses : ./.github/actions/build-sim
108+ uses : ./.github/workflows/sim-builder.yml
109+ with :
110+ sim : trezor
111+ # Ubuntu 22.04 ships with glibc 2.35, which is needed to keep Trezor 1
112+ # binaries compatible with Debian Bookworm (glibc 2.36) Python containers.
113+ # Trezor T binaries don't need this.
114+ runs-on : ubuntu-22.04
162115
163116 sim-builder-coldcard :
164- name : Coldcard sim builder
165- runs-on : ubuntu-22.04
166-
167- strategy :
168- fail-fast : false
169- matrix :
170- device :
171- - { name: 'coldcard', archive: 'coldcard-mpy', paths: 'test/work/firmware/external/micropython/ports/unix/coldcard-mpy test/work/firmware/unix/coldcard-mpy test/work/firmware/unix/l-mpy test/work/firmware/unix/l-port' }
172-
173- steps :
174- - uses : actions/checkout@v4
175- - uses : ./.github/actions/build-sim
117+ uses : ./.github/workflows/sim-builder.yml
118+ with :
119+ sim : coldcard
120+ runs-on : ubuntu-22.04
176121
177122 sim-builder-bitbox :
178- name : Bitbox sim builder
179- runs-on : ubuntu-latest
180-
181- strategy :
182- fail-fast : false
183- matrix :
184- device :
185- - { name: 'bitbox01', archive: 'mcu', paths: 'test/work/mcu' }
186- - { name: 'bitbox02', archive: 'bitbox02', paths: 'test/work/bitbox02-firmware/build-build/bin/simulator' }
187-
188- steps :
189- - uses : actions/checkout@v4
190- - uses : ./.github/actions/build-sim
123+ uses : ./.github/workflows/sim-builder.yml
124+ with :
125+ sim : bitbox
126+ runs-on : ubuntu-latest
191127
192128 sim-builder-jade :
193- name : Jade sim builder
194- runs-on : ubuntu-latest
195-
196- strategy :
197- fail-fast : false
198- matrix :
199- device :
200- - { name: 'jade', archive: 'jade', paths: 'test/work/jade/simulator' }
201-
202- steps :
203- - uses : actions/checkout@v4
204- - uses : ./.github/actions/build-sim
129+ uses : ./.github/workflows/sim-builder.yml
130+ with :
131+ sim : jade
132+ runs-on : ubuntu-latest
205133
206134 sim-builder-ledger :
207- name : Ledger sim builder
208- runs-on : ubuntu-latest
209-
210- strategy :
211- fail-fast : false
212- matrix :
213- device :
214- - { name: 'ledger', archive: 'speculos', paths: 'test/work/speculos' }
215-
216- steps :
217- - uses : actions/checkout@v4
218- - uses : ./.github/actions/build-sim
135+ uses : ./.github/workflows/sim-builder.yml
136+ with :
137+ sim : ledger
138+ runs-on : ubuntu-latest
219139
220140 sim-builder-keepkey :
221- name : Keepkey sim builder
222- runs-on : ubuntu-22.04
223-
224- strategy :
225- fail-fast : false
226- matrix :
227- device :
228- - { name: 'keepkey', archive: 'keepkey-firmware', paths: 'test/work/keepkey-firmware/bin' }
229-
230- steps :
231- - uses : actions/checkout@v4
232- - uses : ./.github/actions/build-sim
233-
234-
235- ledger-s-app-builder :
236- name : Ledger Nano S Bitcoin App builder
237- runs-on : ubuntu-latest
238- container : ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
239- steps :
240- - run : |
241- git clone https://github.com/LedgerHQ/app-bitcoin-new.git
242- cd app-bitcoin-new
243- make DEBUG=1
244-
245- - uses : actions/upload-artifact@v4
246- with :
247- name : ledger_app_nano_s
248- path : app-bitcoin-new/bin/app.elf
249-
141+ uses : ./.github/workflows/sim-builder.yml
142+ with :
143+ sim : keepkey
144+ runs-on : ubuntu-22.04
250145
251- ledger-x-app-builder :
252- name : Ledger Nano X Bitcoin App builder
253- runs-on : ubuntu-latest
254- container : ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
255- steps :
256- - run : |
257- git clone https://github.com/LedgerHQ/app-bitcoin-new.git
258- cd app-bitcoin-new
259- make DEBUG=1 BOLOS_SDK=$NANOX_SDK
146+ # Ledger app builders must be top-level too (tests `needs` them)
147+ ledger-app-builder-s :
148+ uses : ./.github/workflows/ledger-app-builder.yml
149+ with :
150+ app : nano_s
151+ runs-on : ubuntu-latest
260152
261- - uses : actions/upload-artifact@v4
262- with :
263- name : ledger_app_nano_x
264- path : app-bitcoin-new/bin/app.elf
153+ ledger-app-builder-x :
154+ uses : ./.github/workflows/ledger-app-builder.yml
155+ with :
156+ app : nano_x
157+ runs-on : ubuntu-latest
265158
266159 bitcoind-builder :
267160 name : bitcoind builder
@@ -281,14 +174,14 @@ jobs:
281174
282175 test-ledger-s :
283176 uses : ./.github/workflows/device-test.yml
284- needs : [sim-builder-ledger, ledger-s- app-builder, bitcoind-builder]
177+ needs : [sim-builder-ledger, ledger-app-builder-s , bitcoind-builder]
285178 with :
286179 device : ledger-legacy
287180 runs-on : ubuntu-latest
288181
289182 test-ledger-x :
290183 uses : ./.github/workflows/device-test.yml
291- needs : [sim-builder-ledger, ledger-x- app-builder, bitcoind-builder]
184+ needs : [sim-builder-ledger, ledger-app-builder-x , bitcoind-builder]
292185 with :
293186 device : ledger
294187 runs-on : ubuntu-latest
0 commit comments