@@ -4,40 +4,50 @@ on: [push, pull_request]
44
55jobs :
66 build :
7+ # Avoid running twice if pushing to a PR branch in the base repo
8+ if : >
9+ github.event_name != 'pull_request' ||
10+ github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
711 runs-on : ubuntu-latest
8- container : zephyrprojectrtos/ci:v0.26.5
9- env :
10- CMAKE_PREFIX_PATH : /opt/toolchains
12+ defaults :
13+ run :
14+ working-directory : firmware
1115 steps :
1216 - name : Checkout
13- uses : actions/checkout@v3
17+ uses : actions/checkout@v5
1418 with :
15- path : thingset-zephyr-sdk
19+ path : firmware
1620 fetch-depth : 0 # necessary to get tags
1721
22+ - name : Set up Python
23+ uses : actions/setup-python@v5
24+ with :
25+ python-version : 3.12
26+
27+ - name : Zephyr project setup
28+ uses : zephyrproject-rtos/action-zephyr-setup@v1
29+ with :
30+ app-path : firmware
31+ toolchains : arm-zephyr-eabi:riscv64-zephyr-elf
32+
1833 - name : Coding style check
19- working-directory : thingset-zephyr-sdk
2034 run : |
21- apt-get update
22- apt-get install -y clang-format-15 colordiff
35+ sudo apt-get update
36+ sudo apt-get install -y clang-format-15 colordiff
2337 git status
2438 bash scripts/check-style.sh
2539
26- - name : Initialize west workspace
27- working-directory : thingset-zephyr-sdk
40+ - name : Fetch hal_espressif binary blobs
2841 run : |
29- west init -l .
30- west update
3142 west blobs fetch hal_espressif
3243
3344 - name : Install docs dependencies
34- working-directory : thingset-zephyr-sdk
45+ if : github.ref == 'refs/heads/main'
3546 run : |
3647 sudo apt install -y git make python3 python3-pip doxygen
3748 pip3 install -r docs/requirements.txt
3849
3950 - name : Run sample build tests
40- working-directory : thingset-zephyr-sdk
4151 run : |
4252 west build -p -b olimex_lora_stm32wl_devkit samples/counter -- -DEXTRA_CONF_FILE=lorawan.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
4353 west build -p -b esp32c3_devkitm samples/counter -- -DEXTRA_CONF_FILE=ble.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
@@ -52,12 +62,10 @@ jobs:
5262 west build -p -b xiao_esp32c3 samples/serial_ble_gateway -- -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
5363
5464 - name : Run unit tests
55- working-directory : thingset-zephyr-sdk
5665 run : |
5766 ../zephyr/scripts/twister -T ./tests --integration --inline-logs
5867
5968 - name : Build documentation
60- working-directory : thingset-zephyr-sdk
6169 run : |
6270 cd docs
6371 make html
6775 uses : peaceiris/actions-gh-pages@v3
6876 with :
6977 github_token : ${{ secrets.GITHUB_TOKEN }}
70- publish_dir : ./thingset-zephyr-sdk/ docs/build/html/
78+ publish_dir : docs/build/html/
7179 enable_jekyll : false
7280 allow_empty_commit : false
7381 force_orphan : true
0 commit comments