Skip to content

Commit d9adf25

Browse files
committed
Only used cached NanoPB if necessary
1 parent 453dc6d commit d9adf25

File tree

1 file changed

+153
-63
lines changed

1 file changed

+153
-63
lines changed

.github/workflows/build-clang-doxy.yml

Lines changed: 153 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,28 @@ jobs:
5555
git clone --quiet https://github.com/adafruit/Adafruit_TinyUSB_Arduino /home/runner/Arduino/libraries/Adafruit_TinyUSB_Arduino
5656
git clone --depth 1 --branch wippersnapper https://github.com/brentru/lvgl.git /home/runner/Arduino/libraries/lvgl
5757
git clone --depth 1 --branch development https://github.com/brentru/Adafruit_LvGL_Glue.git /home/runner/Arduino/libraries/Adafruit_LittlevGL_Glue_Library
58-
- name: Cache nanopb
59-
id: cache-nanopb
60-
uses: actions/cache@v4
58+
- name: Download stable Nanopb
59+
continue-on-error: true
60+
run: |
61+
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.8.tar.gz
62+
- if: failure()
63+
name: Restore cached nanopb
64+
id: cache-nanopb-restore
65+
uses: actions/cache/restore@v4
66+
env:
67+
cache-name: cache-node-modules
68+
with:
69+
path: ./nanopb-0.4.8.tar.gz
70+
key: nanopb-0.4.8.tar.gz
71+
- if: !failure()
72+
name: Save nanopb to cache
73+
id: cache-nanopb-save
74+
uses: actions/cache/save@v4
6175
env:
6276
cache-name: cache-node-modules
6377
with:
6478
path: ./nanopb-0.4.8.tar.gz
6579
key: nanopb-0.4.8.tar.gz
66-
- if: ${{ steps.cache-nanopb.outputs.cache-hit != 'true' }}
67-
name: Download stable Nanopb
68-
run: |
69-
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.8.tar.gz
7080
- name: Install stable Nanopb
7181
run: |
7282
tar -xf nanopb-0.4.8.tar.gz
@@ -209,18 +219,28 @@ jobs:
209219
git clone --quiet https://github.com/adafruit/Adafruit_TinyUSB_Arduino /home/runner/Arduino/libraries/Adafruit_TinyUSB_Arduino
210220
git clone --depth 1 --branch wippersnapper https://github.com/brentru/lvgl.git /home/runner/Arduino/libraries/lvgl
211221
git clone --depth 1 --branch development https://github.com/brentru/Adafruit_LvGL_Glue.git /home/runner/Arduino/libraries/Adafruit_LittlevGL_Glue_Library
212-
- name: Cache nanopb
213-
id: cache-nanopb
214-
uses: actions/cache@v4
222+
- name: Download stable Nanopb
223+
continue-on-error: true
224+
run: |
225+
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.8.tar.gz
226+
- if: failure()
227+
name: Restore cached nanopb
228+
id: cache-nanopb-restore
229+
uses: actions/cache/restore@v4
230+
env:
231+
cache-name: cache-node-modules
232+
with:
233+
path: ./nanopb-0.4.8.tar.gz
234+
key: nanopb-0.4.8.tar.gz
235+
- if: !failure()
236+
name: Save nanopb to cache
237+
id: cache-nanopb-save
238+
uses: actions/cache/save@v4
215239
env:
216240
cache-name: cache-node-modules
217241
with:
218242
path: ./nanopb-0.4.8.tar.gz
219243
key: nanopb-0.4.8.tar.gz
220-
- if: ${{ steps.cache-nanopb.outputs.cache-hit != 'true' }}
221-
name: Download stable Nanopb
222-
run: |
223-
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.8.tar.gz
224244
- name: Install stable Nanopb
225245
run: |
226246
tar -xf nanopb-0.4.8.tar.gz
@@ -298,18 +318,28 @@ jobs:
298318
run: |
299319
git clone --quiet https://github.com/milesburton/Arduino-Temperature-Control-Library.git /home/runner/Arduino/libraries/Arduino-Temperature-Control-Library
300320
git clone --quiet https://github.com/pstolarz/OneWireNg.git /home/runner/Arduino/libraries/OneWireNg
301-
- name: Cache nanopb
302-
id: cache-nanopb
303-
uses: actions/cache@v4
321+
- name: Download stable Nanopb
322+
continue-on-error: true
323+
run: |
324+
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.8.tar.gz
325+
- if: failure()
326+
name: Restore cached nanopb
327+
id: cache-nanopb-restore
328+
uses: actions/cache/restore@v4
329+
env:
330+
cache-name: cache-node-modules
331+
with:
332+
path: ./nanopb-0.4.8.tar.gz
333+
key: nanopb-0.4.8.tar.gz
334+
- if: !failure()
335+
name: Save nanopb to cache
336+
id: cache-nanopb-save
337+
uses: actions/cache/save@v4
304338
env:
305339
cache-name: cache-node-modules
306340
with:
307341
path: ./nanopb-0.4.8.tar.gz
308342
key: nanopb-0.4.8.tar.gz
309-
- if: ${{ steps.cache-nanopb.outputs.cache-hit != 'true' }}
310-
name: Download stable Nanopb
311-
run: |
312-
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.8.tar.gz
313343
- name: Install stable Nanopb
314344
run: |
315345
tar -xf nanopb-0.4.8.tar.gz
@@ -415,18 +445,28 @@ jobs:
415445
git clone --quiet https://github.com/milesburton/Arduino-Temperature-Control-Library.git /home/runner/Arduino/libraries/Arduino-Temperature-Control-Library
416446
git clone --quiet https://github.com/PaulStoffregen/OneWire.git /home/runner/Arduino/libraries/OneWire
417447
git clone --quiet https://github.com/adafruit/Adafruit_TinyUSB_Arduino /home/runner/Arduino/libraries/Adafruit_TinyUSB_Arduino
418-
- name: Cache nanopb
419-
id: cache-nanopb
420-
uses: actions/cache@v4
448+
- name: Download stable Nanopb
449+
continue-on-error: true
450+
run: |
451+
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.8.tar.gz
452+
- if: failure()
453+
name: Restore cached nanopb
454+
id: cache-nanopb-restore
455+
uses: actions/cache/restore@v4
456+
env:
457+
cache-name: cache-node-modules
458+
with:
459+
path: ./nanopb-0.4.8.tar.gz
460+
key: nanopb-0.4.8.tar.gz
461+
- if: !failure()
462+
name: Save nanopb to cache
463+
id: cache-nanopb-save
464+
uses: actions/cache/save@v4
421465
env:
422466
cache-name: cache-node-modules
423467
with:
424468
path: ./nanopb-0.4.8.tar.gz
425469
key: nanopb-0.4.8.tar.gz
426-
- if: ${{ steps.cache-nanopb.outputs.cache-hit != 'true' }}
427-
name: Download stable Nanopb
428-
run: |
429-
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.8.tar.gz
430470
- name: Install stable Nanopb
431471
run: |
432472
tar -xf nanopb-0.4.8.tar.gz
@@ -477,18 +517,28 @@ jobs:
477517
git clone --quiet https://github.com/pstolarz/OneWireNg.git /home/runner/Arduino/libraries/OneWireNg
478518
git clone --quiet https://github.com/pstolarz/Arduino-Temperature-Control-Library.git /home/runner/Arduino/libraries/Arduino-Temperature-Control-Library
479519
git clone --quiet https://github.com/adafruit/Adafruit_TinyUSB_Arduino /home/runner/Arduino/libraries/Adafruit_TinyUSB_Arduino
480-
- name: Cache nanopb
481-
id: cache-nanopb
482-
uses: actions/cache@v4
520+
- name: Download stable Nanopb
521+
continue-on-error: true
522+
run: |
523+
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.8.tar.gz
524+
- if: failure()
525+
name: Restore cached nanopb
526+
id: cache-nanopb-restore
527+
uses: actions/cache/restore@v4
528+
env:
529+
cache-name: cache-node-modules
530+
with:
531+
path: ./nanopb-0.4.8.tar.gz
532+
key: nanopb-0.4.8.tar.gz
533+
- if: !failure()
534+
name: Save nanopb to cache
535+
id: cache-nanopb-save
536+
uses: actions/cache/save@v4
483537
env:
484538
cache-name: cache-node-modules
485539
with:
486540
path: ./nanopb-0.4.8.tar.gz
487541
key: nanopb-0.4.8.tar.gz
488-
- if: ${{ steps.cache-nanopb.outputs.cache-hit != 'true' }}
489-
name: Download stable Nanopb
490-
run: |
491-
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.8.tar.gz
492542
- name: Install stable Nanopb
493543
run: |
494544
tar -xf nanopb-0.4.8.tar.gz
@@ -538,18 +588,28 @@ jobs:
538588
git clone --quiet https://github.com/arduino-libraries/Servo.git /home/runner/Arduino/libraries/Servo
539589
git clone --quiet https://github.com/milesburton/Arduino-Temperature-Control-Library.git /home/runner/Arduino/libraries/Arduino-Temperature-Control-Library
540590
git clone --quiet https://github.com/PaulStoffregen/OneWire.git /home/runner/Arduino/libraries/OneWire
541-
- name: Cache nanopb
542-
id: cache-nanopb
543-
uses: actions/cache@v4
591+
- name: Download stable Nanopb
592+
continue-on-error: true
593+
run: |
594+
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.8.tar.gz
595+
- if: failure()
596+
name: Restore cached nanopb
597+
id: cache-nanopb-restore
598+
uses: actions/cache/restore@v4
599+
env:
600+
cache-name: cache-node-modules
601+
with:
602+
path: ./nanopb-0.4.8.tar.gz
603+
key: nanopb-0.4.8.tar.gz
604+
- if: !failure()
605+
name: Save nanopb to cache
606+
id: cache-nanopb-save
607+
uses: actions/cache/save@v4
544608
env:
545609
cache-name: cache-node-modules
546610
with:
547611
path: ./nanopb-0.4.8.tar.gz
548612
key: nanopb-0.4.8.tar.gz
549-
- if: ${{ steps.cache-nanopb.outputs.cache-hit != 'true' }}
550-
name: Download stable Nanopb
551-
run: |
552-
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.8.tar.gz
553613
- name: Install stable Nanopb
554614
run: |
555615
tar -xf nanopb-0.4.8.tar.gz
@@ -587,18 +647,28 @@ jobs:
587647
run: |
588648
git clone --quiet https://github.com/milesburton/Arduino-Temperature-Control-Library.git /home/runner/Arduino/libraries/Arduino-Temperature-Control-Library
589649
git clone --quiet https://github.com/PaulStoffregen/OneWire.git /home/runner/Arduino/libraries/OneWire
590-
- name: Cache nanopb
591-
id: cache-nanopb
592-
uses: actions/cache@v4
650+
- name: Download stable Nanopb
651+
continue-on-error: true
652+
run: |
653+
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.8.tar.gz
654+
- if: failure()
655+
name: Restore cached nanopb
656+
id: cache-nanopb-restore
657+
uses: actions/cache/restore@v4
658+
env:
659+
cache-name: cache-node-modules
660+
with:
661+
path: ./nanopb-0.4.8.tar.gz
662+
key: nanopb-0.4.8.tar.gz
663+
- if: !failure()
664+
name: Save nanopb to cache
665+
id: cache-nanopb-save
666+
uses: actions/cache/save@v4
593667
env:
594668
cache-name: cache-node-modules
595669
with:
596670
path: ./nanopb-0.4.8.tar.gz
597671
key: nanopb-0.4.8.tar.gz
598-
- if: ${{ steps.cache-nanopb.outputs.cache-hit != 'true' }}
599-
name: Download stable Nanopb
600-
run: |
601-
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.8.tar.gz
602672
- name: Install stable Nanopb
603673
run: |
604674
tar -xf nanopb-0.4.8.tar.gz
@@ -670,18 +740,28 @@ jobs:
670740
git clone --quiet https://github.com/adafruit/Adafruit_TinyUSB_Arduino /home/runner/Arduino/libraries/Adafruit_TinyUSB_Arduino
671741
git clone --depth 1 --branch wippersnapper https://github.com/brentru/lvgl.git /home/runner/Arduino/libraries/lvgl
672742
git clone --depth 1 --branch development https://github.com/brentru/Adafruit_LvGL_Glue.git /home/runner/Arduino/libraries/Adafruit_LittlevGL_Glue_Library
673-
- name: Cache nanopb
674-
id: cache-nanopb
675-
uses: actions/cache@v4
743+
- name: Download stable Nanopb
744+
continue-on-error: true
745+
run: |
746+
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.8.tar.gz
747+
- if: failure()
748+
name: Restore cached nanopb
749+
id: cache-nanopb-restore
750+
uses: actions/cache/restore@v4
751+
env:
752+
cache-name: cache-node-modules
753+
with:
754+
path: ./nanopb-0.4.8.tar.gz
755+
key: nanopb-0.4.8.tar.gz
756+
- if: !failure()
757+
name: Save nanopb to cache
758+
id: cache-nanopb-save
759+
uses: actions/cache/save@v4
676760
env:
677761
cache-name: cache-node-modules
678762
with:
679763
path: ./nanopb-0.4.8.tar.gz
680764
key: nanopb-0.4.8.tar.gz
681-
- if: ${{ steps.cache-nanopb.outputs.cache-hit != 'true' }}
682-
name: Download stable Nanopb
683-
run: |
684-
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.8.tar.gz
685765
- name: Install stable Nanopb
686766
run: |
687767
tar -xf nanopb-0.4.8.tar.gz
@@ -752,18 +832,28 @@ jobs:
752832
run: |
753833
git clone --quiet https://github.com/milesburton/Arduino-Temperature-Control-Library.git /home/runner/Arduino/libraries/Arduino-Temperature-Control-Library
754834
git clone --quiet https://github.com/pstolarz/OneWireNg.git /home/runner/Arduino/libraries/OneWireNg
755-
- name: Cache nanopb
756-
id: cache-nanopb
757-
uses: actions/cache@v4
835+
- name: Download stable Nanopb
836+
continue-on-error: true
837+
run: |
838+
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.8.tar.gz
839+
- if: failure()
840+
name: Restore cached nanopb
841+
id: cache-nanopb-restore
842+
uses: actions/cache/restore@v4
843+
env:
844+
cache-name: cache-node-modules
845+
with:
846+
path: ./nanopb-0.4.8.tar.gz
847+
key: nanopb-0.4.8.tar.gz
848+
- if: !failure()
849+
name: Save nanopb to cache
850+
id: cache-nanopb-save
851+
uses: actions/cache/save@v4
758852
env:
759853
cache-name: cache-node-modules
760854
with:
761855
path: ./nanopb-0.4.8.tar.gz
762856
key: nanopb-0.4.8.tar.gz
763-
- if: ${{ steps.cache-nanopb.outputs.cache-hit != 'true' }}
764-
name: Download stable Nanopb
765-
run: |
766-
wget https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.8.tar.gz
767857
- name: Install stable Nanopb
768858
run: |
769859
tar -xf nanopb-0.4.8.tar.gz

0 commit comments

Comments
 (0)