Remove redundant build matrix template

This commit is contained in:
Manna Harbour 2021-08-16 20:47:57 +10:00
parent 07e397cd6d
commit 14d94ba4e8
4 changed files with 43 additions and 366 deletions

View File

@ -1,216 +0,0 @@
# generated -*- buffer-read-only: t -*-
# Copyright 2021 Manna Harbour
# https://github.com/manna-harbour/miryoku
name: 'Build Matrix Template'
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 # outboard
# - bastyl_left # outboard
# - bastyl_right # outboard
# - boardsource5x12 # outboard
# - contra # outboard
# - corne_left
# - corne_right
# - cradio36_left # outboard
# - cradio36_right # outboard
# - cradio_left
# - cradio_right
# - cradios_left # outboard
# - cradios_right # outboard
# - crbn
# - eek
# - ergodash_left # outboard
# - ergodash_right # outboard
# - helix_left
# - helix_right
# - iris_left
# - iris_right
# - jian_left
# - jian_right
# - jorne_left
# - jorne_right
# - kyria_left
# - kyria_right
# - levinson_left # outboard
# - levinson_right # outboard
# - lily58_left
# - lily58_right
# - microdox_left
# - microdox_right
# - naked60 # outboard
# - pockettype # outboard
# - pteron36_left # outboard
# - pteron36_right # outboard
# - rebound_v4 # outboard
# - reviung39 # outboard
# - reviung41
# - sofle_left
# - sofle_right
# - sweepv2_left # outboard
# - sweepv2_right # outboard
# - splitreus62_left
# - splitreus62_right
# - tbkmini_left # outboard
# - tbkmini_right # outboard
# - viterbi_left # outboard
# - viterbi_right # outboard
# without shield:
# - ""
board:
# with shield:
# - bluemicro840_v1
# - nice_nano
# - nice_nano_v2
# - nrfmicro_11
# - nrfmicro_13
# - proton_c
# without shield:
# - ahokore # outboard
# - corne-ish_zen_left # outboard
# - corne-ish_zen_right # outboard
# - ferris_rev02 # outboard
# - planck_rev6
# - preonic_rev3 # outboard
# - zaphod # outboard
alphas:
# - default
# - colemak
# - colemakdhk
# - dvorak
# - halmak
# - workman
# - qwerty
nav:
# - default
# - vi
# - invertedt # TODO
clipboard:
# - default
# - fun
# - mac
# - win
layers:
# - default
# - flip # TODO
mapping:
# - default
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Process variables
id: variables
run: |
if [ -n "${{ matrix.shield }}" -a "${{ matrix.shield }}" != "default" ]
then
SHIELD_ARG="-DSHIELD=${{ matrix.shield }}"
keyboard=${{ matrix.shield }}
shield=${{ matrix.shield }}
else
keyboard=${{ matrix.board }}
shield=""
fi
echo "::set-output name=shield-arg::${SHIELD_ARG}"
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
configfile="${GITHUB_WORKSPACE}/miryoku/config.h"
echo '// Copyright 2021 Manna Harbour\n// https://github.com/manna-harbour/miryoku' > "$configfile"
echo "::set-output name=configfile::$configfile"
artifact_build_name="miryoku_zmk $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
*_ ) ;;
*_default ) ;;
* )
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"
outboard_file=".github/workflows/outboards/$keyboard"
if [ -f "$outboard_file" ]
then
grep -v '^#' "$outboard_file" >> $GITHUB_ENV
fi
echo "::set-output name=outboard_dir::outboard"
- name: Checkout outboard
if: ${{ env.outboard_repository != '' && env.outboard_ref != '' }}
uses: actions/checkout@v2
with:
repository: ${{ env.outboard_repository }}
ref: ${{ env.outboard_ref }}
path: ${{ steps.variables.outputs.outboard_dir }}
- name: Link outboard
if: ${{ env.outboard_from != '' && env.outboard_to != '' }}
run: |
mkdir -p `dirname "config/${{ env.outboard_to }}"`
ln -sr ${{ steps.variables.outputs.outboard_dir }}/${{ env.outboard_from }} config/${{ env.outboard_to }}
- name: Generate outboard manifest
if: ${{ env.outboard_url_base != '' && env.outboard_revision != '' }}
run: |
echo "manifest:\n remotes:\n - name: outboard\n url-base: ${{ env.outboard_url_base }}\n projects:\n - name: zmk\n remote: outboard\n revision: ${{ env.outboard_revision }}\n import: app/west.yml\n self:\n path: config" > config/west.yml
cat config/west.yml
- name: Copy outboard manifest
if: ${{ env.outboard_manifest != '' }}
run: |
cp ${{ steps.variables.outputs.outboard_dir }}/${{ env.outboard_manifest }} config/west.yml
cat config/west.yml
- 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('config/west.yml') }}
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
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: 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 @@
# Copyright 2021 Manna Harbour
# https://github.com/manna-harbour/miryoku
name: 'Build Matrix Template'
m4_include(include/jobs-build.yml.m4)m4_dnl
shield:
# with shield:
# - absolem # outboard
# - bastyl_left # outboard
# - bastyl_right # outboard
# - boardsource5x12 # outboard
# - contra # outboard
# - corne_left
# - corne_right
# - cradio36_left # outboard
# - cradio36_right # outboard
# - cradio_left
# - cradio_right
# - cradios_left # outboard
# - cradios_right # outboard
# - crbn
# - eek
# - ergodash_left # outboard
# - ergodash_right # outboard
# - helix_left
# - helix_right
# - iris_left
# - iris_right
# - jian_left
# - jian_right
# - jorne_left
# - jorne_right
# - kyria_left
# - kyria_right
# - levinson_left # outboard
# - levinson_right # outboard
# - lily58_left
# - lily58_right
# - microdox_left
# - microdox_right
# - naked60 # outboard
# - pockettype # outboard
# - pteron36_left # outboard
# - pteron36_right # outboard
# - rebound_v4 # outboard
# - reviung39 # outboard
# - reviung41
# - sofle_left
# - sofle_right
# - sweepv2_left # outboard
# - sweepv2_right # outboard
# - splitreus62_left
# - splitreus62_right
# - tbkmini_left # outboard
# - tbkmini_right # outboard
# - viterbi_left # outboard
# - viterbi_right # outboard
# without shield:
# - ""
board:
# with shield:
# - bluemicro840_v1
# - nice_nano
# - nice_nano_v2
# - nrfmicro_11
# - nrfmicro_13
# - proton_c
# without shield:
# - ahokore # outboard
# - corne-ish_zen_left # outboard
# - corne-ish_zen_right # outboard
# - ferris_rev02 # outboard
# - planck_rev6
# - preonic_rev3 # outboard
# - zaphod # outboard
alphas:
# - default
# - colemak
# - colemakdhk
# - dvorak
# - halmak
# - workman
# - qwerty
nav:
# - default
# - vi
# - invertedt # TODO
clipboard:
# - default
# - fun
# - mac
# - win
layers:
# - default
# - flip # TODO
mapping:
# - default
m4_include(include/build-steps.yml.m4)m4_dnl

View File

@ -1,7 +1,7 @@
# Copyright 2021 Manna Harbour
# https://github.com/manna-harbour/miryoku
all: ../build-example-corne-nice_nano.yml ../build-example-tbkmini-nice_nano_v2.yml ../build-inputs.yml ../build-matrix-template.yml ../test-boards.yml ../test-build.yml ../test-configs.yml ../test-controllers.yml ../test-shields.yml
all: ../build-example-corne-nice_nano.yml ../build-example-tbkmini-nice_nano_v2.yml ../build-inputs.yml ../test-boards.yml ../test-build.yml ../test-configs.yml ../test-controllers.yml ../test-shields.yml
../%.yml: %.yml.m4 include/* makefile
m4 -P include/init.yml.m4 $< > $@

View File

@ -22,6 +22,8 @@
** Supported Keyboards
See the various Test [[#github-actions-workflows][workflow]] files for lists of supported keyboards.
*** Board Only
@ -32,9 +34,10 @@ Any [[https://github.com/zmkfirmware/zmk/tree/main/app/boards/arm][board support
Any compatible combination of [[https://github.com/zmkfirmware/zmk/tree/main/app/boards/arm][board supported by ZMK]] and [[https://github.com/zmkfirmware/zmk/tree/main/app/boards/shields][shield supported by ZMK]] with a [[#keyboard-keymaps][keymap in Miryoku ZMK]].
*** Out of Tree Boards and Shields
Additionally, some out of tree boards and shields are automatically supported by the included GitHub Actions workflows. See [[./.github/workflows/outboards/]] for supported out of tree boards and shields.
Additionally, some out of tree boards and shields are automatically supported by the included [[#github-actions-workflows][workflows]]. See [[.github/workflows/outboards]].
** Local Builds
@ -44,25 +47,27 @@ Clone this repo and use for [[https://zmk.dev/docs/development/build-flash#build
** GitHub Actions Workflows
*** Inputs
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. Multiple (comma and / or space separated) values can be entered in each field. See the [[#build-matrix-template][Build Matrix Template]] workflow file for examples of supported values.
Workflow files are in [[.github/workflows]]. To access a workflow, log in to GitHub, visit the [[https://github.com/manna-harbour/zmk-config/actions][Actions]] tab, and select the workflow. To download the firmware from a workflow run, select the workflow, select the workflow run, select the desired Artifacts, and unzip the downloaded zip file.
*** Build Matrix Template
*** Build Inputs
Fork this repo, copy the included [[.github/workflows/build-matrix-template.yml][Build Matrix Template workflow file]], edit the ~name~ value, and uncomment the included values for the desired [[#Supported-Keyboards][supported keyboards]] and [[#configuration-options][configuration options]]. See the included Build Example workflows for examples.
Fork this repo, select the [[https://github.com/manna-harbour/zmk-config/actions/workflows/build-inputs.yml][Build Inputs]] workflow, select Run workflow, fill out the form with [[#Supported-Keyboards][supported keyboards]] and [[#configuration-options][configuration options]], activate Run workflow, wait for successful completion. Multiple (comma and / or space separated) values can be entered in each field.
*** Build Examples
Fork this repo, copy one the included Build Example workflow files, edit the ~name~ value, and edit the values for the desired [[#Supported-Keyboards][supported keyboards]] and [[#configuration-options][configuration options]].
*** Prebuilt Firmware
Some prebuilt firmware can be downloaded from the repo. Log in to GitHub, visit the [[https://github.com/manna-harbour/zmk-config/actions][Actions]] tab, select the appropriate workflow, select the latest successful workflow run, select the desired artifact, and unzip the downloaded zip file.
Some prebuilt firmware is available from previous workflow runs.
* Miryoku Keymap
The miryoku keymap is a ZMK DT keymap file using C preprocessor macros for [[#configuration-options][configuration options]] and to abstract the physical layout. The file is [[./miryoku/miryoku.dtsi][miryoku/miryoku.dtsi]]. The file is included into the [[#keyboard-keymaps][keyboard's keymap]] with
The miryoku keymap is a ZMK DT keymap file using C preprocessor macros for [[#configuration-options][configuration options]] and to abstract the physical layout. The file is [[miryoku/miryoku.dtsi]]. The file is included into the [[#keyboard-keymaps][keyboard's keymap]] with
#+BEGIN_SRC C :tangle no
#include "../miryoku/miryoku.dtsi"
@ -71,22 +76,22 @@ The miryoku keymap is a ZMK DT keymap file using C preprocessor macros for [[#co
* Configuration Options
[[https://github.com/manna-harbour/miryoku/blob/master/src/babel/readme.org#keymap-configuration-options][Keymap configuration options]] and [[#mapping][mapping]] configuration options are given in the documentation in the form ~option=value~.
[[https://github.com/manna-harbour/qmk_firmware/blob/miryoku/users/manna-harbour_miryoku/miryoku.org#alternative-layouts][Keymap configuration options]] and [[#mapping][mapping]] configuration options are given in the documentation in the form ~option=value~.
** Configuration Options in Config File
** in Config File
Convert to the form ~#define option_value~. To apply the configuration options to all builds add them to the [[#config-file][config file]]. To apply configuration options to a single keyboard, add them to the [[#keyboard-keymaps][keyboard keymap]] file before any ~#include~ lines.
** Configuration Options in GitHub Actions Workflows
** in Workflows
Convert to the form ~value~ (uppercase or lowercase) and use with the corresponding ~option~ [[#Customise-Workflow-Files][matrix variable]] or [[#Inputs][input]]. Empty fields will use the default value.
Convert to the form ~value~ (uppercase or lowercase) and use with the corresponding ~option~. Use ~default~ to represent the default value.
* Config File
The config file can be used to provide [[#configuration-options][configuration options]] for all [[#Local-Builds][local builds]]. The file is [[./miryoku/config.h][miryoku/config.h]]. See the [[#example-config-file][example config file]].
The config file can be used to provide [[#configuration-options][configuration options]] for all [[#Local-Builds][local builds]]. The file is [[miryoku/config.h]]. See the [[#example-config-file][example config file]].
* Example Config File
@ -109,38 +114,24 @@ Below is an example [[#config-file][config file]] with the following keymap [[#c
* Mapping
The keymap is mapped onto keyboards with different physical layouts. The keymap is specified in terms of the ~MIRYOKU_MAPPING~ macro. The macro is defined in a C header file for each physical layout. Unused keys are mapped to ~&none~. The files are in [[./miryoku/mapping/][miryoku/mapping/]]. The mapping file is included into the keyboard's keymap file before the miryoku keymap with e.g.
The keymap is mapped onto keyboards with different physical layouts. The keymap is specified in terms of the ~MIRYOKU_MAPPING~ macro. The macro is defined in a C header file for each physical layout. Unused keys are mapped to ~&none~. The files are in [[miryoku/mapping/]]. The mapping file is included into the keyboard's keymap file before the miryoku keymap with e.g.
#+BEGIN_SRC C :tangle no
#include "../miryoku/mapping/36-minidox.h"
#+END_SRC
On each hand, only the main alpha block of 3 rows by 5 columns and the 3 most appropriate thumb keys are used. Notes or diagrams are included where the selection of keys is not obvious or where alternatives are provided via mapping [[#configuration-options][configuration options]].
On each hand, only the main alpha block of 3 rows by 5 columns and the 3 most appropriate thumb keys are used.
** Layouts
** Notes
Notes or diagrams are included where the selection of keys is not obvious or where alternatives are provided via mapping [[#configuration-options][configuration options]].
*** 34-ferris
**** Combo TPS
~MIRYOKU_COMBO_TPS=ENABLE~
Combos of primary and secondary thumb keys emulate the missing tertiary thumb
key. This [[#configuration-options][configuration option]] is enabled
automatically for this mapping and can be enabled on other mappings for
compatibility
*** 36-minidox
*** 42-corne
*** 44-jian
Combos of primary and secondary thumb keys emulate the missing tertiary thumb key. This [[#configuration-options][configuration option]] is enabled automatically for this mapping and can be enabled on other mappings for compatibility.
*** 48-planck
@ -148,15 +139,30 @@ compatibility
**** Default
[[https://raw.githubusercontent.com/manna-harbour/miryoku/master/kle-miryoku-mapping-ortho_4x12.png]]
**** Extended Thumbs
~MIRYOKU_MAPPING=EXTENDED_THUMBS~
[[https://raw.githubusercontent.com/manna-harbour/miryoku/master/data/mapping/miryoku-kle-mapping-ortho_4x12-extended_thumbs.png]]
*** 48-lets_split
**** Default
[[https://raw.githubusercontent.com/manna-harbour/miryoku/master/data/mapping/miryoku-kle-mapping-ortho_4x12-extended_thumbs.png]]
**** Pinkie Stagger
~MIRYOKU_MAPPING=PINKIE_STAGGER~
[[https://raw.githubusercontent.com/manna-harbour/miryoku/master/data/mapping/miryoku-kle-mapping-ortho_4x12-split.png]]
*** 50-kyria
@ -173,24 +179,9 @@ compatibility
[[https://raw.githubusercontent.com/manna-harbour/miryoku/master/data/mapping/miryoku-kle-mapping-kyria-extended_thumbs.png]]
*** 56-iris
*** 58-lily58
*** 60-sofle
*** 62-atreus62
*** 64-helix
* Keyboard Keymaps
Keymap files for many keyboards included in ZMK are provided in [[./config/][config/]].
Keymap files for many keyboards included in ZMK are provided in [[config/]].
* Contact