Skip to content

my keymap and build file for 3 firmware files #62

my keymap and build file for 3 firmware files

my keymap and build file for 3 firmware files #62

Workflow file for this run

name: Build
env:
config-path: zmk-config
on:
push:
paths:
- ".github/workflows/build.yml"
- "zmk-config/**"
pull_request:
paths:
- ".github/workflows/build.yml"
- "zmk-config/**"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
container:
image: zmkfirmware/zmk-build-arm:stable
strategy:
fail-fast: false
matrix:
# List the firmware to build here. Each item use the following properties.
# board: (required) the board to build.
# shield: (optional) the shield to build. Omit for a standalone board.
# cmake-args: (optional) extra arguments to pass to CMake as a string.
include:
- board: le_chiff_ble
artifact_prefix: schiffer_bleu
keyboard_name: "schiffer bleu"
- board: le_chiff_ble
artifact_prefix: schiffer_pink
keyboard_name: "schiffer pink"
- board: le_chiff_ble
artifact_prefix: schiffer_gelb
keyboard_name: "schiffer gelb"
steps:
- name: Checkout (${{ matrix.keyboard_name }})
uses: actions/checkout@v2
- name: Cache west modules (${{ matrix.keyboard_name }})
uses: actions/cache@v2
env:
cache-name: cache-zephyr-modules
with:
path: |
bootloader/
modules/
tools/
zephyr/
zmk/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('${{ env.config-path }}/west.yml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
timeout-minutes: 2
continue-on-error: true
- name: Initialize workspace (west init) (${{ matrix.keyboard_name }})
run: west init -l ${{ env.config-path }}
- name: Update modules (west update) (${{ matrix.keyboard_name }})
run: west update
- name: Export Zephyr CMake package (west zephyr-export) (${{ matrix.keyboard_name }})
run: west zephyr-export
- name: Prepare variables
id: variables
run: |
if [ -n "${{ matrix.shield }}" ]; then
SHIELD_ARG="-DSHIELD=${{ matrix.shield }}"
ARTIFACT_NAME="${{ matrix.shield }}-${{ matrix.board }}-zmk"
else
SHIELD_ARG=
ARTIFACT_NAME="${{ matrix.board }}-zmk"
fi
echo ::set-output name=shield-arg::${SHIELD_ARG}
echo ::set-output name=artifact-name::${ARTIFACT_NAME}
- name: Build (west build) (${{ matrix.keyboard_name }})
run: |
west build -s zmk/app -b ${{ matrix.board }} -- \
${{ steps.variables.outputs.shield-arg }} \
-DZMK_CONFIG="${GITHUB_WORKSPACE}/${{ env.config-path }}" \
-DCONFIG_ZMK_KEYBOARD_NAME="\"${{ matrix.keyboard_name }}\"" \
${{ matrix.cmake-args }}
- name: Rename artifacts (${{ matrix.keyboard_name }})
run: |
mkdir build/artifacts
[ -f build/zephyr/zmk.uf2 ] && cp build/zephyr/zmk.uf2 "build/artifacts/${{ matrix.artifact_prefix }}_${{ matrix.board }}.uf2"
- name: Archive artifacts (${{ matrix.keyboard_name }})
uses: actions/upload-artifact@v2
with:
name: "${{ steps.variables.outputs.artifact-name }}"
path: build/artifacts