Skip to content

Commit b12572a

Browse files
committed
Print build dependencies on boot
1 parent 6e49411 commit b12572a

File tree

5 files changed

+88
-47
lines changed

5 files changed

+88
-47
lines changed

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

Lines changed: 51 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313

1414
jobs:
1515
build-esp32sx-esptool:
16-
name: Build ESP32-Sx
16+
name: 🏗️ESP32-Sx
1717
runs-on: ubuntu-latest
1818
strategy:
1919
fail-fast: false
@@ -22,7 +22,7 @@ jobs:
2222
include:
2323
- offset: "0x1000"
2424
steps:
25-
- uses: actions/setup-python@v4
25+
- uses: actions/setup-python@v5
2626
with:
2727
python-version: "3.x"
2828
- uses: actions/checkout@v4
@@ -33,9 +33,9 @@ jobs:
3333
echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags)
3434
- uses: actions/checkout@v4
3535
with:
36-
repository: adafruit/ci-arduino
36+
repository: tyeth/ci-arduino
37+
ref: WS_ARDUINO_598-preprocessor-script-for-printing-the-library-versions-to-boot_outtxt
3738
path: ci
38-
ref: ci-wippersnapper
3939
- name: Checkout Board Definitions
4040
uses: actions/checkout@v4
4141
with:
@@ -72,8 +72,8 @@ jobs:
7272
- name: Install Dependencies (esptool)
7373
run: |
7474
pip3 install esptool
75-
- name: Build for ESP32-SX
76-
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000
75+
- name: Build for ESP32-SX (esptool)
76+
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000 --include_print_dependencies_header ./src/print_dependencies.h
7777
- name: list files
7878
run: |
7979
ls -Rla examples/
@@ -100,7 +100,7 @@ jobs:
100100
} >> "$GITHUB_OUTPUT"
101101
- name: Check boot_app0 file existence (esp32sx built from core, not-source)
102102
id: check_files
103-
uses: andstor/file-existence-action@v2
103+
uses: andstor/file-existence-action@v3
104104
with:
105105
files: "/home/runner/.arduino15/packages/esp32/hardware/esp32/*/tools/partitions/boot_app0.bin"
106106
- name: list arduino esp32 core files
@@ -150,7 +150,7 @@ jobs:
150150
wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.uf2
151151
152152
build-esp32sx:
153-
name: Build ESP32-Sx
153+
name: 🏗️ESP32-Sx
154154
runs-on: ubuntu-latest
155155
strategy:
156156
fail-fast: false
@@ -171,7 +171,7 @@ jobs:
171171
"qtpy_esp32s3_n4r2",
172172
]
173173
steps:
174-
- uses: actions/setup-python@v4
174+
- uses: actions/setup-python@v5
175175
with:
176176
python-version: "3.x"
177177
- uses: actions/checkout@v4
@@ -182,9 +182,9 @@ jobs:
182182
echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags)
183183
- uses: actions/checkout@v4
184184
with:
185-
repository: adafruit/ci-arduino
185+
repository: tyeth/ci-arduino
186+
ref: WS_ARDUINO_598-preprocessor-script-for-printing-the-library-versions-to-boot_outtxt
186187
path: ci
187-
ref: ci-wippersnapper
188188
- name: Install CI-Arduino
189189
run: bash ci/actions_install.sh
190190
- name: Install extra Arduino libraries
@@ -214,11 +214,11 @@ jobs:
214214
run: |
215215
cp /home/runner/Arduino/libraries/Adafruit_LittlevGL_Glue_Library/lv_conf.h /home/runner/Arduino/libraries
216216
- name: Build for ESP32-SX
217-
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000
218-
- name: list
219217
run: |
220-
ls
221-
ls examples/*/build/
218+
python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000 --include_print_dependencies_header ./src/print_dependencies.h
219+
- name: list files (tree)
220+
run: |
221+
tree
222222
- name: Rename build artifacts to reflect the platform name
223223
run: |
224224
mv examples/*/build/*/Wippersnapper_demo.ino.uf2 wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.uf2
@@ -232,7 +232,7 @@ jobs:
232232
wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.bin
233233
234234
build-esp32:
235-
name: Build ESP32 and Cx
235+
name: 🏗️ESP32, ESP32-C3
236236
runs-on: ubuntu-latest
237237
strategy:
238238
fail-fast: false
@@ -253,7 +253,7 @@ jobs:
253253
- offset: "0x0"
254254
arduino-platform: "wippersnapper_feather_esp32c6"
255255
steps:
256-
- uses: actions/setup-python@v4
256+
- uses: actions/setup-python@v5
257257
with:
258258
python-version: "3.x"
259259
- uses: actions/checkout@v4
@@ -264,9 +264,9 @@ jobs:
264264
echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags)
265265
- uses: actions/checkout@v4
266266
with:
267-
repository: adafruit/ci-arduino
267+
repository: tyeth/ci-arduino
268+
ref: WS_ARDUINO_598-preprocessor-script-for-printing-the-library-versions-to-boot_outtxt
268269
path: ci
269-
ref: ci-wippersnapper
270270
- name: Checkout Board Definitions
271271
uses: actions/checkout@v4
272272
with:
@@ -290,7 +290,7 @@ jobs:
290290
run: |
291291
pip3 install esptool
292292
- name: build ESP32 platforms
293-
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000
293+
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000 --include_print_dependencies_header ./src/print_dependencies.h
294294
- name: Check artifacts
295295
run: |
296296
ls examples/Wippersnapper_demo/build/*
@@ -303,7 +303,7 @@ jobs:
303303
mv examples/Wippersnapper_demo/build/*/Wippersnapper_demo.ino.partitions.bin wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.partitions.bin
304304
- name: Check boot_app0 file existence (esp32 built from core, not-source)
305305
id: check_files
306-
uses: andstor/file-existence-action@v2
306+
uses: andstor/file-existence-action@v3
307307
with:
308308
files: "/home/runner/.arduino15/packages/esp32/hardware/esp32/*/tools/partitions/boot_app0.bin"
309309
- name: boot_app0 file from arduino-cli core
@@ -350,7 +350,7 @@ jobs:
350350
wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.zip
351351
352352
build-samd:
353-
name: Build WipperSnapper SAMD
353+
name: 🏗️SAMD
354354
runs-on: ubuntu-latest
355355
strategy:
356356
fail-fast: false
@@ -362,7 +362,7 @@ jobs:
362362
"metro_m4_airliftlite_tinyusb",
363363
]
364364
steps:
365-
- uses: actions/setup-python@v4
365+
- uses: actions/setup-python@v5
366366
with:
367367
python-version: "3.x"
368368
- uses: actions/checkout@v4
@@ -373,7 +373,8 @@ jobs:
373373
echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags)
374374
- uses: actions/checkout@v4
375375
with:
376-
repository: adafruit/ci-arduino
376+
repository: tyeth/ci-arduino
377+
ref: WS_ARDUINO_598-preprocessor-script-for-printing-the-library-versions-to-boot_outtxt
377378
path: ci
378379
- name: Install CI-Arduino
379380
run: bash ci/actions_install.sh
@@ -392,8 +393,8 @@ jobs:
392393
# Copy files to WipperSnapper's src/nanopb directory
393394
cp nanopb/pb_common.* nanopb/pb_encode.* nanopb/pb_decode.* src/nanopb
394395
mv nanopb/pb.h src/nanopb/nanopb.pb.h
395-
- name: build platforms
396-
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000
396+
- name: build SAMD platforms
397+
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000 --include_print_dependencies_header ./src/print_dependencies.h
397398
- name: Rename build artifacts to reflect the platform name
398399
run: |
399400
mv examples/*/build/*/Wippersnapper_demo.ino.uf2 wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.uf2
@@ -407,14 +408,14 @@ jobs:
407408
wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.hex
408409
409410
build-rp2040:
410-
name: Build WipperSnapper RP2040
411+
name: 🏗️RP2040
411412
runs-on: ubuntu-latest
412413
strategy:
413414
fail-fast: false
414415
matrix:
415416
arduino-platform: ["picow_rp2040_tinyusb"]
416417
steps:
417-
- uses: actions/setup-python@v4
418+
- uses: actions/setup-python@v5
418419
with:
419420
python-version: "3.x"
420421
- uses: actions/checkout@v4
@@ -425,7 +426,8 @@ jobs:
425426
echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags)
426427
- uses: actions/checkout@v4
427428
with:
428-
repository: adafruit/ci-arduino
429+
repository: tyeth/ci-arduino
430+
ref: WS_ARDUINO_598-preprocessor-script-for-printing-the-library-versions-to-boot_outtxt
429431
path: ci
430432
- name: Install CI-Arduino
431433
run: bash ci/actions_install.sh
@@ -443,8 +445,8 @@ jobs:
443445
# Copy files to WipperSnapper's src/nanopb directory
444446
cp nanopb/pb_common.* nanopb/pb_encode.* nanopb/pb_decode.* src/nanopb
445447
mv nanopb/pb.h src/nanopb/nanopb.pb.h
446-
- name: build platforms
447-
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000
448+
- name: build RP2040 platforms
449+
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000 --include_print_dependencies_header ./src/print_dependencies.h
448450
- name: Rename build artifacts to reflect the platform name
449451
run: |
450452
mv examples/*/build/*/Wippersnapper_demo.ino.uf2 wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.uf2
@@ -457,14 +459,14 @@ jobs:
457459
458460
# NOTE: This does NOT release artifacts, it only builds
459461
build-samd-non-fs:
460-
name: Build WipperSnapper SAMD (NO-TINYUSB)
462+
name: 🏗️SAMD (NO-TINYUSB)
461463
runs-on: ubuntu-latest
462464
strategy:
463465
fail-fast: false
464466
matrix:
465467
arduino-platform: ["mkrwifi1010", "nano_33_iot"]
466468
steps:
467-
- uses: actions/setup-python@v4
469+
- uses: actions/setup-python@v5
468470
with:
469471
python-version: "3.x"
470472
- uses: actions/checkout@v4
@@ -475,7 +477,8 @@ jobs:
475477
echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags)
476478
- uses: actions/checkout@v4
477479
with:
478-
repository: adafruit/ci-arduino
480+
repository: tyeth/ci-arduino
481+
ref: WS_ARDUINO_598-preprocessor-script-for-printing-the-library-versions-to-boot_outtxt
479482
path: ci
480483
- name: Install CI-Arduino
481484
run: bash ci/actions_install.sh
@@ -493,18 +496,18 @@ jobs:
493496
# Copy files to WipperSnapper's src/nanopb directory
494497
cp nanopb/pb_common.* nanopb/pb_encode.* nanopb/pb_decode.* src/nanopb
495498
mv nanopb/pb.h src/nanopb/nanopb.pb.h
496-
- name: build platforms
497-
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000
499+
- name: build SAMD (no-FS) platforms
500+
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000 --include_print_dependencies_header ./src/print_dependencies.h
498501

499502
build-esp8266:
500-
name: Build WipperSnapper ESP8266
503+
name: 🏗️ESP8266
501504
runs-on: ubuntu-latest
502505
strategy:
503506
fail-fast: false
504507
matrix:
505508
arduino-platform: ["feather_esp8266"]
506509
steps:
507-
- uses: actions/setup-python@v4
510+
- uses: actions/setup-python@v5
508511
with:
509512
python-version: "3.x"
510513
- uses: actions/checkout@v4
@@ -515,7 +518,8 @@ jobs:
515518
echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags)
516519
- uses: actions/checkout@v4
517520
with:
518-
repository: adafruit/ci-arduino
521+
repository: tyeth/ci-arduino
522+
ref: WS_ARDUINO_598-preprocessor-script-for-printing-the-library-versions-to-boot_outtxt
519523
path: ci
520524
- name: Install CI-Arduino
521525
run: bash ci/actions_install.sh
@@ -531,8 +535,8 @@ jobs:
531535
# Copy files to WipperSnapper's src/nanopb directory
532536
cp nanopb/pb_common.* nanopb/pb_encode.* nanopb/pb_decode.* src/nanopb
533537
mv nanopb/pb.h src/nanopb/nanopb.pb.h
534-
- name: build platforms
535-
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000
538+
- name: build ESP8266 platforms
539+
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000 --include_print_dependencies_header ./src/print_dependencies.h
536540
- name: list build artifacts
537541
run: |
538542
ls
@@ -553,7 +557,7 @@ jobs:
553557
wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.zip
554558
555559
build-esp32sx-dev:
556-
name: Build WipperSnapper ESP32-Sx DEV BUILDS
560+
name: 🏗️ESP32-Sx DEV BUILDS
557561
runs-on: ubuntu-latest
558562
strategy:
559563
fail-fast: false
@@ -567,7 +571,7 @@ jobs:
567571
"feather_esp32s3_tft_debug",
568572
]
569573
steps:
570-
- uses: actions/setup-python@v4
574+
- uses: actions/setup-python@v5
571575
with:
572576
python-version: "3.x"
573577
- uses: actions/checkout@v4
@@ -578,9 +582,9 @@ jobs:
578582
echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags)
579583
- uses: actions/checkout@v4
580584
with:
581-
repository: adafruit/ci-arduino
585+
repository: tyeth/ci-arduino
586+
ref: WS_ARDUINO_598-preprocessor-script-for-printing-the-library-versions-to-boot_outtxt
582587
path: ci
583-
ref: ci-wippersnapper
584588
- name: Install CI-Arduino
585589
run: bash ci/actions_install.sh
586590
- name: Install extra Arduino libraries
@@ -610,7 +614,7 @@ jobs:
610614
run: |
611615
cp /home/runner/Arduino/libraries/Adafruit_LittlevGL_Glue_Library/lv_conf.h /home/runner/Arduino/libraries
612616
- name: Build for ESP32-SX
613-
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000
617+
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }} --build_timeout 48000 --include_print_dependencies_header ./src/print_dependencies.h
614618
- name: list
615619
run: |
616620
ls
@@ -753,7 +757,7 @@ jobs:
753757
build-rp2040,
754758
]
755759
steps:
756-
- uses: actions/setup-python@v4
760+
- uses: actions/setup-python@v5
757761
with:
758762
python-version: "3.x"
759763
- uses: actions/checkout@v4

src/print_dependencies.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#include "print_dependencies.h"
2+
3+
const char *project_dependencies = R"(
4+
Libraries and Versions:
5+
** This is a placeholder, you can fill this in automatically by running arduino-cli and copying the output here. **
6+
7+
Platforms and Versions:
8+
** Board Support Package placeholder **
9+
)";

src/print_dependencies.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#ifndef PROJECT_DEPENDENCIES_H
2+
#define PROJECT_DEPENDENCIES_H
3+
4+
#define PRINT_DEPENDENCIES 0
5+
extern const char *project_dependencies;
6+
#endif // PROJECT_DEPENDENCIES_H

src/provisioning/littlefs/WipperSnapper_LittleFS.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@
2828
*/
2929
/**************************************************************************/
3030
WipperSnapper_LittleFS::WipperSnapper_LittleFS() {
31+
#if PRINT_DEPENDENCIES
32+
// Print project build dependencies
33+
WS_DEBUG_PRINTLN("Build Dependencies:");
34+
WS_DEBUG_PRINTLN("*********************");
35+
WS_DEBUG_PRINTLN(project_dependencies);
36+
WS_DEBUG_PRINTLN("*********************");
37+
#endif
38+
3139
// Attempt to initialize filesystem
3240
if (!LittleFS.begin()) {
3341
setStatusLEDColor(RED);

0 commit comments

Comments
 (0)