Skip to content

Build

Build #98

Workflow file for this run

name: Build
on:
push:
pull_request:
schedule:
- cron: "0 0 * * *"
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
app: [usb-keyboard, usb-mouse]
board: [nrf52840dk/nrf52840]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: ${{ matrix.app }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Setup Zephyr project
uses: zephyrproject-rtos/action-zephyr-setup@v1
with:
app-path: ${{ matrix.app }}
toolchains: arm-zephyr-eabi
- name: Git config
working-directory: ${{ matrix.app }}
shell: bash
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Apply patches
working-directory: ${{ matrix.app }}
shell: bash
run: |
west patch
- name: Build firmware
working-directory: ${{ matrix.app }}
shell: bash
run: |
west build -b ${{ matrix.board }} ${{ matrix.app }}
- name: Archive firmware
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.app }}
path: |
${{ matrix.app }}/build/zephyr/zephyr.hex