Skip to content

Commit e946fbd

Browse files
committed
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 <[email protected]>
1 parent 83356c3 commit e946fbd

File tree

1 file changed

+25
-11
lines changed

1 file changed

+25
-11
lines changed

.github/workflows/build.yml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,42 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: ubuntu-22.04
12-
container: ghcr.io/zephyrproject-rtos/ci:v0.26.2
13-
env:
14-
CMAKE_PREFIX_PATH: /opt/toolchains
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os: [ubuntu-latest, macos-latest, windows-latest]
15+
runs-on: ${{ matrix.os }}
1516
steps:
1617
- name: Checkout
1718
uses: actions/checkout@v3
1819
with:
1920
path: example-application
2021

21-
- name: Initialize
22-
working-directory: example-application
23-
run: |
24-
west init -l .
25-
west update -o=--depth=1 -n
22+
- name: Set up Python
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: 3.11
26+
27+
- name: Setup Zephyr project
28+
uses: zephyrproject-rtos/action-zephyr-setup@v1
29+
with:
30+
app-path: example-application
31+
toolchains: arm-zephyr-eabi
2632

2733
- name: Build firmware
2834
working-directory: example-application
35+
shell: bash
2936
run: |
30-
west twister -T app -v --inline-logs --integration
37+
if [ "${{ runner.os }}" = "Windows" ]; then
38+
EXTRA_TWISTER_FLAGS="--short-build-path -O/tmp/twister-out"
39+
fi
40+
west twister -T app -v --inline-logs --integration $EXTRA_TWISTER_FLAGS
3141
3242
- name: Twister Tests
3343
working-directory: example-application
44+
shell: bash
3445
run: |
35-
west twister -T tests --integration
46+
if [ "${{ runner.os }}" = "Windows" ]; then
47+
EXTRA_TWISTER_FLAGS="--short-build-path -O/tmp/twister-out"
48+
fi
49+
west twister -T tests -v --inline-logs --integration $EXTRA_TWISTER_FLAGS

0 commit comments

Comments
 (0)