@@ -21,29 +21,54 @@ jobs:
21
21
runs-on : ubuntu-20.04
22
22
outputs :
23
23
build-doc : ${{ steps.set-matrix.outputs.build-doc }}
24
+ boards-aarch : ${{ steps.set-matrix.outputs.boards-aarch }}
24
25
boards-arm : ${{ steps.set-matrix.outputs.boards-arm }}
25
- boards-riscv : ${{ steps.set-matrix.outputs.boards-riscv }}
26
26
boards-espressif : ${{ steps.set-matrix.outputs.boards-espressif }}
27
- boards-aarch : ${{ steps.set-matrix.outputs.boards-aarch }}
27
+ boards-riscv : ${{ steps.set-matrix.outputs.boards-riscv }}
28
+ cp-version : ${{ steps.cp-version.outputs.cp-version }}
28
29
steps :
29
30
- name : Dump GitHub context
30
31
run : echo "$GITHUB_CONTEXT"
31
32
env :
32
33
GITHUB_CONTEXT : ${{ toJson(github) }}
33
- - uses : actions/checkout@v3
34
+ - name : Set up repository
35
+ uses : actions/checkout@v3
34
36
with :
35
37
submodules : false
36
38
fetch-depth : 1
37
- - name : Set up Python 3
39
+ - name : Set up python
38
40
uses : actions/setup-python@v4
39
41
with :
40
42
python-version : " 3.x"
41
- - name : Get CP deps
42
- run : python tools/ci_fetch_deps.py test ${{ github.sha }}
43
+ - name : Duplicate USB VID/PID check
44
+ run : python3 -u -m tools.ci_check_duplicate_usb_vid_pid
45
+ - name : Create submodule status
46
+ run : git submodule status extmod/ulab frozen/ lib/ tools/ >> submodule_status
47
+ - name : Cache submodules
48
+ uses : actions/cache@v3
49
+ with :
50
+ path : |
51
+ .git/modules/
52
+ extmod/ulab
53
+ frozen/
54
+ lib/
55
+ tools/
56
+ key : submodules-common-${{ hashFiles('submodule_status') }}
57
+ - name : CircuitPython dependencies
58
+ run : |
59
+ python tools/ci_fetch_deps.py ${{ github.job }}
60
+ echo "::group::Fetch history and tags"
61
+ git fetch --no-recurse-submodules --shallow-since="2021-07-01" --tags https://github.com/adafruit/circuitpython HEAD
62
+ git fetch --no-recurse-submodules --shallow-since="2021-07-01" origin $GITHUB_SHA
63
+ git repack -d
64
+ echo "::endgroup::"
43
65
- name : CircuitPython version
66
+ id : cp-version
44
67
run : |
45
- tools/describe || git log --parents HEAD~4..
46
- echo >>$GITHUB_ENV CP_VERSION=$(tools/describe)
68
+ CP_VERSION=$(tools/describe)
69
+ echo "$CP_VERSION"
70
+ echo "CP_VERSION=$CP_VERSION" >> $GITHUB_ENV
71
+ echo "cp-version=$CP_VERSION" >> $GITHUB_OUTPUT
47
72
- name : Install dependencies
48
73
run : |
49
74
sudo apt-get update
54
79
run : |
55
80
gcc --version
56
81
python3 --version
57
- - name : Duplicate USB VID/PID Check
58
- run : python3 -u -m tools.ci_check_duplicate_usb_vid_pid
59
82
- name : Build mpy-cross
60
83
run : make -C mpy-cross -j2
61
84
- name : Build unix port
@@ -160,25 +183,36 @@ jobs:
160
183
161
184
mpy-cross-mac :
162
185
runs-on : macos-11
186
+ needs : test
187
+ if : ${{ needs.test.outputs.boards-aarch != '[]' || needs.test.outputs.boards-arm != '[]' || needs.scheduler.test.boards-espressif != '[]' || needs.scheduler.test.boards-riscv != '[]' }}
188
+ env :
189
+ CP_VERSION : ${{ needs.test.outputs.cp-version }}
163
190
steps :
164
- - name : Dump GitHub context
165
- env :
166
- GITHUB_CONTEXT : ${{ toJson(github) }}
167
- run : echo "$GITHUB_CONTEXT"
168
- - uses : actions/checkout@v3
191
+ - name : Set up repository
192
+ uses : actions/checkout@v3
169
193
with :
170
194
submodules : false
171
195
fetch-depth : 1
172
- - name : Set up Python 3
196
+ - name : Set up python
173
197
uses : actions/setup-python@v4
174
198
with :
175
- python-version : " 3.10"
176
- - name : Get CP deps
177
- run : python tools/ci_fetch_deps.py mpy-cross-mac ${{ github.sha }}
199
+ python-version : " 3.x"
200
+ - name : Create submodule status
201
+ run : git submodule status extmod/ulab frozen/ lib/ tools/ >> submodule_status
202
+ - name : Restore submodules
203
+ uses : actions/cache/restore@v3
204
+ with :
205
+ path : |
206
+ .git/modules/
207
+ extmod/ulab
208
+ frozen/
209
+ lib/
210
+ tools/
211
+ key : submodules-common-${{ hashFiles('submodule_status') }}
212
+ - name : CircuitPython dependencies
213
+ run : python tools/ci_fetch_deps.py ${{ github.job }}
178
214
- name : CircuitPython version
179
- run : |
180
- tools/describe || git log --parents HEAD~4..
181
- echo >>$GITHUB_ENV CP_VERSION=$(tools/describe)
215
+ run : tools/describe
182
216
- name : Install dependencies
183
217
run : |
184
218
brew install gettext
@@ -222,21 +256,34 @@ jobs:
222
256
runs-on : ubuntu-20.04
223
257
needs : test
224
258
if : ${{ needs.test.outputs.build-doc == 'True' }}
259
+ env :
260
+ CP_VERSION : ${{ needs.test.outputs.cp-version }}
225
261
steps :
226
- - uses : actions/checkout@v3
262
+ - name : Set up repository
263
+ uses : actions/checkout@v3
227
264
with :
228
265
submodules : false
229
266
fetch-depth : 1
230
- - name : Get CP deps
231
- run : python tools/ci_fetch_deps.py docs ${{ github.sha }}
267
+ - name : Create submodule status
268
+ run : git submodule status extmod/ulab frozen/ lib/ tools/ >> submodule_status
269
+ - name : Restore submodules
270
+ uses : actions/cache/restore@v3
271
+ with :
272
+ path : |
273
+ .git/modules/
274
+ extmod/ulab
275
+ frozen/
276
+ lib/
277
+ tools/
278
+ key : submodules-common-${{ hashFiles('submodule_status') }}
279
+ - name : CircuitPython dependencies
280
+ run : python tools/ci_fetch_deps.py ${{ github.job }}
232
281
- name : CircuitPython version
233
- run : |
234
- tools/describe || git log --parents HEAD~4..
235
- echo >>$GITHUB_ENV CP_VERSION=$(tools/describe)
236
- - name : Set up Python 3
282
+ run : tools/describe
283
+ - name : Set up python
237
284
uses : actions/setup-python@v4
238
285
with :
239
- python-version : " 3.10 "
286
+ python-version : " 3.x "
240
287
- name : Install dependencies
241
288
run : |
242
289
sudo apt-get update
@@ -285,22 +332,37 @@ jobs:
285
332
build-arm :
286
333
runs-on : ubuntu-20.04
287
334
needs : test
335
+ if : ${{ needs.test.outputs.boards-arm != '[]' }}
336
+ env :
337
+ CP_VERSION : ${{ needs.test.outputs.cp-version }}
288
338
strategy :
289
339
fail-fast : false
290
340
matrix :
291
341
board : ${{ fromJSON(needs.test.outputs.boards-arm) }}
292
- if : ${{ needs.test.outputs.boards-arm != '[]' }}
293
342
steps :
294
- - name : Set up Python 3
295
- uses : actions/setup-python@v4
296
- with :
297
- python-version : " 3.10"
298
- - uses : actions/checkout@v3
343
+ - name : Set up repository
344
+ uses : actions/checkout@v3
299
345
with :
300
346
submodules : false
301
347
fetch-depth : 1
302
- - name : Get CP deps
303
- run : python tools/ci_fetch_deps.py ${{ matrix.board }} ${{ github.sha }}
348
+ - name : Set up python
349
+ uses : actions/setup-python@v4
350
+ with :
351
+ python-version : " 3.x"
352
+ - name : Create submodule status
353
+ run : git submodule status extmod/ulab frozen/ lib/ tools/ >> submodule_status
354
+ - name : Restore submodules
355
+ uses : actions/cache/restore@v3
356
+ with :
357
+ path : |
358
+ .git/modules/
359
+ extmod/ulab
360
+ frozen/
361
+ lib/
362
+ tools/
363
+ key : submodules-common-${{ hashFiles('submodule_status') }}
364
+ - name : CircuitPython dependencies
365
+ run : python tools/ci_fetch_deps.py ${{ matrix.board }}
304
366
- uses : carlosperate/arm-none-eabi-gcc-action@v1
305
367
with :
306
368
release : ' 10-2020-q4'
@@ -338,22 +400,37 @@ jobs:
338
400
build-riscv :
339
401
runs-on : ubuntu-20.04
340
402
needs : test
403
+ if : ${{ needs.test.outputs.boards-riscv != '[]' }}
404
+ env :
405
+ CP_VERSION : ${{ needs.test.outputs.cp-version }}
341
406
strategy :
342
407
fail-fast : false
343
408
matrix :
344
409
board : ${{ fromJSON(needs.test.outputs.boards-riscv) }}
345
- if : ${{ needs.test.outputs.boards-riscv != '[]' }}
346
410
steps :
347
- - name : Set up Python 3
348
- uses : actions/setup-python@v4
349
- with :
350
- python-version : " 3.10"
351
- - uses : actions/checkout@v3
411
+ - name : Set up repository
412
+ uses : actions/checkout@v3
352
413
with :
353
414
submodules : false
354
415
fetch-depth : 1
355
- - name : Get CP deps
356
- run : python tools/ci_fetch_deps.py ${{ matrix.board }} ${{ github.sha }}
416
+ - name : Set up python
417
+ uses : actions/setup-python@v4
418
+ with :
419
+ python-version : " 3.x"
420
+ - name : Create submodule status
421
+ run : git submodule status extmod/ulab frozen/ lib/ tools/ >> submodule_status
422
+ - name : Restore submodules
423
+ uses : actions/cache/restore@v3
424
+ with :
425
+ path : |
426
+ .git/modules/
427
+ extmod/ulab
428
+ frozen/
429
+ lib/
430
+ tools/
431
+ key : submodules-common-${{ hashFiles('submodule_status') }}
432
+ - name : CircuitPython dependencies
433
+ run : python tools/ci_fetch_deps.py ${{ matrix.board }}
357
434
- name : Install dependencies
358
435
run : |
359
436
sudo apt-get install -y gettext
@@ -390,27 +467,40 @@ jobs:
390
467
build-espressif :
391
468
runs-on : ubuntu-20.04
392
469
needs : test
470
+ if : ${{ needs.test.outputs.boards-espressif != '[]' }}
471
+ env :
472
+ CP_VERSION : ${{ needs.test.outputs.cp-version }}
393
473
strategy :
394
474
fail-fast : false
395
475
matrix :
396
476
board : ${{ fromJSON(needs.test.outputs.boards-espressif) }}
397
- if : ${{ needs.test.outputs.boards-espressif != '[]' }}
398
477
steps :
399
- - name : Set up Python 3
478
+ - name : Set up repository
479
+ uses : actions/checkout@v3
480
+ with :
481
+ submodules : false
482
+ fetch-depth : 1
483
+ - name : Set up python
400
484
id : py3
401
485
uses : actions/setup-python@v4
402
486
with :
403
487
python-version : " 3.10"
404
- - uses : actions/checkout@v3
488
+ - name : Create submodule status
489
+ run : git submodule status extmod/ulab frozen/ lib/ tools/ >> submodule_status
490
+ - name : Restore submodules
491
+ uses : actions/cache/restore@v3
405
492
with :
406
- submodules : false
407
- fetch-depth : 1
408
- - name : Get CP deps
409
- run : python tools/ci_fetch_deps.py ${{ matrix.board }} ${{ github.sha }}
493
+ path : |
494
+ .git/modules/
495
+ extmod/ulab
496
+ frozen/
497
+ lib/
498
+ tools/
499
+ key : submodules-common-${{ hashFiles('submodule_status') }}
500
+ - name : CircuitPython dependencies
501
+ run : python tools/ci_fetch_deps.py ${{ matrix.board }}
410
502
- name : CircuitPython version
411
- run : |
412
- tools/describe || git log --parents HEAD~4..
413
- echo >>$GITHUB_ENV CP_VERSION=$(tools/describe)
503
+ run : tools/describe
414
504
- uses : actions/cache@v3
415
505
name : Fetch IDF tool cache
416
506
id : idf-cache
@@ -481,22 +571,37 @@ jobs:
481
571
build-aarch :
482
572
runs-on : ubuntu-20.04
483
573
needs : test
574
+ if : ${{ needs.test.outputs.boards-aarch != '[]' }}
575
+ env :
576
+ CP_VERSION : ${{ needs.test.outputs.cp-version }}
484
577
strategy :
485
578
fail-fast : false
486
579
matrix :
487
580
board : ${{ fromJSON(needs.test.outputs.boards-aarch) }}
488
- if : ${{ needs.test.outputs.boards-aarch != '[]' }}
489
581
steps :
490
- - name : Set up Python 3
491
- uses : actions/setup-python@v4
492
- with :
493
- python-version : " 3.10"
494
- - uses : actions/checkout@v3
582
+ - name : Set up repository
583
+ uses : actions/checkout@v3
495
584
with :
496
585
submodules : false
497
586
fetch-depth : 1
498
- - name : Get CP deps
499
- run : python tools/ci_fetch_deps.py ${{ matrix.board }} ${{ github.sha }}
587
+ - name : Set up python
588
+ uses : actions/setup-python@v4
589
+ with :
590
+ python-version : " 3.x"
591
+ - name : Create submodule status
592
+ run : git submodule status extmod/ulab frozen/ lib/ tools/ >> submodule_status
593
+ - name : Restore submodules
594
+ uses : actions/cache/restore@v3
595
+ with :
596
+ path : |
597
+ .git/modules/
598
+ extmod/ulab
599
+ frozen/
600
+ lib/
601
+ tools/
602
+ key : submodules-common-${{ hashFiles('submodule_status') }}
603
+ - name : CircuitPython dependencies
604
+ run : python tools/ci_fetch_deps.py ${{ matrix.board }}
500
605
- name : Install dependencies
501
606
run : |
502
607
sudo apt-get install -y gettext mtools
0 commit comments