1
- container :
2
- dockerfile : ci/cirrus.Dockerfile
3
-
4
1
env :
5
2
EMAIL : cirrus@cirrus-ci.org
6
3
4
+ python_version_matrix_template : &PYTHON_VERSION_MATRIX_TEMPLATE
5
+ - container :
6
+ dockerfile : ci/py37.Dockerfile
7
+ env :
8
+ PYTHON : 3.7
9
+ - container :
10
+ dockerfile : ci/cirrus.Dockerfile
11
+ env :
12
+ PYTHON : 3.8
13
+ - container :
14
+ dockerfile : ci/py39.Dockerfile
15
+ env :
16
+ PYTHON : 3.9
17
+ - container :
18
+ dockerfile : ci/py310.Dockerfile
19
+ env :
20
+ PYTHON : 3.10
21
+ - container :
22
+ dockerfile : ci/py311.Dockerfile
23
+ env :
24
+ PYTHON : 3.11
25
+
7
26
device_matrix_template : &DEVICE_MATRIX_TEMPLATE
8
27
- env :
9
28
DEVICE : --trezor-1
@@ -54,8 +73,37 @@ device_matrix_template: &DEVICE_MATRIX_TEMPLATE
54
73
- tar -xvf "mcu.tar.gz"
55
74
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/bitcoind_builder/bitcoin/bitcoin.tar.gz"
56
75
- tar -xvf "bitcoin.tar.gz"
76
+ - env :
77
+ DEVICE : --jade
78
+ depends_on :
79
+ - Jade Sim Builder
80
+ - dist_builder
81
+ - bitcoind_builder
82
+ fetch_sim_script :
83
+ - wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/Jade Sim Builder/sim/jade.tar.gz"
84
+ - tar -xvf "jade.tar.gz"
85
+ - wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/bitcoind_builder/bitcoin/bitcoin.tar.gz"
86
+ - tar -xvf "bitcoin.tar.gz"
57
87
- env :
58
88
DEVICE : --ledger
89
+ depends_on :
90
+ - Ledger Sim Builder
91
+ - Ledger App Builder
92
+ - dist_builder
93
+ - bitcoind_builder
94
+ fetch_sim_script :
95
+ - wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/Ledger Sim Builder/sim/speculos.tar.gz"
96
+ - tar -xvf "speculos.tar.gz"
97
+ - wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/bitcoind_builder/bitcoin/bitcoin.tar.gz"
98
+ - tar -xvf "bitcoin.tar.gz"
99
+ fetch_ledger_app_script :
100
+ - wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/Ledger App Builder/built_ledger_app/app-bitcoin-new/bin/app.elf"
101
+ - mv app.elf test/work/speculos/apps/btc-test.elf
102
+ sim_install_script :
103
+ - poetry run pip install construct flask-restful jsonschema mnemonic pyelftools pillow requests pytesseract
104
+ - pip install construct flask-restful jsonschema mnemonic pyelftools pillow requests pytesseract
105
+ - env :
106
+ DEVICE : --ledger-legacy
59
107
depends_on :
60
108
- Ledger Sim Builder
61
109
- dist_builder
@@ -66,8 +114,8 @@ device_matrix_template: &DEVICE_MATRIX_TEMPLATE
66
114
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/bitcoind_builder/bitcoin/bitcoin.tar.gz"
67
115
- tar -xvf "bitcoin.tar.gz"
68
116
sim_install_script :
69
- - poetry run pip install construct flask-restful jsonschema mnemonic pyelftools pillow requests
70
- - pip install construct flask-restful jsonschema mnemonic pyelftools pillow requests
117
+ - poetry run pip install construct flask-restful jsonschema mnemonic pyelftools pillow requests pytesseract
118
+ - pip install construct flask-restful jsonschema mnemonic pyelftools pillow requests pytesseract
71
119
- env :
72
120
DEVICE : --keepkey
73
121
depends_on :
@@ -80,12 +128,11 @@ device_matrix_template: &DEVICE_MATRIX_TEMPLATE
80
128
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/bitcoind_builder/bitcoin/bitcoin.tar.gz"
81
129
- tar -xvf "bitcoin.tar.gz"
82
130
83
- lint_task :
84
- test_script :
85
- - flake8
86
-
87
131
task :
132
+ container :
133
+ image : python:latest
88
134
install_script :
135
+ - pip install poetry
89
136
- poetry install
90
137
matrix :
91
138
- name : Type Check
@@ -102,6 +149,7 @@ task:
102
149
hwilib/devices/bitbox02.py
103
150
hwilib/devices/coldcard.py
104
151
hwilib/devices/digitalbitbox.py
152
+ hwilib/devices/jade.py
105
153
hwilib/devices/__init__.py
106
154
hwilib/devices/keepkey.py
107
155
hwilib/devices/ledger.py
@@ -116,15 +164,19 @@ task:
116
164
hwilib/udevinstaller.py
117
165
- name : Non-Device Tests
118
166
test_script : cd test; poetry run ./run_tests.py; cd ..
167
+ - name : lint
168
+ test_script : poetry run flake8
119
169
120
170
wine_builder_task :
121
171
container :
122
- dockerfile : contrib/build.Dockerfile
172
+ dockerfile : contrib/build-wine .Dockerfile
123
173
build_script :
124
174
- contrib/build_wine.sh
125
175
- find dist -type f -exec sha256sum {} \;
126
176
127
177
bitcoind_builder_task :
178
+ container :
179
+ dockerfile : ci/cirrus.Dockerfile
128
180
bitcoind_cache :
129
181
folder : test/work/bitcoin
130
182
ccache_cache :
@@ -138,6 +190,8 @@ bitcoind_builder_task:
138
190
path : " bitcoin.tar.gz"
139
191
140
192
task :
193
+ container :
194
+ dockerfile : ci/cirrus.Dockerfile
141
195
env :
142
196
DEVICE : --trezor-1
143
197
name : Trezor 1 Sim Builder
@@ -150,6 +204,8 @@ task:
150
204
path : " trezor-firmware.tar.gz"
151
205
152
206
task :
207
+ container :
208
+ dockerfile : ci/cirrus.Dockerfile
153
209
env :
154
210
DEVICE : --trezor-t
155
211
name : Trezor T Sim Builder
@@ -162,6 +218,8 @@ task:
162
218
path : " trezor-firmware.tar.gz"
163
219
164
220
task :
221
+ container :
222
+ dockerfile : ci/cirrus.Dockerfile
165
223
env :
166
224
DEVICE : --coldcard
167
225
name : Coldcard Sim Builder
@@ -174,6 +232,8 @@ task:
174
232
path : " coldcard-mpy.tar.gz"
175
233
176
234
task :
235
+ container :
236
+ dockerfile : ci/cirrus.Dockerfile
177
237
env :
178
238
DEVICE : --bitbox01
179
239
name : Bitbox01 Sim Builder
@@ -186,6 +246,22 @@ task:
186
246
path : " mcu.tar.gz"
187
247
188
248
task :
249
+ container :
250
+ dockerfile : ci/cirrus.Dockerfile
251
+ env :
252
+ DEVICE : --jade
253
+ name : Jade Sim Builder
254
+ sim_work_cache :
255
+ folder : test/work/jade
256
+ build_script :
257
+ - cd test; ./setup_environment.sh $DEVICE; cd ..
258
+ - tar -czf jade.tar.gz test/work/jade/simulator
259
+ sim_artifacts :
260
+ path : " jade.tar.gz"
261
+
262
+ task :
263
+ container :
264
+ dockerfile : ci/cirrus.Dockerfile
189
265
env :
190
266
DEVICE : --ledger
191
267
name : Ledger Sim Builder
@@ -198,6 +274,8 @@ task:
198
274
path : " speculos.tar.gz"
199
275
200
276
task :
277
+ container :
278
+ dockerfile : ci/cirrus.Dockerfile
201
279
env :
202
280
DEVICE : --keepkey
203
281
name : Keepkey Sim Builder
@@ -220,20 +298,33 @@ dist_builder_task:
220
298
built_dist_artifacts :
221
299
path : " dist/*"
222
300
301
+ ledger_app_builder_task :
302
+ name : Ledger App Builder
303
+ container :
304
+ image : ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
305
+ build_script :
306
+ - git clone https://github.com/LedgerHQ/app-bitcoin-new.git
307
+ - cd app-bitcoin-new
308
+ - make DEBUG=1
309
+ built_ledger_app_artifacts :
310
+ path : app-bitcoin-new/bin/app.elf
311
+
223
312
task :
313
+ matrix :
314
+ << : *PYTHON_VERSION_MATRIX_TEMPLATE
224
315
matrix :
225
316
<< : *DEVICE_MATRIX_TEMPLATE
226
317
fetch_dist_script :
227
318
- wget -nv "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/dist_builder/built_dist.zip"
228
319
- unzip built_dist.zip
229
320
matrix :
230
- - name : $DEVICE Wheel
321
+ - name : Python $PYTHON $DEVICE Wheel
231
322
install_script : pip install dist/*.whl
232
323
test_script : cd test; ./run_tests.py $DEVICE --interface=cli --device-only; cd ..
233
- - name : $DEVICE Sdist
234
- install_script : pip install $(find dist -name "*.tar.gz" -a -not -name "*amd64 *")
324
+ - name : Python $PYTHON $DEVICE Sdist
325
+ install_script : pip install $(find dist -name "*.tar.gz" -a -not -name "*linux *")
235
326
test_script : cd test; ./run_tests.py $DEVICE --interface=cli --device-only; cd ..
236
- - name : $DEVICE Bindist
327
+ - name : Python $PYTHON $DEVICE Bindist
237
328
install_script : poetry install
238
329
untar_bindist_script : cd dist; tar -xvf hwi*linux*.tar.gz; cd ..
239
330
test_script : cd test; poetry run ./run_tests.py $DEVICE --interface=bindist --device-only; cd ..
@@ -242,26 +333,8 @@ task:
242
333
243
334
task :
244
335
matrix :
245
- - container :
246
- dockerfile : ci/cirrus.Dockerfile
247
- env :
248
- PYTHON : 3.6
249
- - container :
250
- dockerfile : ci/py37.Dockerfile
251
- env :
252
- PYTHON : 3.7
253
- - container :
254
- dockerfile : ci/py38.Dockerfile
255
- env :
256
- PYTHON : 3.8
257
- - container :
258
- dockerfile : ci/py39.Dockerfile
259
- env :
260
- PYTHON : 3.9
261
- - container :
262
- dockerfile : ci/py310.Dockerfile
263
- env :
264
- PYTHON : 3.10
336
+ << : *PYTHON_VERSION_MATRIX_TEMPLATE
337
+ install_script : poetry install
265
338
matrix :
266
339
<< : *DEVICE_MATRIX_TEMPLATE
267
340
matrix :
@@ -272,7 +345,6 @@ task:
272
345
- env :
273
346
INTERFACE : stdin
274
347
name : Python $PYTHON $DEVICE $INTERFACE
275
- install_script : poetry install
276
348
test_script : cd test; poetry run ./run_tests.py $DEVICE --interface=$INTERFACE --device-only; cd ..
277
349
on_failure :
278
350
failed_script : tail -v -n +1 test/*.std*
0 commit comments