99permissions :
1010 contents : read
1111
12+ env :
13+ ZEPHYR_SDK_VERSION : 0.17.4
14+ ZEPHYR_TOOLCHAINS : |
15+ arm-zephyr-eabi
16+ xtensa-espressif_esp32s3_zephyr-elf
17+
1218jobs :
1319 build :
1420 name : Build app and tests
@@ -25,16 +31,57 @@ jobs:
2531 persist-credentials : false
2632
2733 - name : Set up Python
28- uses : actions/setup-python@v5
34+ uses : actions/setup-python@v6
2935 with :
3036 python-version : 3.12
37+ cache : " pip"
38+
39+ - name : Install system dependencies
40+ shell : bash
41+ run : |
42+ if [ "${{ runner.os }}" = "Linux" ]; then
43+ sudo rm -f /var/lib/man-db/auto-update
44+ sudo apt-get update -y
45+ sudo apt-get install -y ninja-build ccache gperf
46+ if [ "${{ runner.arch }}" = "X64" ]; then
47+ sudo apt-get install -y libc6-dev-i386 g++-multilib
48+ fi
49+ elif [ "${{ runner.os }}" = "macOS" ]; then
50+ brew install ninja ccache qemu dtc gperf
51+ elif [ "${{ runner.os }}" = "Windows" ]; then
52+ choco feature enable -n allowGlobalConfirmation
53+ choco install ninja wget gperf
54+ fi
3155
32- - name : Setup Zephyr project
33- uses : ./OpenAstroFocuser/.github/actions/setup-zephyr
56+ - name : Install west
57+ shell : bash
58+ run : |
59+ pip install west
60+
61+ - name : Initialize Zephyr workspace
62+ shell : bash
63+ run : |
64+ west init -l OpenAstroFocuser
65+ west update
66+
67+ - name : Install pip dependencies
68+ shell : bash
69+ run : |
70+ west packages pip --install --ignore-venv-check || pip3 install -r zephyr/scripts/requirements.txt
71+
72+ - name : Zephyr SDK cache
73+ id : cache
74+ uses : actions/cache@v5
3475 with :
35- app-path : OpenAstroFocuser
36- toolchains : arm-zephyr-eabi:xtensa-espressif_esp32s3_zephyr-elf
37- ccache-cache-key : ${{ matrix.os }}
76+ path : ~/zephyr-sdk-${{ env.ZEPHYR_SDK_VERSION }}
77+ key : zephyr-sdk-${{ env.ZEPHYR_SDK_VERSION }}-${{ matrix.os }}
78+
79+ - name : Install Zephyr SDK
80+ if : steps.cache.outputs.cache-hit != 'true'
81+ shell : bash
82+ run : |
83+ TOOLCHAINS="$(echo "${{ env.ZEPHYR_TOOLCHAINS }}" | xargs)"
84+ west sdk install --version ${{ env.ZEPHYR_SDK_VERSION }} -t ${TOOLCHAINS}
3885
3986 - name : Build firmware
4087 working-directory : OpenAstroFocuser
5299 if [ "${{ runner.os }}" = "Windows" ]; then
53100 EXTRA_TWISTER_FLAGS="--short-build-path -O/tmp/twister-out"
54101 fi
55- west twister -T tests -v --inline-logs --integration $EXTRA_TWISTER_FLAGS
102+ west twister -T tests -v --inline-logs --integration $EXTRA_TWISTER_FLAGS
0 commit comments