Cleanup workflows

- remove default inputs used even when field is blank
- remove unused matrix elements from tests
- add Test Controllers workflow
This commit is contained in:
Manna Harbour 2021-08-01 07:59:25 +10:00
parent d8979f1b85
commit 365875846e
8 changed files with 172 additions and 215 deletions

View File

@ -5,11 +5,10 @@ on:
board:
description: 'Board'
required: true
default: 'nice_nano'
shield:
description: 'Shield'
required: false
default: 'corne_left'
default: ''
alphas:
description: 'Miryoku Alphas'
required: false

View File

@ -14,8 +14,8 @@ jobs:
# - absolem # out
# - bastyl_left # out
# - bastyl_right # out
# - corne_left # in
# - corne_right # in
- corne_left # in
- corne_right # in
# - cradio36_left # TODO
# - cradio36_right # TODO
# - cradio_left # in
@ -47,14 +47,15 @@ jobs:
# - splitreus62_left # in
# - splitreus62_right # in
# without shield:
- ""
# - ""
board:
# with shield:
# - bluemicro840
# - nice_nano
# - nice_nano_v2
# - nrfmicro
# - proton_c
# - bluemicro840_v1 # in
- nice_nano # in
# - nice_nano_v2 # in
# - nrfmicro_11 # in
# - nrfmicro_13 # in
# - proton_c # in
# without shield:
# - ahokore # out
# - corne-ish_zen_left # TODO
@ -62,7 +63,7 @@ jobs:
# - ferris_rev02_left # WIP
# - ferris_rev02_right # WIP
# - planck_rev6 # in
- zaphod # out
# - zaphod # out
alphas:
- ""
# - colemak
@ -74,7 +75,7 @@ jobs:
nav:
- ""
# - vi
# - invertedt
# - invertedt # TODO
clipboard:
- ""
# - fun
@ -82,7 +83,7 @@ jobs:
# - win
layers:
- ""
# - flip
# - flip # TODO
mapping:
- ""
steps:

View File

@ -10,52 +10,8 @@ jobs:
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
@ -65,24 +21,12 @@ jobs:
- zaphod # out
alphas:
- ""
# - colemak
# - colemakdhk
# - dvorak
# - halmak
# - workman
# - qwerty
nav:
- ""
# - vi
# - invertedt
clipboard:
- ""
# - fun
# - mac
# - win
layers:
- ""
# - flip
mapping:
- ""
steps:

View File

@ -15,79 +15,17 @@ jobs:
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:

View File

@ -10,59 +10,9 @@ jobs:
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
@ -74,7 +24,7 @@ jobs:
nav:
- ""
- vi
- invertedt
# - invertedt # TODO
clipboard:
- ""
- fun
@ -82,7 +32,7 @@ jobs:
- win
layers:
- ""
# - flip
# - flip # TODO
mapping:
- ""
steps:

149
.github/workflows/test-controllers.yml vendored Normal file
View File

@ -0,0 +1,149 @@
name: 'Test Controllers'
on:
- workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
container:
image: zmkfirmware/zmk-build-arm:2.5
strategy:
fail-fast: false
matrix:
shield:
- corne_left # in
board:
- bluemicro840_v1 # in
- nice_nano # in
- nice_nano_v2 # in
- nrfmicro_11 # in
- nrfmicro_13 # in
- proton_c # in
alphas:
- ""
nav:
- ""
clipboard:
- ""
layers:
- ""
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

@ -10,7 +10,6 @@ jobs:
fail-fast: false
matrix:
shield:
# with shield:
- absolem # out
- bastyl_left # out
- bastyl_right # out
@ -46,43 +45,16 @@ jobs:
- 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:

View File

@ -29,6 +29,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 [[./config/board-configs/]].
** Local Builds
@ -37,7 +41,6 @@ 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
@ -49,9 +52,9 @@ Some prebuilt firmware can be downloaded from the repo. Log in to GitHub, visit
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
*** Build Matrix
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]].
Fork this repo, copy, rename, and edit the included [[https://github.com/manna-harbour/zmk-config/actions/workflows/build-matrix.yml][Build Matrix workflow]] by commenting and uncommenting the included matrix elements for [[#Supported-Keyboards][supported keyboards]] and [[#configuration-options][configuration options]]. Enable elements from only one of the with shield or without shield sections per file.
* Miryoku Keymap
@ -75,7 +78,6 @@ Convert to the form ~#define option_value~. To apply the configuration options
** Configuration Options in GitHub Actions 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.
@ -145,6 +147,7 @@ compatibility
[[https://raw.githubusercontent.com/manna-harbour/miryoku/master/kle-miryoku-mapping-ortho_4x12.png]]
**** Extended Thumbs
@ -185,6 +188,7 @@ compatibility
Keymap files for many keyboards included in ZMK are provided in [[./config/][config/]].
* Contact
For feature requests or issues with code or documentation please