1111
1212jobs :
1313 build :
14+ # Project setup dominates vs. actual per-configuration build times, so
15+ # just run twister for all boards instead of splitting into separate jobs.
16+ # strategy:
17+ # matrix:
18+ # board:
19+ # [
20+ # esp_wrover_kit/esp32/procpu,
21+ # esp32s3_devkitm/esp32s3/procpu,
22+ # esp32s3_devkitc/esp32s3/procpu,
23+ # esp32c3_devkitm,
24+ # ]
1425 runs-on : ubuntu-latest
15- container :
16- # Zephyr toolchain from here:
17- # https://github.com/zephyrproject-rtos/docker-image/pkgs/container/ci
18- image : ghcr.io/zephyrproject-rtos/ci:v0.26.6
19- env :
20- # Tell cmake where to find the zephyr sdk
21- CMAKE_PREFIX_PATH : /opt/toolchains
22-
2326 steps :
24- - name : Checkout code
27+ - name : ☑️ Checkout
2528 uses : actions/checkout@v4
2629 with :
27- path : zephyr-workspace/zephyr- esp32-example
30+ path : zephyr-esp32-example
2831
29- - name : ♻️ Initialize Zephyr Workspace
30- # Set up the Zephyr workspace and install the Python dependencies
31- run : |
32- cd zephyr-workspace
33- rm -rf .west
34- west init -l zephyr-esp32-example
35- west update --narrow -o=--depth=1
36- west blobs fetch hal_espressif
32+ - name : Set up Python
33+ uses : actions/setup-python@v4
34+ with :
35+ python-version : 3.11
36+
37+ - name : ♻️ Setup Zephyr project
38+ uses : zephyrproject-rtos/action-zephyr-setup@v1
39+ with :
40+ app-path : zephyr-esp32-example
41+ toolchains : xtensa-espressif_esp32s3_zephyr-elf riscv64-zephyr-elf
3742
3843 - name : 💾 Cache ~/.cache/ccache
3944 uses : actions/cache@v3
@@ -43,27 +48,20 @@ jobs:
4348 restore-keys : |
4449 ccache-v1-${{ runner.os }}-
4550
46- - name : 🔨 Build Project
51+ - name : 🌪️ Run twister
4752 run : |
48- cd zephyr-workspace
49- ccache -z
50-
51- west build --sysbuild \
52- --pristine=always \
53- --board=esp32s3_devkitm/esp32s3/procpu zephyr-esp32-example \
54- -- \
55- -DCONFIG_MEMFAULT_PROJECT_KEY=\"1234\"
56-
57- west build --sysbuild \
58- --pristine=always \
59- --board=esp32s3_devkitc/esp32s3/procpu zephyr-esp32-example \
60- -- \
61- -DCONFIG_MEMFAULT_PROJECT_KEY=\"1234\"
53+ # not part of action-zephyr-setup
54+ west blobs fetch hal_espressif
6255
63- west build --sysbuild \
64- --pristine=always \
65- --board=esp32c3_devkitm zephyr-esp32-example \
66- -- \
67- -DCONFIG_MEMFAULT_PROJECT_KEY=\"1234\"
56+ zephyr/scripts/twister
57+ --testsuite-root zephyr-esp32-example
6858
6959 ccache -sv
60+
61+ - name : 🎨 Upload artifacts
62+ uses : actions/upload-artifact@v4
63+ if : ${{ always() }}
64+ with :
65+ name : twister-artifacts
66+ path : |
67+ twister-out/**/*.log
0 commit comments