ci: use the zephyr-setup action
Use the standard generic GitHub images for the run and the zephyr-setup action, run the build on both Linux, macOS and Windows. Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit is contained in:
parent
83356c31c2
commit
e946fbdf14
36
.github/workflows/build.yml
vendored
36
.github/workflows/build.yml
vendored
|
@ -8,28 +8,42 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-22.04
|
strategy:
|
||||||
container: ghcr.io/zephyrproject-rtos/ci:v0.26.2
|
fail-fast: false
|
||||||
env:
|
matrix:
|
||||||
CMAKE_PREFIX_PATH: /opt/toolchains
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
path: example-application
|
path: example-application
|
||||||
|
|
||||||
- name: Initialize
|
- name: Set up Python
|
||||||
working-directory: example-application
|
uses: actions/setup-python@v4
|
||||||
run: |
|
with:
|
||||||
west init -l .
|
python-version: 3.11
|
||||||
west update -o=--depth=1 -n
|
|
||||||
|
- name: Setup Zephyr project
|
||||||
|
uses: zephyrproject-rtos/action-zephyr-setup@v1
|
||||||
|
with:
|
||||||
|
app-path: example-application
|
||||||
|
toolchains: arm-zephyr-eabi
|
||||||
|
|
||||||
- name: Build firmware
|
- name: Build firmware
|
||||||
working-directory: example-application
|
working-directory: example-application
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
west twister -T app -v --inline-logs --integration
|
if [ "${{ runner.os }}" = "Windows" ]; then
|
||||||
|
EXTRA_TWISTER_FLAGS="--short-build-path -O/tmp/twister-out"
|
||||||
|
fi
|
||||||
|
west twister -T app -v --inline-logs --integration $EXTRA_TWISTER_FLAGS
|
||||||
|
|
||||||
- name: Twister Tests
|
- name: Twister Tests
|
||||||
working-directory: example-application
|
working-directory: example-application
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
west twister -T tests --integration
|
if [ "${{ runner.os }}" = "Windows" ]; then
|
||||||
|
EXTRA_TWISTER_FLAGS="--short-build-path -O/tmp/twister-out"
|
||||||
|
fi
|
||||||
|
west twister -T tests -v --inline-logs --integration $EXTRA_TWISTER_FLAGS
|
||||||
|
|
Loading…
Reference in a new issue