@@ -16,6 +16,9 @@ concurrency:
16
16
group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
17
17
cancel-in-progress : true
18
18
19
+ env :
20
+ CACHE_SUBMODULES : " ['extmod/ulab', 'lib/', 'tools/']"
21
+
19
22
jobs :
20
23
test :
21
24
runs-on : ubuntu-20.04
@@ -43,15 +46,11 @@ jobs:
43
46
- name : Duplicate USB VID/PID check
44
47
run : python3 -u -m tools.ci_check_duplicate_usb_vid_pid
45
48
- name : Create submodule status
46
- run : git submodule status extmod/ulab lib/ tools/ >> submodule_status
49
+ run : git submodule status ${{ join(fromJSON(env.CACHE_SUBMODULES), ' ') }} >> submodule_status
47
50
- name : Cache submodules
48
51
uses : actions/cache@v3
49
52
with :
50
- path : |
51
- .git/modules/
52
- extmod/ulab
53
- lib/
54
- tools/
53
+ path : " .git/modules/\n ${{ join(fromJSON(env.CACHE_SUBMODULES), '\n ') }}"
55
54
key : submodules-common-${{ hashFiles('submodule_status') }}
56
55
- name : CircuitPython dependencies
57
56
run : |
@@ -137,7 +136,9 @@ jobs:
137
136
name : mpy-cross.static-x64-windows
138
137
path : mpy-cross/mpy-cross.static.exe
139
138
- name : Upload to S3
140
- if : (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
139
+ if : >-
140
+ (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') ||
141
+ (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
141
142
env :
142
143
AWS_PAGER : ' '
143
144
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -184,7 +185,11 @@ jobs:
184
185
mpy-cross-mac :
185
186
runs-on : macos-11
186
187
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
+ if : >-
189
+ needs.test.outputs.boards-aarch != '[]' ||
190
+ needs.test.outputs.boards-arm != '[]' ||
191
+ needs.test.outputs.boards-espressif != '[]' ||
192
+ needs.test.outputs.boards-riscv != '[]'
188
193
env :
189
194
CP_VERSION : ${{ needs.test.outputs.cp-version }}
190
195
steps :
@@ -198,15 +203,11 @@ jobs:
198
203
with :
199
204
python-version : " 3.x"
200
205
- name : Create submodule status
201
- run : git submodule status extmod/ulab lib/ tools/ >> submodule_status
206
+ run : git submodule status ${{ join(fromJSON(env.CACHE_SUBMODULES), ' ') }} >> submodule_status
202
207
- name : Restore submodules
203
208
uses : actions/cache/restore@v3
204
209
with :
205
- path : |
206
- .git/modules/
207
- extmod/ulab
208
- lib/
209
- tools/
210
+ path : " .git/modules/\n ${{ join(fromJSON(env.CACHE_SUBMODULES), '\n ') }}"
210
211
key : submodules-common-${{ hashFiles('submodule_status') }}
211
212
- name : CircuitPython dependencies
212
213
run : python tools/ci_fetch_deps.py ${{ github.job }}
@@ -260,15 +261,11 @@ jobs:
260
261
submodules : false
261
262
fetch-depth : 1
262
263
- name : Create submodule status
263
- run : git submodule status extmod/ulab lib/ tools/ >> submodule_status
264
+ run : git submodule status ${{ join(fromJSON(env.CACHE_SUBMODULES), ' ') }} >> submodule_status
264
265
- name : Restore submodules
265
266
uses : actions/cache/restore@v3
266
267
with :
267
- path : |
268
- .git/modules/
269
- extmod/ulab
270
- lib/
271
- tools/
268
+ path : " .git/modules/\n ${{ join(fromJSON(env.CACHE_SUBMODULES), '\n ') }}"
272
269
key : submodules-common-${{ hashFiles('submodule_status') }}
273
270
- name : CircuitPython dependencies
274
271
run : python tools/ci_fetch_deps.py ${{ github.job }}
@@ -304,7 +301,9 @@ jobs:
304
301
name : docs
305
302
path : _build/latex
306
303
- name : Upload to S3
307
- if : (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
304
+ if : >-
305
+ (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') ||
306
+ (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
308
307
env :
309
308
AWS_PAGER : ' '
310
309
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -345,15 +344,11 @@ jobs:
345
344
with :
346
345
python-version : " 3.x"
347
346
- name : Create submodule status
348
- run : git submodule status extmod/ulab lib/ tools/ >> submodule_status
347
+ run : git submodule status ${{ join(fromJSON(env.CACHE_SUBMODULES), ' ') }} >> submodule_status
349
348
- name : Restore submodules
350
349
uses : actions/cache/restore@v3
351
350
with :
352
- path : |
353
- .git/modules/
354
- extmod/ulab
355
- lib/
356
- tools/
351
+ path : " .git/modules/\n ${{ join(fromJSON(env.CACHE_SUBMODULES), '\n ') }}"
357
352
key : submodules-common-${{ hashFiles('submodule_status') }}
358
353
- name : CircuitPython dependencies
359
354
id : cp-deps
@@ -398,14 +393,16 @@ jobs:
398
393
name : ${{ matrix.board }}
399
394
path : bin/${{ matrix.board }}
400
395
- name : Upload to S3
396
+ if : >-
397
+ (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') ||
398
+ (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
401
399
run : |
402
400
pip install awscli
403
- " [ -z \ "$AWS_ACCESS_KEY_ID\ " ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
401
+ [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1
404
402
env :
405
403
AWS_PAGER : ' '
406
404
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
407
405
AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
408
- if : (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
409
406
410
407
411
408
build-arm :
@@ -429,15 +426,11 @@ jobs:
429
426
with :
430
427
python-version : " 3.x"
431
428
- name : Create submodule status
432
- run : git submodule status extmod/ulab lib/ tools/ >> submodule_status
429
+ run : git submodule status ${{ join(fromJSON(env.CACHE_SUBMODULES), ' ') }} >> submodule_status
433
430
- name : Restore submodules
434
431
uses : actions/cache/restore@v3
435
432
with :
436
- path : |
437
- .git/modules/
438
- extmod/ulab
439
- lib/
440
- tools/
433
+ path : " .git/modules/\n ${{ join(fromJSON(env.CACHE_SUBMODULES), '\n ') }}"
441
434
key : submodules-common-${{ hashFiles('submodule_status') }}
442
435
- name : CircuitPython dependencies
443
436
id : cp-deps
@@ -469,14 +462,17 @@ jobs:
469
462
name : ${{ matrix.board }}
470
463
path : bin/${{ matrix.board }}
471
464
- name : Upload to S3
465
+ if : >-
466
+ (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') ||
467
+ (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
472
468
run : |
473
469
pip install awscli
474
- " [ -z \ "$AWS_ACCESS_KEY_ID\ " ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
470
+ [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1
475
471
env :
476
472
AWS_PAGER : ' '
477
473
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
478
474
AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
479
- if : (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
475
+
480
476
481
477
482
478
build-espressif :
@@ -503,15 +499,11 @@ jobs:
503
499
with :
504
500
python-version : " 3.10"
505
501
- name : Create submodule status
506
- run : git submodule status extmod/ulab lib/ tools/ >> submodule_status
502
+ run : git submodule status ${{ join(fromJSON(env.CACHE_SUBMODULES), ' ') }} >> submodule_status
507
503
- name : Restore submodules
508
504
uses : actions/cache/restore@v3
509
505
with :
510
- path : |
511
- .git/modules/
512
- extmod/ulab
513
- lib/
514
- tools/
506
+ path : " .git/modules/\n ${{ join(fromJSON(env.CACHE_SUBMODULES), '\n ') }}"
515
507
key : submodules-common-${{ hashFiles('submodule_status') }}
516
508
- name : Get IDF commit
517
509
id : idf-commit
@@ -535,7 +527,7 @@ jobs:
535
527
uses : actions/cache@v3
536
528
with :
537
529
path : ${{ env.IDF_TOOLS_PATH }}
538
- key : ${{ runner.os }}-idf-tools- ${{ steps.idf-commit .outputs.commit }}-${{ steps.setup-python .outputs.python-version }}
530
+ key : ${{ runner.os }}-Python- ${{ steps.setup-python .outputs.python-version }}-tools-idf- ${{ steps.idf-commit .outputs.commit }}
539
531
- name : Clone IDF submodules
540
532
run : git submodule update --init --depth=1
541
533
working-directory : ${{ env.IDF_PATH }}
@@ -576,14 +568,16 @@ jobs:
576
568
name : ${{ matrix.board }}
577
569
path : bin/${{ matrix.board }}
578
570
- name : Upload to S3
571
+ if : >-
572
+ (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') ||
573
+ (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
579
574
run : |
580
575
pip install awscli
581
- " [ -z \ "$AWS_ACCESS_KEY_ID\ " ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
576
+ [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1
582
577
env :
583
578
AWS_PAGER : ' '
584
579
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
585
580
AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
586
- if : (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
587
581
588
582
589
583
build-riscv :
@@ -607,15 +601,11 @@ jobs:
607
601
with :
608
602
python-version : " 3.x"
609
603
- name : Create submodule status
610
- run : git submodule status extmod/ulab lib/ tools/ >> submodule_status
604
+ run : git submodule status ${{ join(fromJSON(env.CACHE_SUBMODULES), ' ') }} >> submodule_status
611
605
- name : Restore submodules
612
606
uses : actions/cache/restore@v3
613
607
with :
614
- path : |
615
- .git/modules/
616
- extmod/ulab
617
- lib/
618
- tools/
608
+ path : " .git/modules/\n ${{ join(fromJSON(env.CACHE_SUBMODULES), '\n ') }}"
619
609
key : submodules-common-${{ hashFiles('submodule_status') }}
620
610
- name : CircuitPython dependencies
621
611
id : cp-deps
@@ -646,11 +636,13 @@ jobs:
646
636
name : ${{ matrix.board }}
647
637
path : bin/${{ matrix.board }}
648
638
- name : Upload to S3
639
+ if : >-
640
+ (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') ||
641
+ (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
649
642
run : |
650
643
pip install awscli
651
- " [ -z \ "$AWS_ACCESS_KEY_ID\ " ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
644
+ [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1
652
645
env :
653
646
AWS_PAGER : ' '
654
647
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
655
648
AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
656
- if : (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
0 commit comments