Skip to content

Add testcase.yaml

Add testcase.yaml #38

Workflow file for this run

name: Zephyr Build and Test
on: [push, pull_request]
jobs:
build-zephyr:
runs-on: ubuntu-22.04
container:
image: ghcr.io/zephyrproject-rtos/ci:v0.26.4
options: '--entrypoint /bin/bash'
strategy:
fail-fast: false
matrix:
board:
- qemu_cortex_m3
env:
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.1
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
steps:
- name: Apply container owner mismatch workaround
run: |
# FIXME: The owner UID of the GITHUB_WORKSPACE directory may not
# match the container user UID because of the way GitHub
# Actions runner is implemented. Remove this workaround when
# GitHub comes up with a fundamental fix for this problem.
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Update PATH for west
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Configure Git
run: |
git config --global user.email [email protected]
git config --global user.name "Github Actions"
- name: Setup Git (pull request)
if: ${{ github.base_ref }}
env:
BASE_REF: ${{ github.base_ref }}
run: |
git rebase origin/${BASE_REF}
git checkout -b this_pr
- name: Setup build system packages on Linux
run: |
sudo apt-get -y update
sudo apt-get -y install nodejs
- name: Checkout
uses: actions/checkout@v3
- name: West Setup
run: |
west init -l . || true
west config --global update.narrow true
west config --global build.board_warn false
west update 2>&1 1> west.update.log || west update 2>&1 1> west.update.log
- name: Build the PR
run: |
west build -b ${{ matrix.board }} .