Skip to content

.github/workflows/build.yml #83

.github/workflows/build.yml

.github/workflows/build.yml #83

Workflow file for this run

on: [push, pull_request, create, workflow_dispatch]
name: Build
jobs:
build:
runs-on: ubuntu-latest
container:
image: zmkfirmware/zmk-build-arm:stable
name: Build Test
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: config/
- name: Cache west modules
uses: actions/cache@v2
env:
cache-name: cache-zephyr-modules
with:
path: |
modules/
tools/
zephyr/
bootloader/
zmk/
key: ${{ runner.os }}-build-v2-${{ env.cache-name }}-${{ hashFiles('manifest-dir/west.yml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Initialize workspace (west init)
run: west init -l config
- name: Update modules (west update)
run: west update
- name: Export zephyr CMake package (west zephyr-export)
run: west zephyr-export
- name: List modules (west list)
run: west list
- name: Build Zaphod (west build)
run: west build -s zmk/app -b zaphod -d build/zaphod -- -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
- name: Build Zaphod Lite w/ Seeeduino XIAO (west build)
run: west build -s zmk/app -b seeeduino_xiao -d build/zaphod_lite_xiao -- -DZMK_CONFIG="${GITHUB_WORKSPACE}/config" -DSHIELD=zaphod_lite
- name: Build Zaphod Lite w/ Seeeduino XIAO BLE (west build)
run: west build -s zmk/app -b seeeduino_xiao_ble -d build/zaphod_lite_xiao_ble -- -DZMK_CONFIG="${GITHUB_WORKSPACE}/config" -DSHIELD=zaphod_lite
- name: Zaphod .config
if: ${{ always() }}
run: cat -n build/zaphod/zephyr/.config
- name: Rename zmk.uf2
run: |
cp build/zaphod/zephyr/zmk.uf2 zaphod.uf2
cp build/zaphod_lite_xiao/zephyr/zmk.uf2 seeeduino_xiao_zaphod_lite.uf2
cp build/zaphod_lite_xiao_ble/zephyr/zmk.uf2 seeeduino_xiao_ble_zaphod_lite.uf2
- name: Archive
uses: actions/upload-artifact@v2
with:
name: firmware
path: '*.uf2'