ci #46
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '0 1 * * 0' | |
jobs: | |
# | |
# build job for vanilla zephyr | |
# | |
build-zephyr: | |
# "vanilla" zephyr build | |
runs-on: ubuntu-22.04 | |
container: ghcr.io/zephyrproject-rtos/ci:v0.26.2 | |
env: | |
CMAKE_PREFIX_PATH: /opt/toolchains | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
# checkout location of this repository. this is a west workspace and thus | |
# .west will be located in `app/../.west`. | |
path: app | |
- name: Initialize workspace | |
working-directory: app | |
run: | | |
west init --local . | |
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows | |
- name: Cache dependencies | |
id: cache-vanilla-zephyr | |
uses: actions/cache@v4 | |
with: | |
path: deps | |
key: cache-vanilla-zephyr-${{ hashFiles('app/west.yml') }} | |
- name: Update workspace | |
working-directory: app | |
run: | | |
west update -o=--depth=1 -n | |
- name: Build for nRF52840 development kit | |
working-directory: app | |
run: | | |
west build --board nrf52840dk_nrf52840 --pristine | |
- name: Build for STM32 Nucleo-64 | |
working-directory: app | |
run: | | |
west build --board nucleo_f411re --pristine | |
# | |
# build job using an sdk-nrf west configuration | |
# | |
build-sdk-nrf: | |
# build using sdk-nrf, which includes zephyr as project. | |
runs-on: ubuntu-22.04 | |
container: ghcr.io/zephyrproject-rtos/ci:v0.26.2 | |
env: | |
CMAKE_PREFIX_PATH: /opt/toolchains | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: app | |
- name: Initialize workspace | |
working-directory: app | |
run: | | |
west init --local --mf west-sdk-nrf.yml . | |
- name: Cache dependencies | |
id: cache-sdk-nrf | |
uses: actions/cache@v4 | |
with: | |
path: deps | |
key: cache-sdk-nrf-${{ hashFiles('app/west-sdk-nrf.yml') }} | |
- name: Update workspace | |
working-directory: app | |
run: | | |
west update -o=--depth=1 -n | |
- name: Build for nRF52840 development kit | |
working-directory: app | |
run: | | |
west build --board nrf52840dk_nrf52840 --pristine |