From e946fbdf14f84aeb92110eb3c0e217abb8ed2a20 Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Fri, 27 Oct 2023 13:58:17 +0000 Subject: [PATCH] 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 --- .github/workflows/build.yml | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a0e6042..7b1aaa0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,28 +8,42 @@ on: jobs: build: - runs-on: ubuntu-22.04 - container: ghcr.io/zephyrproject-rtos/ci:v0.26.2 - env: - CMAKE_PREFIX_PATH: /opt/toolchains + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} steps: - name: Checkout uses: actions/checkout@v3 with: path: example-application - - name: Initialize - working-directory: example-application - run: | - west init -l . - west update -o=--depth=1 -n + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.11 + + - name: Setup Zephyr project + uses: zephyrproject-rtos/action-zephyr-setup@v1 + with: + app-path: example-application + toolchains: arm-zephyr-eabi - name: Build firmware working-directory: example-application + shell: bash 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 working-directory: example-application + shell: bash 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