Skip to content

GitHub Actions: Use action-zephyr-setup #31

GitHub Actions: Use action-zephyr-setup

GitHub Actions: Use action-zephyr-setup #31

Workflow file for this run

name: Code check and build tests
on: [push, pull_request]
jobs:
zephyr:
# Avoid running twice if pushing to a PR branch in the base repo
if: >
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
defaults:
run:
working-directory: firmware
steps:
- name: Checkout
uses: actions/checkout@v5
with:
path: firmware
fetch-depth: 0 # necessary to get tags
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Zephyr project setup
uses: zephyrproject-rtos/action-zephyr-setup@v1
with:
app-path: firmware
toolchains: arm-zephyr-eabi:riscv64-zephyr-elf
- name: Coding style check
run: |
sudo apt-get update
sudo apt-get install -y clang-format-15 colordiff
git status
bash scripts/check-style.sh
- name: Fetch hal_espressif binary blobs
run: |
west blobs fetch hal_espressif
- name: Run sample build tests
run: |
west build -p -b olimex_lora_stm32wl_devkit samples/counter -- -DEXTRA_CONF_FILE=lorawan.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b esp32c3_devkitm samples/counter -- -DEXTRA_CONF_FILE=ble.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b native_sim samples/counter -- -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b nrf52840dk/nrf52840 samples/counter -- -DEXTRA_CONF_FILE=dfu.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b nucleo_l073rz samples/counter -- -DEXTRA_CONF_FILE=serial.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b nucleo_l073rz samples/counter -- -DEXTRA_CONF_FILE=storage_eeprom.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b native_sim samples/counter -- -DEXTRA_CONF_FILE=auth.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b native_sim samples/counter -- -DEXTRA_CONF_FILE=can.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b native_sim samples/counter -- -DEXTRA_CONF_FILE=log_backend.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b native_sim samples/counter -- -DEXTRA_CONF_FILE=native_websocket.conf -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
west build -p -b xiao_esp32c3 samples/serial_ble_gateway -- -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y
- name: Run unit tests
run: |
../zephyr/scripts/twister -T ./tests --integration --inline-logs