Add support for out-of-tree boards and shields

This commit is contained in:
Manna Harbour 2021-07-31 16:24:08 +10:00
parent 1696765f85
commit 724e270dea
24 changed files with 1229 additions and 800 deletions

View File

@ -1,108 +0,0 @@
name: 'Build ahokore with all options'
on:
- workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
container:
image: zmkfirmware/zmk-build-arm:2.4
strategy:
fail-fast: false
matrix:
shield:
- ""
board:
- ahokore
alphas:
- ""
# - colemak
# - colemakdhk
# - dvorak
# - halmak
# - workman
# - qwerty
nav:
- ""
# - vi
clipboard:
- ""
# - fun
# - mac
# - win
layers:
- ""
mapping:
- ""
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache west modules
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('config/west-ahokore.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)
run: west init -l config --mf west-ahokore.yml
- name: Update modules (west update)
run: west update
- name: Export Zephyr CMake package (west zephyr-export)
run: west zephyr-export
- name: Process matrix
id: variables
run: |
if [ -n "${{ matrix.shield }}" ]
then
SHIELD_ARG="-DSHIELD=${{ matrix.shield }}"
fi
echo "::set-output name=shield-arg::${SHIELD_ARG}"
configfile="${GITHUB_WORKSPACE}/miryoku/config.h"
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
echo "::set-output name=configfile::$configfile"
artifact_build_name="miryoku_zmk ${{ matrix.shield }} ${{ matrix.board }}"
for option in "alphas_${{ matrix.alphas }}" "nav_${{ matrix.nav }}" "clipboard_${{ matrix.clipboard }}" "layers_${{ matrix.layers }}" "mapping_${{ matrix.mapping }}"
do
case "$option" in
*_ ) ;;
* )
artifact_build_name="$artifact_build_name $option"
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
;;
esac
done
artifact_build_name=`echo $artifact_build_name | tr ' ' '-'`
echo "::set-output name=artifact-build-name::$artifact_build_name"
echo "::set-output name=artifact-generic-name::$artifact_build_name"
echo "::set-output name=artifact-dir::artifacts"
- name: Build (west build)
run: west build -s zmk/app -b ${{ matrix.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
- name: Prepare artifacts
run: |
mkdir ${{ steps.variables.outputs.artifact-dir }}
cp "${{ steps.variables.outputs.configfile }}" "${{ steps.variables.outputs.artifact-dir }}"
for extension in "hex" "uf2"
do
file="build/zephyr/zmk.$extension"
if [ -f "$file" ]
then
cp "$file" "${{ steps.variables.outputs.artifact-dir }}/${{ steps.variables.outputs.artifact-build-name }}.$extension"
fi
done
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ steps.variables.outputs.artifact-generic-name }}
path: ${{ steps.variables.outputs.artifact-dir }}
continue-on-error: true

View File

@ -1,118 +0,0 @@
name: 'Build all keyboards with default options'
on:
- workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
container:
image: zmkfirmware/zmk-build-arm:2.4
strategy:
fail-fast: false
matrix:
shield:
- corne_left
- corne_right
- cradio_left
- cradio_right
- crbn
- eek
- helix_left
- helix_right
- iris_left
- iris_right
- jian_left
- jian_right
- jorne_left
- jorne_right
- kyria_left
- kyria_right
- lily58_left
- lily58_right
- microdox_left
- microdox_right
- sofle_left
- sofle_right
- splitreus62_left
- splitreus62_right
board:
- nice_nano
alphas: [""]
nav: [""]
clipboard: [""]
layers: [""]
mapping: [""]
include:
- board: planck_rev6
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache west modules
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('config/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)
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: Process matrix
id: variables
run: |
if [ -n "${{ matrix.shield }}" ]
then
SHIELD_ARG="-DSHIELD=${{ matrix.shield }}"
fi
echo "::set-output name=shield-arg::${SHIELD_ARG}"
configfile="${GITHUB_WORKSPACE}/miryoku/config.h"
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
echo "::set-output name=configfile::$configfile"
artifact_build_name="miryoku_zmk ${{ matrix.shield }} ${{ matrix.board }}"
for option in "alphas_${{ matrix.alphas }}" "nav_${{ matrix.nav }}" "clipboard_${{ matrix.clipboard }}" "layers_${{ matrix.layers }}" "mapping_${{ matrix.mapping }}"
do
case "$option" in
*_ ) ;;
* )
artifact_build_name="$artifact_build_name $option"
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
;;
esac
done
artifact_build_name=`echo $artifact_build_name | tr ' ' '-'`
echo "::set-output name=artifact-build-name::$artifact_build_name"
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
echo "::set-output name=artifact-dir::artifacts"
- name: Build (west build)
run: west build -s zmk/app -b ${{ matrix.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
- name: Prepare artifacts
run: |
mkdir ${{ steps.variables.outputs.artifact-dir }}
cp "${{ steps.variables.outputs.configfile }}" "${{ steps.variables.outputs.artifact-dir }}"
for extension in "hex" "uf2"
do
file="build/zephyr/zmk.$extension"
if [ -f "$file" ]
then
cp "$file" "${{ steps.variables.outputs.artifact-dir }}/${{ steps.variables.outputs.artifact-build-name }}.$extension"
fi
done
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ steps.variables.outputs.artifact-generic-name }}
path: ${{ steps.variables.outputs.artifact-dir }}
continue-on-error: true

View File

@ -1,111 +0,0 @@
name: 'Build corne with all options'
on:
- workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
container:
image: zmkfirmware/zmk-build-arm:2.4
strategy:
fail-fast: false
matrix:
shield:
- corne_left
board:
- nice_nano
alphas:
- ""
# - colemak
# - colemakdhk
# - dvorak
# - halmak
# - workman
# - qwerty
nav:
- ""
# - vi
clipboard:
- ""
# - fun
# - mac
# - win
layers:
- ""
mapping:
- ""
include:
- shield: corne_right
board: nice_nano
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache west modules
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('config/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)
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: Process matrix
id: variables
run: |
if [ -n "${{ matrix.shield }}" ]
then
SHIELD_ARG="-DSHIELD=${{ matrix.shield }}"
fi
echo "::set-output name=shield-arg::${SHIELD_ARG}"
configfile="${GITHUB_WORKSPACE}/miryoku/config.h"
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
echo "::set-output name=configfile::$configfile"
artifact_build_name="miryoku_zmk ${{ matrix.shield }} ${{ matrix.board }}"
for option in "alphas_${{ matrix.alphas }}" "nav_${{ matrix.nav }}" "clipboard_${{ matrix.clipboard }}" "layers_${{ matrix.layers }}" "mapping_${{ matrix.mapping }}"
do
case "$option" in
*_ ) ;;
* )
artifact_build_name="$artifact_build_name $option"
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
;;
esac
done
artifact_build_name=`echo $artifact_build_name | tr ' ' '-'`
echo "::set-output name=artifact-build-name::$artifact_build_name"
echo "::set-output name=artifact-generic-name::$artifact_build_name"
echo "::set-output name=artifact-dir::artifacts"
- name: Build (west build)
run: west build -s zmk/app -b ${{ matrix.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
- name: Prepare artifacts
run: |
mkdir ${{ steps.variables.outputs.artifact-dir }}
cp "${{ steps.variables.outputs.configfile }}" "${{ steps.variables.outputs.artifact-dir }}"
for extension in "hex" "uf2"
do
file="build/zephyr/zmk.$extension"
if [ -f "$file" ]
then
cp "$file" "${{ steps.variables.outputs.artifact-dir }}/${{ steps.variables.outputs.artifact-build-name }}.$extension"
fi
done
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ steps.variables.outputs.artifact-generic-name }}
path: ${{ steps.variables.outputs.artifact-dir }}
continue-on-error: true

View File

@ -1,98 +0,0 @@
name: 'Build corne_left with default options'
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
build:
if: github.repository == 'manna-harbour/zmk-config'
runs-on: ubuntu-latest
container:
image: zmkfirmware/zmk-build-arm:2.4
strategy:
fail-fast: false
matrix:
shield:
- corne_left
board:
- nice_nano
alphas: [""]
nav: [""]
clipboard: [""]
layers: [""]
mapping: [""]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache west modules
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('config/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)
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: Process matrix
id: variables
run: |
if [ -n "${{ matrix.shield }}" ]
then
SHIELD_ARG="-DSHIELD=${{ matrix.shield }}"
fi
echo "::set-output name=shield-arg::${SHIELD_ARG}"
configfile="${GITHUB_WORKSPACE}/miryoku/config.h"
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
echo "::set-output name=configfile::$configfile"
artifact_build_name="miryoku_zmk ${{ matrix.shield }} ${{ matrix.board }}"
for option in "alphas_${{ matrix.alphas }}" "nav_${{ matrix.nav }}" "clipboard_${{ matrix.clipboard }}" "layers_${{ matrix.layers }}" "mapping_${{ matrix.mapping }}"
do
case "$option" in
*_ ) ;;
* )
artifact_build_name="$artifact_build_name $option"
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
;;
esac
done
artifact_build_name=`echo $artifact_build_name | tr ' ' '-'`
echo "::set-output name=artifact-build-name::$artifact_build_name"
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
echo "::set-output name=artifact-dir::artifacts"
- name: Build (west build)
run: west build -s zmk/app -b ${{ matrix.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
- name: Prepare artifacts
run: |
mkdir ${{ steps.variables.outputs.artifact-dir }}
cp "${{ steps.variables.outputs.configfile }}" "${{ steps.variables.outputs.artifact-dir }}"
for extension in "hex" "uf2"
do
file="build/zephyr/zmk.$extension"
if [ -f "$file" ]
then
cp "$file" "${{ steps.variables.outputs.artifact-dir }}/${{ steps.variables.outputs.artifact-build-name }}.$extension"
fi
done
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ steps.variables.outputs.artifact-generic-name }}
path: ${{ steps.variables.outputs.artifact-dir }}
continue-on-error: true

View File

@ -1,110 +0,0 @@
name: 'Build corne-ish_zen with all options'
on:
- workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
container:
image: zmkfirmware/zmk-build-arm:2.4
strategy:
fail-fast: false
matrix:
shield:
- ""
board:
- corne-ish_zen_left
alphas:
- ""
- colemak
- colemakdhk
- dvorak
- halmak
- workman
- qwerty
nav:
- ""
- vi
clipboard:
- ""
- fun
- mac
- win
layers:
- ""
mapping:
- ""
include:
- board: corne-ish_zen_right
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache west modules
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('config/west-corneishzen.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)
run: west init -l config --mf west-corneishzen.yml
- name: Update modules (west update)
run: west update
- name: Export Zephyr CMake package (west zephyr-export)
run: west zephyr-export
- name: Process matrix
id: variables
run: |
if [ -n "${{ matrix.shield }}" ]
then
SHIELD_ARG="-DSHIELD=${{ matrix.shield }}"
fi
echo "::set-output name=shield-arg::${SHIELD_ARG}"
configfile="${GITHUB_WORKSPACE}/miryoku/config.h"
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
echo "::set-output name=configfile::$configfile"
artifact_build_name="miryoku_zmk ${{ matrix.shield }} ${{ matrix.board }}"
for option in "alphas_${{ matrix.alphas }}" "nav_${{ matrix.nav }}" "clipboard_${{ matrix.clipboard }}" "layers_${{ matrix.layers }}" "mapping_${{ matrix.mapping }}"
do
case "$option" in
*_ ) ;;
* )
artifact_build_name="$artifact_build_name $option"
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
;;
esac
done
artifact_build_name=`echo $artifact_build_name | tr ' ' '-'`
echo "::set-output name=artifact-build-name::$artifact_build_name"
echo "::set-output name=artifact-generic-name::$artifact_build_name"
echo "::set-output name=artifact-dir::artifacts"
- name: Build (west build)
run: west build -s zmk/app -b ${{ matrix.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
- name: Prepare artifacts
run: |
mkdir ${{ steps.variables.outputs.artifact-dir }}
cp "${{ steps.variables.outputs.configfile }}" "${{ steps.variables.outputs.artifact-dir }}"
for extension in "hex" "uf2"
do
file="build/zephyr/zmk.$extension"
if [ -f "$file" ]
then
cp "$file" "${{ steps.variables.outputs.artifact-dir }}/${{ steps.variables.outputs.artifact-build-name }}.$extension"
fi
done
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ steps.variables.outputs.artifact-generic-name }}
path: ${{ steps.variables.outputs.artifact-dir }}
continue-on-error: true

158
.github/workflows/build-inputs.yml vendored Normal file
View File

@ -0,0 +1,158 @@
name: 'Build inputs'
on:
workflow_dispatch:
inputs:
board:
description: 'Board'
required: true
default: 'nice_nano'
shield:
description: 'Shield'
required: false
default: 'corne_left'
alphas:
description: 'Miryoku Alphas'
required: false
default: ''
nav:
description: 'Miryoku Nav'
required: false
default: ''
clipboard:
description: 'Miryoku Clipboard'
required: false
default: ''
layers:
description: 'Miryoku Layers'
required: false
default: ''
mapping:
description: 'Miryoku Mapping'
required: false
default: ''
jobs:
build:
runs-on: ubuntu-latest
container:
image: zmkfirmware/zmk-build-arm:2.5
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Process inputs
id: inputs
run: |
echo "::set-output name=board::${{ github.event.inputs.board }}"
echo "::set-output name=shield::${{ github.event.inputs.shield }}"
echo "::set-output name=alphas::${{ github.event.inputs.alphas }}"
echo "::set-output name=nav::${{ github.event.inputs.nav }}"
echo "::set-output name=clipboard::${{ github.event.inputs.clipboard }}"
echo "::set-output name=layers::${{ github.event.inputs.layers }}"
echo "::set-output name=mapping::${{ github.event.inputs.mapping }}"
- name: Process variables
id: variables
run: |
keyboard=${{ steps.inputs.outputs.board }}
if [ -n "${{ steps.inputs.outputs.shield }}" ]
then
SHIELD_ARG="-DSHIELD=${{ steps.inputs.outputs.shield }}"
keyboard=${{ steps.inputs.outputs.shield }}
fi
echo "::set-output name=shield-arg::${SHIELD_ARG}"
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
configfile="${GITHUB_WORKSPACE}/miryoku/config.h"
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
echo "::set-output name=configfile::$configfile"
artifact_build_name="miryoku_zmk ${{ steps.inputs.outputs.shield }} ${{ steps.inputs.outputs.board }}"
for option in "alphas_${{ steps.inputs.outputs.alphas }}" "nav_${{ steps.inputs.outputs.nav }}" "clipboard_${{ steps.inputs.outputs.clipboard }}" "layers_${{ steps.inputs.outputs.layers }}" "mapping_${{ steps.inputs.outputs.mapping }}"
do
case "$option" in
*_ ) ;;
* )
artifact_build_name="$artifact_build_name $option"
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
;;
esac
done
artifact_build_name=`echo $artifact_build_name | tr ' ' '-'`
echo "::set-output name=artifact-build-name::$artifact_build_name"
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
echo "::set-output name=artifact-dir::artifacts"
manifests="manifests"
manifest="$manifests/west-$keyboard.yml"
if [ ! -f "config/$manifest" ]
then
manifest="west.yml"
fi
echo "::set-output name=manifest::$manifest"
echo "::set-output name=board-config::board-config"
env_file="config/board-configs/$keyboard.env"
if [ -f "$env_file" ]
then
cat "$env_file" >> $GITHUB_ENV
echo "::set-output name=has_board_config::true"
fi
- name: Checkout board-config
if: ${{ steps.variables.outputs.has_board_config == 'true' }}
uses: actions/checkout@v2
with:
repository: ${{ env.board_config_repository }}
ref: ${{ env.board_config_ref }}
path: ${{ steps.variables.outputs.board-config }}
- name: Use board-config
if: ${{ steps.variables.outputs.has_board_config == 'true' }}
run: |
mkdir -p `dirname "config/${{ env.board_config_to }}"`
ln -sr ${{ steps.variables.outputs.board-config }}/${{ env.board_config_from }} config/${{ env.board_config_to }}
if [ -n "${{ env.board_config_manifestdir }}" ]
then
cp ${{ steps.variables.outputs.board-config }}/${{ env.board_config_manifestdir }}/west.yml config/
cat config/west.yml
fi
- name: Cache west modules
uses: actions/cache@v2
env:
cache-name: zephyr
with:
path: |
bootloader/
modules/
tools/
zephyr/
zmk/
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('config/{0}', steps.variables.outputs.manifest)) }}
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
timeout-minutes: 2
continue-on-error: true
- name: Initialize workspace (west init)
run: west init -l config --mf ${{ steps.variables.outputs.manifest }}
- name: Update modules (west update)
run: west update
- name: Export Zephyr CMake package (west zephyr-export)
run: west zephyr-export
- name: Build (west build)
run: west build -s zmk/app -b ${{ steps.inputs.outputs.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
- name: Prepare artifacts
run: |
mkdir ${{ steps.variables.outputs.artifact-dir }}
cp "${{ steps.variables.outputs.configfile }}" "${{ steps.variables.outputs.artifact-dir }}"
for extension in "hex" "uf2"
do
file="build/zephyr/zmk.$extension"
if [ -f "$file" ]
then
cp "$file" "${{ steps.variables.outputs.artifact-dir }}/${{ steps.variables.outputs.artifact-build-name }}.$extension"
fi
done
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ steps.variables.outputs.artifact-generic-name }}
path: ${{ steps.variables.outputs.artifact-dir }}
continue-on-error: true

206
.github/workflows/build-matrix.yml vendored Normal file
View File

@ -0,0 +1,206 @@
name: 'Build matrix'
on:
- workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
container:
image: zmkfirmware/zmk-build-arm:2.5
strategy:
fail-fast: false
matrix:
shield:
# with shield:
# - absolem # out
# - bastyl_left # out
# - bastyl_right # out
# - corne_left # in
# - corne_right # in
# - cradio36_left # TODO
# - cradio36_right # TODO
# - cradio_left # in
# - cradio_right # in
# - cradios_left # TODO
# - cradios_right # TODO
# - cradioz_left # TODO
# - cradioz_right # TODO
# - crbn # in
# - eek # in
# - helix_left # in
# - helix_right # in
# - iris_left # in
# - iris_right # in
# - jian_left # in
# - jian_right # in
# - jorne_left # in
# - jorne_right # in
# - kyria_left # in
# - kyria_right # in
# - lily58_left # in
# - lily58_right # in
# - microdox_left # in
# - microdox_right # in
# - pteron36_left # out
# - pteron36_right # out
# - sofle_left # in
# - sofle_right # in
# - splitreus62_left # in
# - splitreus62_right # in
# without shield:
- ""
board:
# with shield:
# - bluemicro840
# - nice_nano
# - nice_nano_v2
# - nrfmicro
# - proton_c
# without shield:
# - ahokore # out
# - corne-ish_zen_left # TODO
# - corne-ish_zen_right # TODO
# - ferris_rev02_left # WIP
# - ferris_rev02_right # WIP
# - planck_rev6 # in
- zaphod # out
alphas:
- ""
# - colemak
# - colemakdhk
# - dvorak
# - halmak
# - workman
# - qwerty
nav:
- ""
# - vi
# - invertedt
clipboard:
- ""
# - fun
# - mac
# - win
layers:
- ""
# - flip
mapping:
- ""
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Process inputs
id: inputs
run: |
echo "::set-output name=board::${{ matrix.board }}"
echo "::set-output name=shield::${{ matrix.shield }}"
echo "::set-output name=alphas::${{ matrix.alphas }}"
echo "::set-output name=nav::${{ matrix.nav }}"
echo "::set-output name=clipboard::${{ matrix.clipboard }}"
echo "::set-output name=layers::${{ matrix.layers }}"
echo "::set-output name=mapping::${{ matrix.mapping }}"
- name: Process variables
id: variables
run: |
keyboard=${{ steps.inputs.outputs.board }}
if [ -n "${{ steps.inputs.outputs.shield }}" ]
then
SHIELD_ARG="-DSHIELD=${{ steps.inputs.outputs.shield }}"
keyboard=${{ steps.inputs.outputs.shield }}
fi
echo "::set-output name=shield-arg::${SHIELD_ARG}"
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
configfile="${GITHUB_WORKSPACE}/miryoku/config.h"
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
echo "::set-output name=configfile::$configfile"
artifact_build_name="miryoku_zmk ${{ steps.inputs.outputs.shield }} ${{ steps.inputs.outputs.board }}"
for option in "alphas_${{ steps.inputs.outputs.alphas }}" "nav_${{ steps.inputs.outputs.nav }}" "clipboard_${{ steps.inputs.outputs.clipboard }}" "layers_${{ steps.inputs.outputs.layers }}" "mapping_${{ steps.inputs.outputs.mapping }}"
do
case "$option" in
*_ ) ;;
* )
artifact_build_name="$artifact_build_name $option"
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
;;
esac
done
artifact_build_name=`echo $artifact_build_name | tr ' ' '-'`
echo "::set-output name=artifact-build-name::$artifact_build_name"
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
echo "::set-output name=artifact-dir::artifacts"
manifests="manifests"
manifest="$manifests/west-$keyboard.yml"
if [ ! -f "config/$manifest" ]
then
manifest="west.yml"
fi
echo "::set-output name=manifest::$manifest"
echo "::set-output name=board-config::board-config"
env_file="config/board-configs/$keyboard.env"
if [ -f "$env_file" ]
then
cat "$env_file" >> $GITHUB_ENV
echo "::set-output name=has_board_config::true"
fi
- name: Checkout board-config
if: ${{ steps.variables.outputs.has_board_config == 'true' }}
uses: actions/checkout@v2
with:
repository: ${{ env.board_config_repository }}
ref: ${{ env.board_config_ref }}
path: ${{ steps.variables.outputs.board-config }}
- name: Use board-config
if: ${{ steps.variables.outputs.has_board_config == 'true' }}
run: |
mkdir -p `dirname "config/${{ env.board_config_to }}"`
ln -sr ${{ steps.variables.outputs.board-config }}/${{ env.board_config_from }} config/${{ env.board_config_to }}
if [ -n "${{ env.board_config_manifestdir }}" ]
then
cp ${{ steps.variables.outputs.board-config }}/${{ env.board_config_manifestdir }}/west.yml config/
cat config/west.yml
fi
- name: Cache west modules
uses: actions/cache@v2
env:
cache-name: zephyr
with:
path: |
bootloader/
modules/
tools/
zephyr/
zmk/
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('config/{0}', steps.variables.outputs.manifest)) }}
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
timeout-minutes: 2
continue-on-error: true
- name: Initialize workspace (west init)
run: west init -l config --mf ${{ steps.variables.outputs.manifest }}
- name: Update modules (west update)
run: west update
- name: Export Zephyr CMake package (west zephyr-export)
run: west zephyr-export
- name: Build (west build)
run: west build -s zmk/app -b ${{ steps.inputs.outputs.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
- name: Prepare artifacts
run: |
mkdir ${{ steps.variables.outputs.artifact-dir }}
cp "${{ steps.variables.outputs.configfile }}" "${{ steps.variables.outputs.artifact-dir }}"
for extension in "hex" "uf2"
do
file="build/zephyr/zmk.$extension"
if [ -f "$file" ]
then
cp "$file" "${{ steps.variables.outputs.artifact-dir }}/${{ steps.variables.outputs.artifact-build-name }}.$extension"
fi
done
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ steps.variables.outputs.artifact-generic-name }}
path: ${{ steps.variables.outputs.artifact-dir }}
continue-on-error: true

View File

@ -1,123 +0,0 @@
name: 'Build with inputs'
on:
workflow_dispatch:
inputs:
board:
description: 'Board'
required: true
default: 'nice_nano'
shield:
description: 'Shield'
required: false
default: 'corne_left'
alphas:
description: 'Miryoku Alphas'
required: false
default: ''
nav:
description: 'Miryoku Nav'
required: false
default: ''
clipboard:
description: 'Miryoku Clipboard'
required: false
default: ''
layers:
description: 'Miryoku Layers'
required: false
default: ''
mapping:
description: 'Miryoku Mapping'
required: false
default: ''
jobs:
build:
runs-on: ubuntu-latest
container:
image: zmkfirmware/zmk-build-arm:2.4
strategy:
fail-fast: false
steps:
- name: Check inputs
run: |
echo "board: ${{ github.event.inputs.board }}"
echo "shield: ${{ github.event.inputs.shield }}"
echo "alphas: ${{ github.event.inputs.alphas }}"
echo "nav: ${{ github.event.inputs.nav }}"
echo "clipboard: ${{ github.event.inputs.clipboard }}"
echo "layers: ${{ github.event.inputs.layers }}"
echo "mapping: ${{ github.event.inputs.mapping }}"
- name: Checkout
uses: actions/checkout@v2
- name: Cache west modules
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('config/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)
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: Process variables
id: variables
run: |
if [ -n "${{ github.event.inputs.shield }}" ]
then
SHIELD_ARG="-DSHIELD=${{ github.event.inputs.shield }}"
fi
echo "::set-output name=shield-arg::${SHIELD_ARG}"
configfile="${GITHUB_WORKSPACE}/miryoku/config.h"
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
echo "::set-output name=configfile::$configfile"
artifact_build_name="miryoku_zmk ${{ github.event.inputs.shield }} ${{ github.event.inputs.board }}"
for option in "alphas_${{ github.event.inputs.alphas }}" "nav_${{ github.event.inputs.nav }}" "clipboard_${{ github.event.inputs.clipboard }}" "layers_${{ github.event.inputs.layers }}" "mapping_${{ github.event.inputs.mapping }}"
do
case "$option" in
*_ ) ;;
* )
artifact_build_name="$artifact_build_name $option"
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
;;
esac
done
artifact_build_name=`echo $artifact_build_name | tr ' ' '-'`
echo "::set-output name=artifact-build-name::$artifact_build_name"
echo "::set-output name=artifact-generic-name::$artifact_build_name"
echo "::set-output name=artifact-dir::artifacts"
- name: Build (west build)
run: west build -s zmk/app -b ${{ github.event.inputs.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
- name: Prepare artifacts
run: |
mkdir ${{ steps.variables.outputs.artifact-dir }}
cp "${{ steps.variables.outputs.configfile }}" "${{ steps.variables.outputs.artifact-dir }}"
for extension in "hex" "uf2"
do
file="build/zephyr/zmk.$extension"
if [ -f "$file" ]
then
cp "$file" "${{ steps.variables.outputs.artifact-dir }}/${{ steps.variables.outputs.artifact-build-name }}.$extension"
fi
done
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ steps.variables.outputs.artifact-generic-name }}
path: ${{ steps.variables.outputs.artifact-dir }}
continue-on-error: true

View File

@ -1,117 +0,0 @@
name: 'Build zaphod with all options'
on:
- workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
container:
image: zmkfirmware/zmk-build-arm:2.4
strategy:
fail-fast: false
matrix:
shield:
- ""
board:
- zaphod
alphas:
- ""
# - colemak
# - colemakdhk
# - dvorak
# - halmak
# - workman
# - qwerty
nav:
- ""
# - vi
clipboard:
- ""
# - fun
# - mac
# - win
layers:
- ""
mapping:
- ""
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout zaphod
uses: actions/checkout@v2
with:
repository: petejohanson/zaphod-config
path: petejohanson-zaphod-config
- name: Add zaphod
run: |
cp petejohanson-zaphod-config/west.yml config/
ln -s ../petejohanson-zaphod-config/boards config/
- name: Cache west modules
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('config/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)
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: Process matrix
id: variables
run: |
if [ -n "${{ matrix.shield }}" ]
then
SHIELD_ARG="-DSHIELD=${{ matrix.shield }}"
fi
echo "::set-output name=shield-arg::${SHIELD_ARG}"
configfile="${GITHUB_WORKSPACE}/miryoku/config.h"
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
echo "::set-output name=configfile::$configfile"
artifact_build_name="miryoku_zmk ${{ matrix.shield }} ${{ matrix.board }}"
for option in "alphas_${{ matrix.alphas }}" "nav_${{ matrix.nav }}" "clipboard_${{ matrix.clipboard }}" "layers_${{ matrix.layers }}" "mapping_${{ matrix.mapping }}"
do
case "$option" in
*_ ) ;;
* )
artifact_build_name="$artifact_build_name $option"
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
;;
esac
done
artifact_build_name=`echo $artifact_build_name | tr ' ' '-'`
echo "::set-output name=artifact-build-name::$artifact_build_name"
echo "::set-output name=artifact-generic-name::$artifact_build_name"
echo "::set-output name=artifact-dir::artifacts"
- name: Build (west build)
run: west build -s zmk/app -b ${{ matrix.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
- name: Prepare artifacts
run: |
mkdir ${{ steps.variables.outputs.artifact-dir }}
cp "${{ steps.variables.outputs.configfile }}" "${{ steps.variables.outputs.artifact-dir }}"
for extension in "hex" "uf2"
do
file="build/zephyr/zmk.$extension"
if [ -f "$file" ]
then
cp "$file" "${{ steps.variables.outputs.artifact-dir }}/${{ steps.variables.outputs.artifact-build-name }}.$extension"
fi
done
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ steps.variables.outputs.artifact-generic-name }}
path: ${{ steps.variables.outputs.artifact-dir }}
continue-on-error: true

206
.github/workflows/test-boards.yml vendored Normal file
View File

@ -0,0 +1,206 @@
name: 'Test Boards'
on:
- workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
container:
image: zmkfirmware/zmk-build-arm:2.5
strategy:
fail-fast: false
matrix:
shield:
# with shield:
# - absolem # out
# - bastyl_left # out
# - bastyl_right # out
# - corne_left # in
# - corne_right # in
# - cradio36_left # TODO
# - cradio36_right # TODO
# - cradio_left # in
# - cradio_right # in
# - cradios_left # TODO
# - cradios_right # TODO
# - cradioz_left # TODO
# - cradioz_right # TODO
# - crbn # in
# - eek # in
# - helix_left # in
# - helix_right # in
# - iris_left # in
# - iris_right # in
# - jian_left # in
# - jian_right # in
# - jorne_left # in
# - jorne_right # in
# - kyria_left # in
# - kyria_right # in
# - lily58_left # in
# - lily58_right # in
# - microdox_left # in
# - microdox_right # in
# - pteron36_left # out
# - pteron36_right # out
# - sofle_left # in
# - sofle_right # in
# - splitreus62_left # in
# - splitreus62_right # in
# without shield:
- ""
board:
# with shield:
# - bluemicro840
# - nice_nano
# - nice_nano_v2
# - nrfmicro
# - proton_c
# without shield:
- ahokore # out
# - corne-ish_zen_left # TODO
# - corne-ish_zen_right # TODO
# - ferris_rev02_left # WIP
# - ferris_rev02_right # WIP
- planck_rev6 # in
- zaphod # out
alphas:
- ""
# - colemak
# - colemakdhk
# - dvorak
# - halmak
# - workman
# - qwerty
nav:
- ""
# - vi
# - invertedt
clipboard:
- ""
# - fun
# - mac
# - win
layers:
- ""
# - flip
mapping:
- ""
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Process inputs
id: inputs
run: |
echo "::set-output name=board::${{ matrix.board }}"
echo "::set-output name=shield::${{ matrix.shield }}"
echo "::set-output name=alphas::${{ matrix.alphas }}"
echo "::set-output name=nav::${{ matrix.nav }}"
echo "::set-output name=clipboard::${{ matrix.clipboard }}"
echo "::set-output name=layers::${{ matrix.layers }}"
echo "::set-output name=mapping::${{ matrix.mapping }}"
- name: Process variables
id: variables
run: |
keyboard=${{ steps.inputs.outputs.board }}
if [ -n "${{ steps.inputs.outputs.shield }}" ]
then
SHIELD_ARG="-DSHIELD=${{ steps.inputs.outputs.shield }}"
keyboard=${{ steps.inputs.outputs.shield }}
fi
echo "::set-output name=shield-arg::${SHIELD_ARG}"
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
configfile="${GITHUB_WORKSPACE}/miryoku/config.h"
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
echo "::set-output name=configfile::$configfile"
artifact_build_name="miryoku_zmk ${{ steps.inputs.outputs.shield }} ${{ steps.inputs.outputs.board }}"
for option in "alphas_${{ steps.inputs.outputs.alphas }}" "nav_${{ steps.inputs.outputs.nav }}" "clipboard_${{ steps.inputs.outputs.clipboard }}" "layers_${{ steps.inputs.outputs.layers }}" "mapping_${{ steps.inputs.outputs.mapping }}"
do
case "$option" in
*_ ) ;;
* )
artifact_build_name="$artifact_build_name $option"
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
;;
esac
done
artifact_build_name=`echo $artifact_build_name | tr ' ' '-'`
echo "::set-output name=artifact-build-name::$artifact_build_name"
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
echo "::set-output name=artifact-dir::artifacts"
manifests="manifests"
manifest="$manifests/west-$keyboard.yml"
if [ ! -f "config/$manifest" ]
then
manifest="west.yml"
fi
echo "::set-output name=manifest::$manifest"
echo "::set-output name=board-config::board-config"
env_file="config/board-configs/$keyboard.env"
if [ -f "$env_file" ]
then
cat "$env_file" >> $GITHUB_ENV
echo "::set-output name=has_board_config::true"
fi
- name: Checkout board-config
if: ${{ steps.variables.outputs.has_board_config == 'true' }}
uses: actions/checkout@v2
with:
repository: ${{ env.board_config_repository }}
ref: ${{ env.board_config_ref }}
path: ${{ steps.variables.outputs.board-config }}
- name: Use board-config
if: ${{ steps.variables.outputs.has_board_config == 'true' }}
run: |
mkdir -p `dirname "config/${{ env.board_config_to }}"`
ln -sr ${{ steps.variables.outputs.board-config }}/${{ env.board_config_from }} config/${{ env.board_config_to }}
if [ -n "${{ env.board_config_manifestdir }}" ]
then
cp ${{ steps.variables.outputs.board-config }}/${{ env.board_config_manifestdir }}/west.yml config/
cat config/west.yml
fi
- name: Cache west modules
uses: actions/cache@v2
env:
cache-name: zephyr
with:
path: |
bootloader/
modules/
tools/
zephyr/
zmk/
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('config/{0}', steps.variables.outputs.manifest)) }}
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
timeout-minutes: 2
continue-on-error: true
- name: Initialize workspace (west init)
run: west init -l config --mf ${{ steps.variables.outputs.manifest }}
- name: Update modules (west update)
run: west update
- name: Export Zephyr CMake package (west zephyr-export)
run: west zephyr-export
- name: Build (west build)
run: west build -s zmk/app -b ${{ steps.inputs.outputs.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
- name: Prepare artifacts
run: |
mkdir ${{ steps.variables.outputs.artifact-dir }}
cp "${{ steps.variables.outputs.configfile }}" "${{ steps.variables.outputs.artifact-dir }}"
for extension in "hex" "uf2"
do
file="build/zephyr/zmk.$extension"
if [ -f "$file" ]
then
cp "$file" "${{ steps.variables.outputs.artifact-dir }}/${{ steps.variables.outputs.artifact-build-name }}.$extension"
fi
done
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ steps.variables.outputs.artifact-generic-name }}
path: ${{ steps.variables.outputs.artifact-dir }}
continue-on-error: true

211
.github/workflows/test-build.yml vendored Normal file
View File

@ -0,0 +1,211 @@
name: 'Test Build'
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
build:
if: github.repository == 'manna-harbour/zmk-config'
runs-on: ubuntu-latest
container:
image: zmkfirmware/zmk-build-arm:2.5
strategy:
fail-fast: false
matrix:
shield:
# with shield:
# - absolem # out
# - bastyl_left # out
# - bastyl_right # out
- corne_left # in
# - corne_right # in
# - cradio36_left # TODO
# - cradio36_right # TODO
# - cradio_left # in
# - cradio_right # in
# - cradios_left # TODO
# - cradios_right # TODO
# - cradioz_left # TODO
# - cradioz_right # TODO
# - crbn # in
# - eek # in
# - helix_left # in
# - helix_right # in
# - iris_left # in
# - iris_right # in
# - jian_left # in
# - jian_right # in
# - jorne_left # in
# - jorne_right # in
# - kyria_left # in
# - kyria_right # in
# - lily58_left # in
# - lily58_right # in
# - microdox_left # in
# - microdox_right # in
# - pteron36_left # out
# - pteron36_right # out
# - sofle_left # in
# - sofle_right # in
# - splitreus62_left # in
# - splitreus62_right # in
# without shield:
# - ""
board:
# with shield:
# - bluemicro840
- nice_nano
# - nice_nano_v2
# - nrfmicro
# - proton_c
# without shield:
# - ahokore # out
# - corne-ish_zen_left # TODO
# - corne-ish_zen_right # TODO
# - ferris_rev02_left # WIP
# - ferris_rev02_right # WIP
# - planck_rev6 # in
# - zaphod # out
alphas:
- ""
# - colemak
# - colemakdhk
# - dvorak
# - halmak
# - workman
# - qwerty
nav:
- ""
# - vi
# - invertedt
clipboard:
- ""
# - fun
# - mac
# - win
layers:
- ""
# - flip
mapping:
- ""
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Process inputs
id: inputs
run: |
echo "::set-output name=board::${{ matrix.board }}"
echo "::set-output name=shield::${{ matrix.shield }}"
echo "::set-output name=alphas::${{ matrix.alphas }}"
echo "::set-output name=nav::${{ matrix.nav }}"
echo "::set-output name=clipboard::${{ matrix.clipboard }}"
echo "::set-output name=layers::${{ matrix.layers }}"
echo "::set-output name=mapping::${{ matrix.mapping }}"
- name: Process variables
id: variables
run: |
keyboard=${{ steps.inputs.outputs.board }}
if [ -n "${{ steps.inputs.outputs.shield }}" ]
then
SHIELD_ARG="-DSHIELD=${{ steps.inputs.outputs.shield }}"
keyboard=${{ steps.inputs.outputs.shield }}
fi
echo "::set-output name=shield-arg::${SHIELD_ARG}"
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
configfile="${GITHUB_WORKSPACE}/miryoku/config.h"
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
echo "::set-output name=configfile::$configfile"
artifact_build_name="miryoku_zmk ${{ steps.inputs.outputs.shield }} ${{ steps.inputs.outputs.board }}"
for option in "alphas_${{ steps.inputs.outputs.alphas }}" "nav_${{ steps.inputs.outputs.nav }}" "clipboard_${{ steps.inputs.outputs.clipboard }}" "layers_${{ steps.inputs.outputs.layers }}" "mapping_${{ steps.inputs.outputs.mapping }}"
do
case "$option" in
*_ ) ;;
* )
artifact_build_name="$artifact_build_name $option"
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
;;
esac
done
artifact_build_name=`echo $artifact_build_name | tr ' ' '-'`
echo "::set-output name=artifact-build-name::$artifact_build_name"
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
echo "::set-output name=artifact-dir::artifacts"
manifests="manifests"
manifest="$manifests/west-$keyboard.yml"
if [ ! -f "config/$manifest" ]
then
manifest="west.yml"
fi
echo "::set-output name=manifest::$manifest"
echo "::set-output name=board-config::board-config"
env_file="config/board-configs/$keyboard.env"
if [ -f "$env_file" ]
then
cat "$env_file" >> $GITHUB_ENV
echo "::set-output name=has_board_config::true"
fi
- name: Checkout board-config
if: ${{ steps.variables.outputs.has_board_config == 'true' }}
uses: actions/checkout@v2
with:
repository: ${{ env.board_config_repository }}
ref: ${{ env.board_config_ref }}
path: ${{ steps.variables.outputs.board-config }}
- name: Use board-config
if: ${{ steps.variables.outputs.has_board_config == 'true' }}
run: |
mkdir -p `dirname "config/${{ env.board_config_to }}"`
ln -sr ${{ steps.variables.outputs.board-config }}/${{ env.board_config_from }} config/${{ env.board_config_to }}
if [ -n "${{ env.board_config_manifestdir }}" ]
then
cp ${{ steps.variables.outputs.board-config }}/${{ env.board_config_manifestdir }}/west.yml config/
cat config/west.yml
fi
- name: Cache west modules
uses: actions/cache@v2
env:
cache-name: zephyr
with:
path: |
bootloader/
modules/
tools/
zephyr/
zmk/
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('config/{0}', steps.variables.outputs.manifest)) }}
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
timeout-minutes: 2
continue-on-error: true
- name: Initialize workspace (west init)
run: west init -l config --mf ${{ steps.variables.outputs.manifest }}
- name: Update modules (west update)
run: west update
- name: Export Zephyr CMake package (west zephyr-export)
run: west zephyr-export
- name: Build (west build)
run: west build -s zmk/app -b ${{ steps.inputs.outputs.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
- name: Prepare artifacts
run: |
mkdir ${{ steps.variables.outputs.artifact-dir }}
cp "${{ steps.variables.outputs.configfile }}" "${{ steps.variables.outputs.artifact-dir }}"
for extension in "hex" "uf2"
do
file="build/zephyr/zmk.$extension"
if [ -f "$file" ]
then
cp "$file" "${{ steps.variables.outputs.artifact-dir }}/${{ steps.variables.outputs.artifact-build-name }}.$extension"
fi
done
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ steps.variables.outputs.artifact-generic-name }}
path: ${{ steps.variables.outputs.artifact-dir }}
continue-on-error: true

206
.github/workflows/test-configs.yml vendored Normal file
View File

@ -0,0 +1,206 @@
name: 'Test Configs'
on:
- workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
container:
image: zmkfirmware/zmk-build-arm:2.5
strategy:
fail-fast: false
matrix:
shield:
# with shield:
# - absolem # out
# - bastyl_left # out
# - bastyl_right # out
- corne_left # in
# - corne_right # in
# - cradio36_left # TODO
# - cradio36_right # TODO
# - cradio_left # in
# - cradio_right # in
# - cradios_left # TODO
# - cradios_right # TODO
# - cradioz_left # TODO
# - cradioz_right # TODO
# - crbn # in
# - eek # in
# - helix_left # in
# - helix_right # in
# - iris_left # in
# - iris_right # in
# - jian_left # in
# - jian_right # in
# - jorne_left # in
# - jorne_right # in
# - kyria_left # in
# - kyria_right # in
# - lily58_left # in
# - lily58_right # in
# - microdox_left # in
# - microdox_right # in
# - pteron36_left # out
# - pteron36_right # out
# - sofle_left # in
# - sofle_right # in
# - splitreus62_left # in
# - splitreus62_right # in
# without shield:
# - ""
board:
# with shield:
# - bluemicro840
- nice_nano
# - nice_nano_v2
# - nrfmicro
# - proton_c
# without shield:
# - ahokore # out
# - corne-ish_zen_left # TODO
# - corne-ish_zen_right # TODO
# - ferris_rev02_left # WIP
# - ferris_rev02_right # WIP
# - planck_rev6 # in
# - zaphod # out
alphas:
- ""
- colemak
- colemakdhk
- dvorak
- halmak
- workman
- qwerty
nav:
- ""
- vi
- invertedt
clipboard:
- ""
- fun
- mac
- win
layers:
- ""
# - flip
mapping:
- ""
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Process inputs
id: inputs
run: |
echo "::set-output name=board::${{ matrix.board }}"
echo "::set-output name=shield::${{ matrix.shield }}"
echo "::set-output name=alphas::${{ matrix.alphas }}"
echo "::set-output name=nav::${{ matrix.nav }}"
echo "::set-output name=clipboard::${{ matrix.clipboard }}"
echo "::set-output name=layers::${{ matrix.layers }}"
echo "::set-output name=mapping::${{ matrix.mapping }}"
- name: Process variables
id: variables
run: |
keyboard=${{ steps.inputs.outputs.board }}
if [ -n "${{ steps.inputs.outputs.shield }}" ]
then
SHIELD_ARG="-DSHIELD=${{ steps.inputs.outputs.shield }}"
keyboard=${{ steps.inputs.outputs.shield }}
fi
echo "::set-output name=shield-arg::${SHIELD_ARG}"
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
configfile="${GITHUB_WORKSPACE}/miryoku/config.h"
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
echo "::set-output name=configfile::$configfile"
artifact_build_name="miryoku_zmk ${{ steps.inputs.outputs.shield }} ${{ steps.inputs.outputs.board }}"
for option in "alphas_${{ steps.inputs.outputs.alphas }}" "nav_${{ steps.inputs.outputs.nav }}" "clipboard_${{ steps.inputs.outputs.clipboard }}" "layers_${{ steps.inputs.outputs.layers }}" "mapping_${{ steps.inputs.outputs.mapping }}"
do
case "$option" in
*_ ) ;;
* )
artifact_build_name="$artifact_build_name $option"
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
;;
esac
done
artifact_build_name=`echo $artifact_build_name | tr ' ' '-'`
echo "::set-output name=artifact-build-name::$artifact_build_name"
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
echo "::set-output name=artifact-dir::artifacts"
manifests="manifests"
manifest="$manifests/west-$keyboard.yml"
if [ ! -f "config/$manifest" ]
then
manifest="west.yml"
fi
echo "::set-output name=manifest::$manifest"
echo "::set-output name=board-config::board-config"
env_file="config/board-configs/$keyboard.env"
if [ -f "$env_file" ]
then
cat "$env_file" >> $GITHUB_ENV
echo "::set-output name=has_board_config::true"
fi
- name: Checkout board-config
if: ${{ steps.variables.outputs.has_board_config == 'true' }}
uses: actions/checkout@v2
with:
repository: ${{ env.board_config_repository }}
ref: ${{ env.board_config_ref }}
path: ${{ steps.variables.outputs.board-config }}
- name: Use board-config
if: ${{ steps.variables.outputs.has_board_config == 'true' }}
run: |
mkdir -p `dirname "config/${{ env.board_config_to }}"`
ln -sr ${{ steps.variables.outputs.board-config }}/${{ env.board_config_from }} config/${{ env.board_config_to }}
if [ -n "${{ env.board_config_manifestdir }}" ]
then
cp ${{ steps.variables.outputs.board-config }}/${{ env.board_config_manifestdir }}/west.yml config/
cat config/west.yml
fi
- name: Cache west modules
uses: actions/cache@v2
env:
cache-name: zephyr
with:
path: |
bootloader/
modules/
tools/
zephyr/
zmk/
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('config/{0}', steps.variables.outputs.manifest)) }}
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
timeout-minutes: 2
continue-on-error: true
- name: Initialize workspace (west init)
run: west init -l config --mf ${{ steps.variables.outputs.manifest }}
- name: Update modules (west update)
run: west update
- name: Export Zephyr CMake package (west zephyr-export)
run: west zephyr-export
- name: Build (west build)
run: west build -s zmk/app -b ${{ steps.inputs.outputs.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
- name: Prepare artifacts
run: |
mkdir ${{ steps.variables.outputs.artifact-dir }}
cp "${{ steps.variables.outputs.configfile }}" "${{ steps.variables.outputs.artifact-dir }}"
for extension in "hex" "uf2"
do
file="build/zephyr/zmk.$extension"
if [ -f "$file" ]
then
cp "$file" "${{ steps.variables.outputs.artifact-dir }}/${{ steps.variables.outputs.artifact-build-name }}.$extension"
fi
done
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ steps.variables.outputs.artifact-generic-name }}
path: ${{ steps.variables.outputs.artifact-dir }}
continue-on-error: true

206
.github/workflows/test-shields.yml vendored Normal file
View File

@ -0,0 +1,206 @@
name: 'Test Shields'
on:
- workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
container:
image: zmkfirmware/zmk-build-arm:2.5
strategy:
fail-fast: false
matrix:
shield:
# with shield:
- absolem # out
- bastyl_left # out
- bastyl_right # out
- corne_left # in
- corne_right # in
# - cradio36_left # TODO
# - cradio36_right # TODO
- cradio_left # in
- cradio_right # in
# - cradios_left # TODO
# - cradios_right # TODO
# - cradioz_left # TODO
# - cradioz_right # TODO
- crbn # in
- eek # in
- helix_left # in
- helix_right # in
- iris_left # in
- iris_right # in
- jian_left # in
- jian_right # in
- jorne_left # in
- jorne_right # in
- kyria_left # in
- kyria_right # in
- lily58_left # in
- lily58_right # in
- microdox_left # in
- microdox_right # in
- pteron36_left # out
- pteron36_right # out
- sofle_left # in
- sofle_right # in
- splitreus62_left # in
- splitreus62_right # in
# without shield:
# - ""
board:
# with shield:
# - bluemicro840
- nice_nano
# - nice_nano_v2
# - nrfmicro
# - proton_c
# without shield:
# - ahokore # out
# - corne-ish_zen_left # TODO
# - corne-ish_zen_right # TODO
# - ferris_rev02_left # WIP
# - ferris_rev02_right # WIP
# - planck_rev6 # in
# - zaphod # out
alphas:
- ""
# - colemak
# - colemakdhk
# - dvorak
# - halmak
# - workman
# - qwerty
nav:
- ""
# - vi
# - invertedt
clipboard:
- ""
# - fun
# - mac
# - win
layers:
- ""
# - flip
mapping:
- ""
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Process inputs
id: inputs
run: |
echo "::set-output name=board::${{ matrix.board }}"
echo "::set-output name=shield::${{ matrix.shield }}"
echo "::set-output name=alphas::${{ matrix.alphas }}"
echo "::set-output name=nav::${{ matrix.nav }}"
echo "::set-output name=clipboard::${{ matrix.clipboard }}"
echo "::set-output name=layers::${{ matrix.layers }}"
echo "::set-output name=mapping::${{ matrix.mapping }}"
- name: Process variables
id: variables
run: |
keyboard=${{ steps.inputs.outputs.board }}
if [ -n "${{ steps.inputs.outputs.shield }}" ]
then
SHIELD_ARG="-DSHIELD=${{ steps.inputs.outputs.shield }}"
keyboard=${{ steps.inputs.outputs.shield }}
fi
echo "::set-output name=shield-arg::${SHIELD_ARG}"
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
configfile="${GITHUB_WORKSPACE}/miryoku/config.h"
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
echo "::set-output name=configfile::$configfile"
artifact_build_name="miryoku_zmk ${{ steps.inputs.outputs.shield }} ${{ steps.inputs.outputs.board }}"
for option in "alphas_${{ steps.inputs.outputs.alphas }}" "nav_${{ steps.inputs.outputs.nav }}" "clipboard_${{ steps.inputs.outputs.clipboard }}" "layers_${{ steps.inputs.outputs.layers }}" "mapping_${{ steps.inputs.outputs.mapping }}"
do
case "$option" in
*_ ) ;;
* )
artifact_build_name="$artifact_build_name $option"
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
;;
esac
done
artifact_build_name=`echo $artifact_build_name | tr ' ' '-'`
echo "::set-output name=artifact-build-name::$artifact_build_name"
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
echo "::set-output name=artifact-dir::artifacts"
manifests="manifests"
manifest="$manifests/west-$keyboard.yml"
if [ ! -f "config/$manifest" ]
then
manifest="west.yml"
fi
echo "::set-output name=manifest::$manifest"
echo "::set-output name=board-config::board-config"
env_file="config/board-configs/$keyboard.env"
if [ -f "$env_file" ]
then
cat "$env_file" >> $GITHUB_ENV
echo "::set-output name=has_board_config::true"
fi
- name: Checkout board-config
if: ${{ steps.variables.outputs.has_board_config == 'true' }}
uses: actions/checkout@v2
with:
repository: ${{ env.board_config_repository }}
ref: ${{ env.board_config_ref }}
path: ${{ steps.variables.outputs.board-config }}
- name: Use board-config
if: ${{ steps.variables.outputs.has_board_config == 'true' }}
run: |
mkdir -p `dirname "config/${{ env.board_config_to }}"`
ln -sr ${{ steps.variables.outputs.board-config }}/${{ env.board_config_from }} config/${{ env.board_config_to }}
if [ -n "${{ env.board_config_manifestdir }}" ]
then
cp ${{ steps.variables.outputs.board-config }}/${{ env.board_config_manifestdir }}/west.yml config/
cat config/west.yml
fi
- name: Cache west modules
uses: actions/cache@v2
env:
cache-name: zephyr
with:
path: |
bootloader/
modules/
tools/
zephyr/
zmk/
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('config/{0}', steps.variables.outputs.manifest)) }}
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
timeout-minutes: 2
continue-on-error: true
- name: Initialize workspace (west init)
run: west init -l config --mf ${{ steps.variables.outputs.manifest }}
- name: Update modules (west update)
run: west update
- name: Export Zephyr CMake package (west zephyr-export)
run: west zephyr-export
- name: Build (west build)
run: west build -s zmk/app -b ${{ steps.inputs.outputs.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
- name: Prepare artifacts
run: |
mkdir ${{ steps.variables.outputs.artifact-dir }}
cp "${{ steps.variables.outputs.configfile }}" "${{ steps.variables.outputs.artifact-dir }}"
for extension in "hex" "uf2"
do
file="build/zephyr/zmk.$extension"
if [ -f "$file" ]
then
cp "$file" "${{ steps.variables.outputs.artifact-dir }}/${{ steps.variables.outputs.artifact-build-name }}.$extension"
fi
done
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ steps.variables.outputs.artifact-generic-name }}
path: ${{ steps.variables.outputs.artifact-dir }}
continue-on-error: true

6
config/bastyl.keymap Normal file
View File

@ -0,0 +1,6 @@
// https://github.com/manna-harbour/miryoku-zmk/
#define MIRYOKU_COMBO_TPS_ENABLE
#include "../miryoku/mapping/42-corne.h"
#include "../miryoku/miryoku.dtsi"

View File

@ -0,0 +1,5 @@
board_config_repository=mrzealot/zmk-config
board_config_ref=master
board_config_from=/
board_config_to=boards/shields/absolem

View File

@ -0,0 +1,4 @@
board_config_repository=dezlidezlidezli/ahokore-zmk-config
board_config_ref=master
board_config_from=config/boards
board_config_to=boards

View File

@ -0,0 +1,5 @@
board_config_repository=mseflek/zmk
board_config_ref=main
board_config_from=app/boards
board_config_to=boards

View File

@ -0,0 +1,4 @@
board_config_repository=petejohanson/zmk
board_config_ref=boards/ferris-02-bling-basics
board_config_from=app/boards
board_config_to=boards

View File

@ -0,0 +1,4 @@
board_config_repository=harshitgoel96/zmk
board_config_ref=pteron36
board_config_from=app/boards
board_config_to=boards

View File

@ -0,0 +1,5 @@
board_config_repository=petejohanson/zaphod-config
board_config_ref=main
board_config_from=boards
board_config_to=boards
board_config_manifestdir=.

View File

@ -1,13 +0,0 @@
manifest:
remotes:
- name: zmkfirmware
url-base: https://github.com/zmkfirmware
- name: dezlidezlidezli
url-base: https://github.com/dezlidezlidezli
projects:
- name: zmk
remote: dezlidezlidezli
revision: ahokorev2
import: app/west.yml
self:
path: config

View File

@ -37,6 +37,7 @@ Clone this repo and use for [[https://zmk.dev/docs/development/build-flash#build
** GitHub Actions Workflows
Some out of tree boards and shields are automatically supported in the included workflows. See [[./config/board-configs/]].
*** Prebuilt Firmware
@ -45,12 +46,12 @@ Some prebuilt firmware can be downloaded from the repo. Log in to GitHub, visit
*** Inputs
Fork this repo, select the [[https://github.com/manna-harbour/zmk-config/actions/workflows/build-with-inputs.yml][Build with inputs]] workflow action, select Run workflow, fill out the form with a [[#Supported-Keyboards][supported keyboard]] and [[#configuration-options][configuration options]], activate Run workflow, wait for successful completion, select the workflow run, select the Artifacts, and unzip the downloaded zip file.
Fork this repo, select the [[https://github.com/manna-harbour/zmk-config/actions/workflows/build-inputs.yml][Build Inputs]] workflow action, select Run workflow, fill out the form with a [[#Supported-Keyboards][supported keyboard]] and [[#configuration-options][configuration options]], activate Run workflow, wait for successful completion, select the workflow run, select the Artifacts, and unzip the downloaded zip file.
*** Customise Workflow Files
Fork this repo and edit the included workflow files with [[#Supported-Keyboards][supported keyboards]] and [[#configuration-options][configuration options]].
Fork this repo, copy, and edit the included [[https://github.com/manna-harbour/zmk-config/actions/workflows/build-matrix.yml][Build Matrix]] workflow files with [[#Supported-Keyboards][supported keyboards]] and [[#configuration-options][configuration options]].
* Miryoku Keymap