action: use west packages #47
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Action test | |
on: | |
push: | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-22.04, macos-13, macos-14, windows-2022] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Main Zephyr repository checkout | |
uses: actions/checkout@v4 | |
with: | |
repository: zephyrproject-rtos/zephyr | |
path: zephyr | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Create Python virtual environment | |
run: | | |
python3 -m venv .venv | |
if [ "${{ runner.os }}" = "Windows" ]; then | |
.venv/Scripts/activate.bat | |
else | |
source .venv/bin/activate | |
fi | |
echo "VIRTUAL_ENV=${VIRTUAL_ENV}" >> $GITHUB_ENV | |
echo "${VIRTUAL_ENV}/bin" >> $GITHUB_PATH | |
shell: bash | |
- name: Setup Zephyr project | |
uses: ./ | |
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_sim --build-only" | |
elif [ "${{ runner.os }}" = "Windows" ]; then | |
EXTRA_TWISTER_FLAGS="-P native_sim --short-build-path -O/tmp/twister-out" | |
fi | |
./scripts/twister --force-color --inline-logs -T samples/hello_world -v $EXTRA_TWISTER_FLAGS |