Skip to content

github: add a multiplatform hello world workflow #26

github: add a multiplatform hello world workflow

github: add a multiplatform hello world workflow #26

name: Hello World (Multiplatform)
on:
push:
branches:
- main
- v*-branch
- collab-*
pull_request:
branches:
- main
- v*-branch
- collab-*
jobs:
build:
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: zephyr
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Setup Zephyr project
uses: fabiobaltieri/zephyr-setup@main
with:
app-path: zephyr
toolchains: all
- name: Build firmware
working-directory: zephyr
shell: bash
run: |
if [ "${{ runner.os }}" = "macOS" ]; then
EXTRA_TWISTER_FLAGS="-P native_posix --build-only"
elif [ "${{ runner.os }}" = "Windows" ]; then
EXTRA_TWISTER_FLAGS="-P native_posix --short-build-path -O/tmp/twister-out"
fi
west twister -T samples/hello_world -v $EXTRA_TWISTER_FLAGS
- name: Test for 64849
working-directory: zephyr
shell: bash
run: |
west build -p -b unit_testing -T tests/unit/base64/utilities.base64
- name: Upload artifacts
if: failure()
uses: actions/upload-artifact@v3
with:
if-no-files-found: ignore
path:
zephyr/twister-out/*/samples/hello_world/sample.basic.helloworld/build.log