-
Notifications
You must be signed in to change notification settings - Fork 12
268 lines (250 loc) · 7.29 KB
/
ci-workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
name: Compilation & tests
on:
push:
pull_request:
types: [opened, reopened]
jobs:
job_build_debug:
name: Build debug
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:sha-73c9e07
steps:
- name: Clone
uses: actions/checkout@v2
- name: Build Nano S
run: |
cd app
make clean
make DEBUG=1
- name: Upload app NanoS binary
uses: actions/upload-artifact@v2
with:
name: boilerplate-app-debug-nanos
path: app/bin
- name: Build Nano X
run: |
cd app
make clean
TARGET_NAME=TARGET_NANOS BOLOS_SDK=$NANOX_SDK make DEBUG=1
- name: Upload app Nano X binary
uses: actions/upload-artifact@v2
with:
name: boilerplate-app-debug-nanox
path: app/bin
- name: Build Nano S+
run: |
cd app
make clean
make glyphs/glyphs.c
cat glyphs/glyphs.h
TARGET_NAME=TARGET_NANOS2 BOLOS_SDK=$NANOSP_SDK make DEBUG=1
- name: Upload app Nano S+ binary
uses: actions/upload-artifact@v2
with:
name: boilerplate-app-debug-nanosp
path: app/bin
job_scan_build:
name: Clang Static Analyzer
needs: job_build_debug
runs-on: ubuntu-latest
container:
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:sha-73c9e07
steps:
- uses: actions/checkout@v2
- name: Build with Clang Static Analyzer
run: |
cd app
make clean
scan-build --use-cc=clang -analyze-headers -enable-checker security -enable-checker unix -enable-checker valist -o scan-build --status-bugs make default
- uses: actions/upload-artifact@v2
if: failure()
with:
name: scan-build
path: scan-build
job_unit_test:
name: C++ unit tests
needs: job_build_debug
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build and run unit tests
run: |
pip3 install conan
export BOLOS_SDK=
make clean
make cpp_test
job_speculos_nanos_tests_5001:
name: NanoS Speculos 5001/3 tests
needs: job_build_debug
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16.10.0
- name: Download app binary
uses: actions/download-artifact@v2
with:
name: boilerplate-app-debug-nanos
path: app/bin
- name: install speculos
run: |
export BOLOS_SDK=
make speculos_install
- name: Run tests
run: |
make speculos_port_5001_test
make speculos_port_5003_test
- name: Upload Speculos 5001s log
uses: actions/upload-artifact@v2
with:
name: speculos-5001s-log
path: tests_speculos/speculos-port-5001.log
- name: Upload Speculos 5003s log
uses: actions/upload-artifact@v2
with:
name: speculos-5001s-log
path: tests_speculos/speculos-port-5003.log
job_speculos_nanos_tests_5002:
name: NanoS Speculos 5002 tests
needs: job_build_debug
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16.10.0
- name: Download app binary
uses: actions/download-artifact@v2
with:
name: boilerplate-app-debug-nanos
path: app/bin
- name: install speculos
run: |
export BOLOS_SDK=
make speculos_install
- name: Run tests
run: |
make speculos_port_5002_test
- name: Upload Speculos log
uses: actions/upload-artifact@v2
with:
name: speculos-5002s-log
path: tests_speculos/speculos-port-5002.log
job_speculos_nanox_tests_5001:
name: NanoX Speculos 5001 tests
needs: job_build_debug
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16.10.0
- name: Download app binary
uses: actions/download-artifact@v2
with:
name: boilerplate-app-debug-nanox
path: app/bin
- name: install speculos
run: |
export BOLOS_SDK=
make speculos_install
- name: Run tests
run: |
TARGET_DEVICE=NANO_X make speculos_port_5001_test
- name: Upload Speculos 5001s log
uses: actions/upload-artifact@v2
with:
name: speculos-5001x-log
path: tests_speculos/speculos-port-5001.log
job_speculos_nanox_tests_5002:
name: NanoX Speculos 5002 tests
needs: job_build_debug
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16.10.0
- name: Download app binary
uses: actions/download-artifact@v2
with:
name: boilerplate-app-debug-nanox
path: app/bin
- name: install speculos
run: |
export BOLOS_SDK=
make speculos_install
- name: Run tests
run: |
TARGET_DEVICE=NANO_X make speculos_port_5002_test
- name: Upload Speculos log
uses: actions/upload-artifact@v2
with:
name: speculos-5002x-log
path: tests_speculos/speculos-port-5002.log
job_speculos_nanosp_tests_5001:
name: NanoS+ Speculos 5001 tests
needs: job_build_debug
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16.10.0
- name: Download app binary
uses: actions/download-artifact@v2
with:
name: boilerplate-app-debug-nanosp
path: app/bin
- name: install speculos
run: |
export BOLOS_SDK=
make speculos_install
- name: Run tests
run: |
TARGET_DEVICE=NANO_SP make speculos_port_5001_test
- name: Upload Speculos 5001s log
uses: actions/upload-artifact@v2
with:
name: speculos-5001sp-log
path: tests_speculos/speculos-port-5001.log
job_speculos_nanosp_tests_5002:
name: NanoS+ Speculos 5002 tests
needs: job_build_debug
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16.10.0
- name: Download app binary
uses: actions/download-artifact@v2
with:
name: boilerplate-app-debug-nanosp
path: app/bin
- name: install speculos
run: |
export BOLOS_SDK=
make speculos_install
- name: Run tests
run: |
TARGET_DEVICE=NANO_SP make speculos_port_5002_test
- name: Upload Speculos log
uses: actions/upload-artifact@v2
with:
name: speculos-5002sp-log
path: tests_speculos/speculos-port-5002.log