mirror of
https://github.com/ClaytonWWilson/miryoku_zmk.git
synced 2025-12-13 17:58:47 +00:00
Improve workflows
- produce matrix from inputs - change implementation of defaults - process with m4 - rename examples - change outboard directory and file names - change outboard file format - handle manifests in outboard file
This commit is contained in:
parent
7a1abb621d
commit
34a1a91bc7
@ -1,4 +1,7 @@
|
|||||||
name: 'Build corne nice_nano'
|
# Copyright 2021 Manna Harbour
|
||||||
|
# https://github.com/manna-harbour/miryoku
|
||||||
|
# generated -*- buffer-read-only: t -*-
|
||||||
|
name: 'Build Example corne nice_nano'
|
||||||
on:
|
on:
|
||||||
- workflow_dispatch
|
- workflow_dispatch
|
||||||
jobs:
|
jobs:
|
||||||
@ -15,36 +18,30 @@ jobs:
|
|||||||
board:
|
board:
|
||||||
- nice_nano # in
|
- nice_nano # in
|
||||||
alphas:
|
alphas:
|
||||||
- ""
|
- default
|
||||||
nav:
|
nav:
|
||||||
- ""
|
- default
|
||||||
clipboard:
|
clipboard:
|
||||||
- ""
|
- default
|
||||||
layers:
|
layers:
|
||||||
- ""
|
- default
|
||||||
mapping:
|
mapping:
|
||||||
- ""
|
- default
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
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
|
- name: Process variables
|
||||||
id: variables
|
id: variables
|
||||||
run: |
|
run: |
|
||||||
keyboard=${{ steps.inputs.outputs.board }}
|
if [ -n "${{ matrix.shield }}" -a "${{ matrix.shield }}" != "default" ]
|
||||||
if [ -n "${{ steps.inputs.outputs.shield }}" ]
|
|
||||||
then
|
then
|
||||||
SHIELD_ARG="-DSHIELD=${{ steps.inputs.outputs.shield }}"
|
SHIELD_ARG="-DSHIELD=${{ matrix.shield }}"
|
||||||
keyboard=${{ steps.inputs.outputs.shield }}
|
keyboard=${{ matrix.shield }}
|
||||||
|
shield=${{ matrix.shield }}
|
||||||
|
else
|
||||||
|
keyboard=${{ matrix.board }}
|
||||||
|
shield=""
|
||||||
fi
|
fi
|
||||||
echo "::set-output name=shield-arg::${SHIELD_ARG}"
|
echo "::set-output name=shield-arg::${SHIELD_ARG}"
|
||||||
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
|
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
|
||||||
@ -53,11 +50,12 @@ jobs:
|
|||||||
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
|
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
|
||||||
echo "::set-output name=configfile::$configfile"
|
echo "::set-output name=configfile::$configfile"
|
||||||
|
|
||||||
artifact_build_name="miryoku_zmk ${{ steps.inputs.outputs.shield }} ${{ steps.inputs.outputs.board }}"
|
artifact_build_name="miryoku_zmk $shield ${{ matrix.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 }}"
|
for option in "alphas_${{ matrix.alphas }}" "nav_${{ matrix.nav }}" "clipboard_${{ matrix.clipboard }}" "layers_${{ matrix.layers }}" "mapping_${{ matrix.mapping }}"
|
||||||
do
|
do
|
||||||
case "$option" in
|
case "$option" in
|
||||||
*_ ) ;;
|
*_ ) ;;
|
||||||
|
*_default ) ;;
|
||||||
* )
|
* )
|
||||||
artifact_build_name="$artifact_build_name $option"
|
artifact_build_name="$artifact_build_name $option"
|
||||||
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
|
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
|
||||||
@ -69,39 +67,34 @@ jobs:
|
|||||||
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
|
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
|
||||||
echo "::set-output name=artifact-dir::artifacts"
|
echo "::set-output name=artifact-dir::artifacts"
|
||||||
|
|
||||||
manifests="manifests"
|
outboard_file=".github/workflows/outboards/$keyboard"
|
||||||
manifest="$manifests/west-$keyboard.yml"
|
if [ -f "$outboard_file" ]
|
||||||
if [ ! -f "config/$manifest" ]
|
|
||||||
then
|
then
|
||||||
manifest="west.yml"
|
cat "$outboard_file" >> $GITHUB_ENV
|
||||||
fi
|
|
||||||
echo "::set-output name=manifest::$manifest"
|
|
||||||
|
|
||||||
echo "::set-output name=outboard::outboard"
|
|
||||||
|
|
||||||
env_file="config/outboards/$keyboard.env"
|
|
||||||
if [ -f "$env_file" ]
|
|
||||||
then
|
|
||||||
cat "$env_file" >> $GITHUB_ENV
|
|
||||||
echo "::set-output name=has_outboard::true"
|
|
||||||
fi
|
fi
|
||||||
|
echo "::set-output name=outboard_dir::outboard"
|
||||||
- name: Checkout outboard
|
- name: Checkout outboard
|
||||||
if: ${{ steps.variables.outputs.has_outboard == 'true' }}
|
if: ${{ env.outboard_repository != '' && env.outboard_ref != '' }}
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: ${{ env.outboard_repository }}
|
repository: ${{ env.outboard_repository }}
|
||||||
ref: ${{ env.outboard_ref }}
|
ref: ${{ env.outboard_ref }}
|
||||||
path: ${{ steps.variables.outputs.outboard }}
|
path: ${{ steps.variables.outputs.outboard_dir }}
|
||||||
- name: Use outboard
|
- name: Link outboard
|
||||||
if: ${{ steps.variables.outputs.has_outboard == 'true' }}
|
if: ${{ env.outboard_from != '' && env.outboard_to != '' }}
|
||||||
run: |
|
run: |
|
||||||
mkdir -p `dirname "config/${{ env.outboard_to }}"`
|
mkdir -p `dirname "config/${{ env.outboard_to }}"`
|
||||||
ln -sr ${{ steps.variables.outputs.outboard }}/${{ env.outboard_from }} config/${{ env.outboard_to }}
|
ln -sr ${{ steps.variables.outputs.outboard_dir }}/${{ env.outboard_from }} config/${{ env.outboard_to }}
|
||||||
if [ -n "${{ env.outboard_manifestdir }}" ]
|
- name: Generate outboard manifest
|
||||||
then
|
if: ${{ env.outboard_url_base != '' && env.outboard_revision != '' }}
|
||||||
cp ${{ steps.variables.outputs.outboard }}/${{ env.outboard_manifestdir }}/west.yml config/
|
run: |
|
||||||
cat config/west.yml
|
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
|
||||||
fi
|
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
|
- name: Cache west modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
env:
|
env:
|
||||||
@ -113,18 +106,18 @@ jobs:
|
|||||||
tools/
|
tools/
|
||||||
zephyr/
|
zephyr/
|
||||||
zmk/
|
zmk/
|
||||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('config/{0}', steps.variables.outputs.manifest)) }}
|
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('config/west.yml') }}
|
||||||
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
|
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
|
||||||
timeout-minutes: 2
|
timeout-minutes: 2
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: Initialize workspace (west init)
|
- name: Initialize workspace (west init)
|
||||||
run: west init -l config --mf ${{ steps.variables.outputs.manifest }}
|
run: west init -l config
|
||||||
- name: Update modules (west update)
|
- name: Update modules (west update)
|
||||||
run: west update
|
run: west update
|
||||||
- name: Export Zephyr CMake package (west zephyr-export)
|
- name: Export Zephyr CMake package (west zephyr-export)
|
||||||
run: west zephyr-export
|
run: west zephyr-export
|
||||||
- name: Build (west build)
|
- 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"
|
run: west build -s zmk/app -b ${{ matrix.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
|
||||||
- name: Prepare artifacts
|
- name: Prepare artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir ${{ steps.variables.outputs.artifact-dir }}
|
mkdir ${{ steps.variables.outputs.artifact-dir }}
|
||||||
@ -1,4 +1,7 @@
|
|||||||
name: 'Build tbkmini nice_nano_v2'
|
# Copyright 2021 Manna Harbour
|
||||||
|
# https://github.com/manna-harbour/miryoku
|
||||||
|
# generated -*- buffer-read-only: t -*-
|
||||||
|
name: 'Build Example tbkmini nice_nano_v2'
|
||||||
on:
|
on:
|
||||||
- workflow_dispatch
|
- workflow_dispatch
|
||||||
jobs:
|
jobs:
|
||||||
@ -15,36 +18,30 @@ jobs:
|
|||||||
board:
|
board:
|
||||||
- nice_nano_v2 # in
|
- nice_nano_v2 # in
|
||||||
alphas:
|
alphas:
|
||||||
- ""
|
- default
|
||||||
nav:
|
nav:
|
||||||
- ""
|
- default
|
||||||
clipboard:
|
clipboard:
|
||||||
- ""
|
- default
|
||||||
layers:
|
layers:
|
||||||
- ""
|
- default
|
||||||
mapping:
|
mapping:
|
||||||
- ""
|
- default
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
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
|
- name: Process variables
|
||||||
id: variables
|
id: variables
|
||||||
run: |
|
run: |
|
||||||
keyboard=${{ steps.inputs.outputs.board }}
|
if [ -n "${{ matrix.shield }}" -a "${{ matrix.shield }}" != "default" ]
|
||||||
if [ -n "${{ steps.inputs.outputs.shield }}" ]
|
|
||||||
then
|
then
|
||||||
SHIELD_ARG="-DSHIELD=${{ steps.inputs.outputs.shield }}"
|
SHIELD_ARG="-DSHIELD=${{ matrix.shield }}"
|
||||||
keyboard=${{ steps.inputs.outputs.shield }}
|
keyboard=${{ matrix.shield }}
|
||||||
|
shield=${{ matrix.shield }}
|
||||||
|
else
|
||||||
|
keyboard=${{ matrix.board }}
|
||||||
|
shield=""
|
||||||
fi
|
fi
|
||||||
echo "::set-output name=shield-arg::${SHIELD_ARG}"
|
echo "::set-output name=shield-arg::${SHIELD_ARG}"
|
||||||
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
|
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
|
||||||
@ -53,11 +50,12 @@ jobs:
|
|||||||
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
|
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
|
||||||
echo "::set-output name=configfile::$configfile"
|
echo "::set-output name=configfile::$configfile"
|
||||||
|
|
||||||
artifact_build_name="miryoku_zmk ${{ steps.inputs.outputs.shield }} ${{ steps.inputs.outputs.board }}"
|
artifact_build_name="miryoku_zmk $shield ${{ matrix.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 }}"
|
for option in "alphas_${{ matrix.alphas }}" "nav_${{ matrix.nav }}" "clipboard_${{ matrix.clipboard }}" "layers_${{ matrix.layers }}" "mapping_${{ matrix.mapping }}"
|
||||||
do
|
do
|
||||||
case "$option" in
|
case "$option" in
|
||||||
*_ ) ;;
|
*_ ) ;;
|
||||||
|
*_default ) ;;
|
||||||
* )
|
* )
|
||||||
artifact_build_name="$artifact_build_name $option"
|
artifact_build_name="$artifact_build_name $option"
|
||||||
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
|
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
|
||||||
@ -69,39 +67,34 @@ jobs:
|
|||||||
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
|
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
|
||||||
echo "::set-output name=artifact-dir::artifacts"
|
echo "::set-output name=artifact-dir::artifacts"
|
||||||
|
|
||||||
manifests="manifests"
|
outboard_file=".github/workflows/outboards/$keyboard"
|
||||||
manifest="$manifests/west-$keyboard.yml"
|
if [ -f "$outboard_file" ]
|
||||||
if [ ! -f "config/$manifest" ]
|
|
||||||
then
|
then
|
||||||
manifest="west.yml"
|
cat "$outboard_file" >> $GITHUB_ENV
|
||||||
fi
|
|
||||||
echo "::set-output name=manifest::$manifest"
|
|
||||||
|
|
||||||
echo "::set-output name=outboard::outboard"
|
|
||||||
|
|
||||||
env_file="config/outboards/$keyboard.env"
|
|
||||||
if [ -f "$env_file" ]
|
|
||||||
then
|
|
||||||
cat "$env_file" >> $GITHUB_ENV
|
|
||||||
echo "::set-output name=has_outboard::true"
|
|
||||||
fi
|
fi
|
||||||
|
echo "::set-output name=outboard_dir::outboard"
|
||||||
- name: Checkout outboard
|
- name: Checkout outboard
|
||||||
if: ${{ steps.variables.outputs.has_outboard == 'true' }}
|
if: ${{ env.outboard_repository != '' && env.outboard_ref != '' }}
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: ${{ env.outboard_repository }}
|
repository: ${{ env.outboard_repository }}
|
||||||
ref: ${{ env.outboard_ref }}
|
ref: ${{ env.outboard_ref }}
|
||||||
path: ${{ steps.variables.outputs.outboard }}
|
path: ${{ steps.variables.outputs.outboard_dir }}
|
||||||
- name: Use outboard
|
- name: Link outboard
|
||||||
if: ${{ steps.variables.outputs.has_outboard == 'true' }}
|
if: ${{ env.outboard_from != '' && env.outboard_to != '' }}
|
||||||
run: |
|
run: |
|
||||||
mkdir -p `dirname "config/${{ env.outboard_to }}"`
|
mkdir -p `dirname "config/${{ env.outboard_to }}"`
|
||||||
ln -sr ${{ steps.variables.outputs.outboard }}/${{ env.outboard_from }} config/${{ env.outboard_to }}
|
ln -sr ${{ steps.variables.outputs.outboard_dir }}/${{ env.outboard_from }} config/${{ env.outboard_to }}
|
||||||
if [ -n "${{ env.outboard_manifestdir }}" ]
|
- name: Generate outboard manifest
|
||||||
then
|
if: ${{ env.outboard_url_base != '' && env.outboard_revision != '' }}
|
||||||
cp ${{ steps.variables.outputs.outboard }}/${{ env.outboard_manifestdir }}/west.yml config/
|
run: |
|
||||||
cat config/west.yml
|
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
|
||||||
fi
|
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
|
- name: Cache west modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
env:
|
env:
|
||||||
@ -113,18 +106,18 @@ jobs:
|
|||||||
tools/
|
tools/
|
||||||
zephyr/
|
zephyr/
|
||||||
zmk/
|
zmk/
|
||||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('config/{0}', steps.variables.outputs.manifest)) }}
|
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('config/west.yml') }}
|
||||||
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
|
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
|
||||||
timeout-minutes: 2
|
timeout-minutes: 2
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: Initialize workspace (west init)
|
- name: Initialize workspace (west init)
|
||||||
run: west init -l config --mf ${{ steps.variables.outputs.manifest }}
|
run: west init -l config
|
||||||
- name: Update modules (west update)
|
- name: Update modules (west update)
|
||||||
run: west update
|
run: west update
|
||||||
- name: Export Zephyr CMake package (west zephyr-export)
|
- name: Export Zephyr CMake package (west zephyr-export)
|
||||||
run: west zephyr-export
|
run: west zephyr-export
|
||||||
- name: Build (west build)
|
- 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"
|
run: west build -s zmk/app -b ${{ matrix.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
|
||||||
- name: Prepare artifacts
|
- name: Prepare artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir ${{ steps.variables.outputs.artifact-dir }}
|
mkdir ${{ steps.variables.outputs.artifact-dir }}
|
||||||
126
.github/workflows/build-inputs.yml
vendored
126
.github/workflows/build-inputs.yml
vendored
@ -1,3 +1,6 @@
|
|||||||
|
# Copyright 2021 Manna Harbour
|
||||||
|
# https://github.com/manna-harbour/miryoku
|
||||||
|
# generated -*- buffer-read-only: t -*-
|
||||||
name: 'Build Inputs'
|
name: 'Build Inputs'
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@ -8,55 +11,84 @@ on:
|
|||||||
shield:
|
shield:
|
||||||
description: 'Shield'
|
description: 'Shield'
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: 'default'
|
||||||
alphas:
|
alphas:
|
||||||
description: 'Miryoku Alphas'
|
description: 'Miryoku Alphas'
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: 'default'
|
||||||
nav:
|
nav:
|
||||||
description: 'Miryoku Nav'
|
description: 'Miryoku Nav'
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: 'default'
|
||||||
clipboard:
|
clipboard:
|
||||||
description: 'Miryoku Clipboard'
|
description: 'Miryoku Clipboard'
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: 'default'
|
||||||
layers:
|
layers:
|
||||||
description: 'Miryoku Layers'
|
description: 'Miryoku Layers'
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: 'default'
|
||||||
mapping:
|
mapping:
|
||||||
description: 'Miryoku Mapping'
|
description: 'Miryoku Mapping'
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: 'default'
|
||||||
jobs:
|
jobs:
|
||||||
|
process-inputs:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
board: ${{ steps.process-inputs.outputs.board }}
|
||||||
|
shield: ${{ steps.process-inputs.outputs.shield }}
|
||||||
|
alphas: ${{ steps.process-inputs.outputs.alphas }}
|
||||||
|
nav: ${{ steps.process-inputs.outputs.nav }}
|
||||||
|
clipboard: ${{ steps.process-inputs.outputs.clipboard }}
|
||||||
|
layers: ${{ steps.process-inputs.outputs.layers }}
|
||||||
|
mapping: ${{ steps.process-inputs.outputs.mapping }}
|
||||||
|
steps:
|
||||||
|
- name: Process inputs
|
||||||
|
id: process-inputs
|
||||||
|
run: |
|
||||||
|
set-output()
|
||||||
|
{
|
||||||
|
json=`echo "$2" | jq -cnR 'inputs | split("(,| )+";"")'`
|
||||||
|
echo "::set-output name=$1::$json"
|
||||||
|
}
|
||||||
|
set-output "board" "${{ github.event.inputs.board }}"
|
||||||
|
set-output "shield" "${{ github.event.inputs.shield }}"
|
||||||
|
set-output "alphas" "${{ github.event.inputs.alphas }}"
|
||||||
|
set-output "nav" "${{ github.event.inputs.nav }}"
|
||||||
|
set-output "clipboard" "${{ github.event.inputs.clipboard }}"
|
||||||
|
set-output "layers" "${{ github.event.inputs.layers }}"
|
||||||
|
set-output "mapping" "${{ github.event.inputs.mapping }}"
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: zmkfirmware/zmk-build-arm:2.5
|
image: zmkfirmware/zmk-build-arm:2.5
|
||||||
|
needs: process-inputs
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
board: ${{ fromJSON(needs.process-inputs.outputs.board) }}
|
||||||
|
shield: ${{ fromJSON(needs.process-inputs.outputs.shield) }}
|
||||||
|
alphas: ${{ fromJSON(needs.process-inputs.outputs.alphas) }}
|
||||||
|
nav: ${{ fromJSON(needs.process-inputs.outputs.nav) }}
|
||||||
|
clipboard: ${{ fromJSON(needs.process-inputs.outputs.clipboard) }}
|
||||||
|
layers: ${{ fromJSON(needs.process-inputs.outputs.layers) }}
|
||||||
|
mapping: ${{ fromJSON(needs.process-inputs.outputs.mapping) }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
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
|
- name: Process variables
|
||||||
id: variables
|
id: variables
|
||||||
run: |
|
run: |
|
||||||
keyboard=${{ steps.inputs.outputs.board }}
|
if [ -n "${{ matrix.shield }}" -a "${{ matrix.shield }}" != "default" ]
|
||||||
if [ -n "${{ steps.inputs.outputs.shield }}" ]
|
|
||||||
then
|
then
|
||||||
SHIELD_ARG="-DSHIELD=${{ steps.inputs.outputs.shield }}"
|
SHIELD_ARG="-DSHIELD=${{ matrix.shield }}"
|
||||||
keyboard=${{ steps.inputs.outputs.shield }}
|
keyboard=${{ matrix.shield }}
|
||||||
|
shield=${{ matrix.shield }}
|
||||||
|
else
|
||||||
|
keyboard=${{ matrix.board }}
|
||||||
|
shield=""
|
||||||
fi
|
fi
|
||||||
echo "::set-output name=shield-arg::${SHIELD_ARG}"
|
echo "::set-output name=shield-arg::${SHIELD_ARG}"
|
||||||
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
|
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
|
||||||
@ -65,11 +97,12 @@ jobs:
|
|||||||
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
|
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
|
||||||
echo "::set-output name=configfile::$configfile"
|
echo "::set-output name=configfile::$configfile"
|
||||||
|
|
||||||
artifact_build_name="miryoku_zmk ${{ steps.inputs.outputs.shield }} ${{ steps.inputs.outputs.board }}"
|
artifact_build_name="miryoku_zmk $shield ${{ matrix.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 }}"
|
for option in "alphas_${{ matrix.alphas }}" "nav_${{ matrix.nav }}" "clipboard_${{ matrix.clipboard }}" "layers_${{ matrix.layers }}" "mapping_${{ matrix.mapping }}"
|
||||||
do
|
do
|
||||||
case "$option" in
|
case "$option" in
|
||||||
*_ ) ;;
|
*_ ) ;;
|
||||||
|
*_default ) ;;
|
||||||
* )
|
* )
|
||||||
artifact_build_name="$artifact_build_name $option"
|
artifact_build_name="$artifact_build_name $option"
|
||||||
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
|
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
|
||||||
@ -81,39 +114,34 @@ jobs:
|
|||||||
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
|
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
|
||||||
echo "::set-output name=artifact-dir::artifacts"
|
echo "::set-output name=artifact-dir::artifacts"
|
||||||
|
|
||||||
manifests="manifests"
|
outboard_file=".github/workflows/outboards/$keyboard"
|
||||||
manifest="$manifests/west-$keyboard.yml"
|
if [ -f "$outboard_file" ]
|
||||||
if [ ! -f "config/$manifest" ]
|
|
||||||
then
|
then
|
||||||
manifest="west.yml"
|
cat "$outboard_file" >> $GITHUB_ENV
|
||||||
fi
|
|
||||||
echo "::set-output name=manifest::$manifest"
|
|
||||||
|
|
||||||
echo "::set-output name=outboard::outboard"
|
|
||||||
|
|
||||||
env_file="config/outboards/$keyboard.env"
|
|
||||||
if [ -f "$env_file" ]
|
|
||||||
then
|
|
||||||
cat "$env_file" >> $GITHUB_ENV
|
|
||||||
echo "::set-output name=has_outboard::true"
|
|
||||||
fi
|
fi
|
||||||
|
echo "::set-output name=outboard_dir::outboard"
|
||||||
- name: Checkout outboard
|
- name: Checkout outboard
|
||||||
if: ${{ steps.variables.outputs.has_outboard == 'true' }}
|
if: ${{ env.outboard_repository != '' && env.outboard_ref != '' }}
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: ${{ env.outboard_repository }}
|
repository: ${{ env.outboard_repository }}
|
||||||
ref: ${{ env.outboard_ref }}
|
ref: ${{ env.outboard_ref }}
|
||||||
path: ${{ steps.variables.outputs.outboard }}
|
path: ${{ steps.variables.outputs.outboard_dir }}
|
||||||
- name: Use outboard
|
- name: Link outboard
|
||||||
if: ${{ steps.variables.outputs.has_outboard == 'true' }}
|
if: ${{ env.outboard_from != '' && env.outboard_to != '' }}
|
||||||
run: |
|
run: |
|
||||||
mkdir -p `dirname "config/${{ env.outboard_to }}"`
|
mkdir -p `dirname "config/${{ env.outboard_to }}"`
|
||||||
ln -sr ${{ steps.variables.outputs.outboard }}/${{ env.outboard_from }} config/${{ env.outboard_to }}
|
ln -sr ${{ steps.variables.outputs.outboard_dir }}/${{ env.outboard_from }} config/${{ env.outboard_to }}
|
||||||
if [ -n "${{ env.outboard_manifestdir }}" ]
|
- name: Generate outboard manifest
|
||||||
then
|
if: ${{ env.outboard_url_base != '' && env.outboard_revision != '' }}
|
||||||
cp ${{ steps.variables.outputs.outboard }}/${{ env.outboard_manifestdir }}/west.yml config/
|
run: |
|
||||||
cat config/west.yml
|
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
|
||||||
fi
|
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
|
- name: Cache west modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
env:
|
env:
|
||||||
@ -125,18 +153,18 @@ jobs:
|
|||||||
tools/
|
tools/
|
||||||
zephyr/
|
zephyr/
|
||||||
zmk/
|
zmk/
|
||||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('config/{0}', steps.variables.outputs.manifest)) }}
|
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('config/west.yml') }}
|
||||||
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
|
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
|
||||||
timeout-minutes: 2
|
timeout-minutes: 2
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: Initialize workspace (west init)
|
- name: Initialize workspace (west init)
|
||||||
run: west init -l config --mf ${{ steps.variables.outputs.manifest }}
|
run: west init -l config
|
||||||
- name: Update modules (west update)
|
- name: Update modules (west update)
|
||||||
run: west update
|
run: west update
|
||||||
- name: Export Zephyr CMake package (west zephyr-export)
|
- name: Export Zephyr CMake package (west zephyr-export)
|
||||||
run: west zephyr-export
|
run: west zephyr-export
|
||||||
- name: Build (west build)
|
- 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"
|
run: west build -s zmk/app -b ${{ matrix.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
|
||||||
- name: Prepare artifacts
|
- name: Prepare artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir ${{ steps.variables.outputs.artifact-dir }}
|
mkdir ${{ steps.variables.outputs.artifact-dir }}
|
||||||
|
|||||||
89
.github/workflows/build-matrix-template.yml
vendored
89
.github/workflows/build-matrix-template.yml
vendored
@ -1,3 +1,6 @@
|
|||||||
|
# Copyright 2021 Manna Harbour
|
||||||
|
# https://github.com/manna-harbour/miryoku
|
||||||
|
# generated -*- buffer-read-only: t -*-
|
||||||
name: 'Build Matrix Template'
|
name: 'Build Matrix Template'
|
||||||
on:
|
on:
|
||||||
- workflow_dispatch
|
- workflow_dispatch
|
||||||
@ -68,7 +71,7 @@ jobs:
|
|||||||
# - planck_rev6 # in
|
# - planck_rev6 # in
|
||||||
# - zaphod # out
|
# - zaphod # out
|
||||||
alphas:
|
alphas:
|
||||||
# - ""
|
# - default
|
||||||
# - colemak
|
# - colemak
|
||||||
# - colemakdhk
|
# - colemakdhk
|
||||||
# - dvorak
|
# - dvorak
|
||||||
@ -76,40 +79,34 @@ jobs:
|
|||||||
# - workman
|
# - workman
|
||||||
# - qwerty
|
# - qwerty
|
||||||
nav:
|
nav:
|
||||||
# - ""
|
# - default
|
||||||
# - vi
|
# - vi
|
||||||
# - invertedt # TODO
|
# - invertedt # TODO
|
||||||
clipboard:
|
clipboard:
|
||||||
# - ""
|
# - default
|
||||||
# - fun
|
# - fun
|
||||||
# - mac
|
# - mac
|
||||||
# - win
|
# - win
|
||||||
layers:
|
layers:
|
||||||
# - ""
|
# - default
|
||||||
# - flip # TODO
|
# - flip # TODO
|
||||||
mapping:
|
mapping:
|
||||||
# - ""
|
# - default
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
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
|
- name: Process variables
|
||||||
id: variables
|
id: variables
|
||||||
run: |
|
run: |
|
||||||
keyboard=${{ steps.inputs.outputs.board }}
|
if [ -n "${{ matrix.shield }}" -a "${{ matrix.shield }}" != "default" ]
|
||||||
if [ -n "${{ steps.inputs.outputs.shield }}" ]
|
|
||||||
then
|
then
|
||||||
SHIELD_ARG="-DSHIELD=${{ steps.inputs.outputs.shield }}"
|
SHIELD_ARG="-DSHIELD=${{ matrix.shield }}"
|
||||||
keyboard=${{ steps.inputs.outputs.shield }}
|
keyboard=${{ matrix.shield }}
|
||||||
|
shield=${{ matrix.shield }}
|
||||||
|
else
|
||||||
|
keyboard=${{ matrix.board }}
|
||||||
|
shield=""
|
||||||
fi
|
fi
|
||||||
echo "::set-output name=shield-arg::${SHIELD_ARG}"
|
echo "::set-output name=shield-arg::${SHIELD_ARG}"
|
||||||
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
|
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
|
||||||
@ -118,11 +115,12 @@ jobs:
|
|||||||
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
|
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
|
||||||
echo "::set-output name=configfile::$configfile"
|
echo "::set-output name=configfile::$configfile"
|
||||||
|
|
||||||
artifact_build_name="miryoku_zmk ${{ steps.inputs.outputs.shield }} ${{ steps.inputs.outputs.board }}"
|
artifact_build_name="miryoku_zmk $shield ${{ matrix.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 }}"
|
for option in "alphas_${{ matrix.alphas }}" "nav_${{ matrix.nav }}" "clipboard_${{ matrix.clipboard }}" "layers_${{ matrix.layers }}" "mapping_${{ matrix.mapping }}"
|
||||||
do
|
do
|
||||||
case "$option" in
|
case "$option" in
|
||||||
*_ ) ;;
|
*_ ) ;;
|
||||||
|
*_default ) ;;
|
||||||
* )
|
* )
|
||||||
artifact_build_name="$artifact_build_name $option"
|
artifact_build_name="$artifact_build_name $option"
|
||||||
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
|
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
|
||||||
@ -134,39 +132,34 @@ jobs:
|
|||||||
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
|
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
|
||||||
echo "::set-output name=artifact-dir::artifacts"
|
echo "::set-output name=artifact-dir::artifacts"
|
||||||
|
|
||||||
manifests="manifests"
|
outboard_file=".github/workflows/outboards/$keyboard"
|
||||||
manifest="$manifests/west-$keyboard.yml"
|
if [ -f "$outboard_file" ]
|
||||||
if [ ! -f "config/$manifest" ]
|
|
||||||
then
|
then
|
||||||
manifest="west.yml"
|
cat "$outboard_file" >> $GITHUB_ENV
|
||||||
fi
|
|
||||||
echo "::set-output name=manifest::$manifest"
|
|
||||||
|
|
||||||
echo "::set-output name=outboard::outboard"
|
|
||||||
|
|
||||||
env_file="config/outboards/$keyboard.env"
|
|
||||||
if [ -f "$env_file" ]
|
|
||||||
then
|
|
||||||
cat "$env_file" >> $GITHUB_ENV
|
|
||||||
echo "::set-output name=has_outboard::true"
|
|
||||||
fi
|
fi
|
||||||
|
echo "::set-output name=outboard_dir::outboard"
|
||||||
- name: Checkout outboard
|
- name: Checkout outboard
|
||||||
if: ${{ steps.variables.outputs.has_outboard == 'true' }}
|
if: ${{ env.outboard_repository != '' && env.outboard_ref != '' }}
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: ${{ env.outboard_repository }}
|
repository: ${{ env.outboard_repository }}
|
||||||
ref: ${{ env.outboard_ref }}
|
ref: ${{ env.outboard_ref }}
|
||||||
path: ${{ steps.variables.outputs.outboard }}
|
path: ${{ steps.variables.outputs.outboard_dir }}
|
||||||
- name: Use outboard
|
- name: Link outboard
|
||||||
if: ${{ steps.variables.outputs.has_outboard == 'true' }}
|
if: ${{ env.outboard_from != '' && env.outboard_to != '' }}
|
||||||
run: |
|
run: |
|
||||||
mkdir -p `dirname "config/${{ env.outboard_to }}"`
|
mkdir -p `dirname "config/${{ env.outboard_to }}"`
|
||||||
ln -sr ${{ steps.variables.outputs.outboard }}/${{ env.outboard_from }} config/${{ env.outboard_to }}
|
ln -sr ${{ steps.variables.outputs.outboard_dir }}/${{ env.outboard_from }} config/${{ env.outboard_to }}
|
||||||
if [ -n "${{ env.outboard_manifestdir }}" ]
|
- name: Generate outboard manifest
|
||||||
then
|
if: ${{ env.outboard_url_base != '' && env.outboard_revision != '' }}
|
||||||
cp ${{ steps.variables.outputs.outboard }}/${{ env.outboard_manifestdir }}/west.yml config/
|
run: |
|
||||||
cat config/west.yml
|
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
|
||||||
fi
|
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
|
- name: Cache west modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
env:
|
env:
|
||||||
@ -178,18 +171,18 @@ jobs:
|
|||||||
tools/
|
tools/
|
||||||
zephyr/
|
zephyr/
|
||||||
zmk/
|
zmk/
|
||||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('config/{0}', steps.variables.outputs.manifest)) }}
|
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('config/west.yml') }}
|
||||||
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
|
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
|
||||||
timeout-minutes: 2
|
timeout-minutes: 2
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: Initialize workspace (west init)
|
- name: Initialize workspace (west init)
|
||||||
run: west init -l config --mf ${{ steps.variables.outputs.manifest }}
|
run: west init -l config
|
||||||
- name: Update modules (west update)
|
- name: Update modules (west update)
|
||||||
run: west update
|
run: west update
|
||||||
- name: Export Zephyr CMake package (west zephyr-export)
|
- name: Export Zephyr CMake package (west zephyr-export)
|
||||||
run: west zephyr-export
|
run: west zephyr-export
|
||||||
- name: Build (west build)
|
- 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"
|
run: west build -s zmk/app -b ${{ matrix.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
|
||||||
- name: Prepare artifacts
|
- name: Prepare artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir ${{ steps.variables.outputs.artifact-dir }}
|
mkdir ${{ steps.variables.outputs.artifact-dir }}
|
||||||
|
|||||||
2
.github/workflows/outboards/corne-ish_zen
vendored
Normal file
2
.github/workflows/outboards/corne-ish_zen
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
outboard_url_base=https://github.com/Darryldh
|
||||||
|
outboard_revision=Add-new-Board-Corne-ish-Zen
|
||||||
2
.github/workflows/outboards/ferris_rev02
vendored
Normal file
2
.github/workflows/outboards/ferris_rev02
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
outboard_url_base=https://github.com/petejohanson
|
||||||
|
outboard_revision=boards/ferris-02-bling-basics
|
||||||
@ -2,4 +2,4 @@ outboard_repository=petejohanson/zaphod-config
|
|||||||
outboard_ref=main
|
outboard_ref=main
|
||||||
outboard_from=boards/arm/zaphod
|
outboard_from=boards/arm/zaphod
|
||||||
outboard_to=boards/arm/zaphod
|
outboard_to=boards/arm/zaphod
|
||||||
outboard_manifestdir=.
|
outboard_manifest=west.yml
|
||||||
18
.github/workflows/src/build-example-corne-nice_nano.yml.m4
vendored
Normal file
18
.github/workflows/src/build-example-corne-nice_nano.yml.m4
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
name: 'Build Example corne nice_nano'
|
||||||
|
m4_include(include/jobs-build.yml.m4)m4_dnl
|
||||||
|
shield:
|
||||||
|
- corne_left # in
|
||||||
|
- corne_right # in
|
||||||
|
board:
|
||||||
|
- nice_nano # in
|
||||||
|
alphas:
|
||||||
|
- default
|
||||||
|
nav:
|
||||||
|
- default
|
||||||
|
clipboard:
|
||||||
|
- default
|
||||||
|
layers:
|
||||||
|
- default
|
||||||
|
mapping:
|
||||||
|
- default
|
||||||
|
m4_include(include/build-steps.yml.m4)m4_dnl
|
||||||
18
.github/workflows/src/build-example-tbkmini-nice_nano_v2.yml.m4
vendored
Normal file
18
.github/workflows/src/build-example-tbkmini-nice_nano_v2.yml.m4
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
name: 'Build Example tbkmini nice_nano_v2'
|
||||||
|
m4_include(include/jobs-build.yml.m4)m4_dnl
|
||||||
|
shield:
|
||||||
|
- tbkmini_left # out
|
||||||
|
- tbkmini_right # out
|
||||||
|
board:
|
||||||
|
- nice_nano_v2 # in
|
||||||
|
alphas:
|
||||||
|
- default
|
||||||
|
nav:
|
||||||
|
- default
|
||||||
|
clipboard:
|
||||||
|
- default
|
||||||
|
layers:
|
||||||
|
- default
|
||||||
|
mapping:
|
||||||
|
- default
|
||||||
|
m4_include(include/build-steps.yml.m4)m4_dnl
|
||||||
74
.github/workflows/src/build-inputs.yml.m4
vendored
Normal file
74
.github/workflows/src/build-inputs.yml.m4
vendored
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
name: 'Build Inputs'
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
board:
|
||||||
|
description: 'Board'
|
||||||
|
required: true
|
||||||
|
shield:
|
||||||
|
description: 'Shield'
|
||||||
|
required: false
|
||||||
|
default: 'default'
|
||||||
|
alphas:
|
||||||
|
description: 'Miryoku Alphas'
|
||||||
|
required: false
|
||||||
|
default: 'default'
|
||||||
|
nav:
|
||||||
|
description: 'Miryoku Nav'
|
||||||
|
required: false
|
||||||
|
default: 'default'
|
||||||
|
clipboard:
|
||||||
|
description: 'Miryoku Clipboard'
|
||||||
|
required: false
|
||||||
|
default: 'default'
|
||||||
|
layers:
|
||||||
|
description: 'Miryoku Layers'
|
||||||
|
required: false
|
||||||
|
default: 'default'
|
||||||
|
mapping:
|
||||||
|
description: 'Miryoku Mapping'
|
||||||
|
required: false
|
||||||
|
default: 'default'
|
||||||
|
jobs:
|
||||||
|
process-inputs:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
board: ${{ steps.process-inputs.outputs.board }}
|
||||||
|
shield: ${{ steps.process-inputs.outputs.shield }}
|
||||||
|
alphas: ${{ steps.process-inputs.outputs.alphas }}
|
||||||
|
nav: ${{ steps.process-inputs.outputs.nav }}
|
||||||
|
clipboard: ${{ steps.process-inputs.outputs.clipboard }}
|
||||||
|
layers: ${{ steps.process-inputs.outputs.layers }}
|
||||||
|
mapping: ${{ steps.process-inputs.outputs.mapping }}
|
||||||
|
steps:
|
||||||
|
- name: Process inputs
|
||||||
|
id: process-inputs
|
||||||
|
run: |
|
||||||
|
set-output()
|
||||||
|
{
|
||||||
|
json=`echo "$2" | jq -cnR 'inputs | split("(,| )+";"")'`
|
||||||
|
echo "::set-output name=$1::$json"
|
||||||
|
}
|
||||||
|
set-output "board" "${{ github.event.inputs.board }}"
|
||||||
|
set-output "shield" "${{ github.event.inputs.shield }}"
|
||||||
|
set-output "alphas" "${{ github.event.inputs.alphas }}"
|
||||||
|
set-output "nav" "${{ github.event.inputs.nav }}"
|
||||||
|
set-output "clipboard" "${{ github.event.inputs.clipboard }}"
|
||||||
|
set-output "layers" "${{ github.event.inputs.layers }}"
|
||||||
|
set-output "mapping" "${{ github.event.inputs.mapping }}"
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: zmkfirmware/zmk-build-arm:2.5
|
||||||
|
needs: process-inputs
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
board: ${{ fromJSON(needs.process-inputs.outputs.board) }}
|
||||||
|
shield: ${{ fromJSON(needs.process-inputs.outputs.shield) }}
|
||||||
|
alphas: ${{ fromJSON(needs.process-inputs.outputs.alphas) }}
|
||||||
|
nav: ${{ fromJSON(needs.process-inputs.outputs.nav) }}
|
||||||
|
clipboard: ${{ fromJSON(needs.process-inputs.outputs.clipboard) }}
|
||||||
|
layers: ${{ fromJSON(needs.process-inputs.outputs.layers) }}
|
||||||
|
mapping: ${{ fromJSON(needs.process-inputs.outputs.mapping) }}
|
||||||
|
m4_include(include/build-steps.yml.m4)m4_dnl
|
||||||
83
.github/workflows/src/build-matrix-template.yml.m4
vendored
Normal file
83
.github/workflows/src/build-matrix-template.yml.m4
vendored
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
name: 'Build Matrix Template'
|
||||||
|
m4_include(include/jobs-build.yml.m4)m4_dnl
|
||||||
|
shield:
|
||||||
|
# with shield:
|
||||||
|
# - absolem # out
|
||||||
|
# - bastyl_left # out
|
||||||
|
# - bastyl_right # out
|
||||||
|
# - corne_left # in
|
||||||
|
# - corne_right # in
|
||||||
|
# - cradio36_left # out
|
||||||
|
# - cradio36_right # out
|
||||||
|
# - cradio_left # in
|
||||||
|
# - cradio_right # in
|
||||||
|
# - cradios_left # out
|
||||||
|
# - cradios_right # out
|
||||||
|
# - cradioz_left # out TODO
|
||||||
|
# - cradioz_right # out 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
|
||||||
|
# - sweepv2_left # out
|
||||||
|
# - sweepv2_right # out
|
||||||
|
# - splitreus62_left # in
|
||||||
|
# - splitreus62_right # in
|
||||||
|
# - tbkmini_left # out
|
||||||
|
# - tbkmini_right # out
|
||||||
|
# without shield:
|
||||||
|
# - ""
|
||||||
|
board:
|
||||||
|
# with shield:
|
||||||
|
# - 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 # out broken
|
||||||
|
# - corne-ish_zen_right # out broken
|
||||||
|
# - ferris_rev02 # out broken
|
||||||
|
# - planck_rev6 # in
|
||||||
|
# - zaphod # out
|
||||||
|
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
|
||||||
109
.github/workflows/src/include/build-steps.yml.m4
vendored
Normal file
109
.github/workflows/src/include/build-steps.yml.m4
vendored
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
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 '// https://github.com/manna-harbour/miryoku-zmk/' > "$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
|
||||||
|
cat "$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
|
||||||
4
.github/workflows/src/include/init.yml.m4
vendored
Normal file
4
.github/workflows/src/include/init.yml.m4
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Copyright 2021 Manna Harbour
|
||||||
|
# https://github.com/manna-harbour/miryoku
|
||||||
|
# generated -*- buffer-read-only: t -*-
|
||||||
|
m4_changequote(<<<,>>>)m4_dnl
|
||||||
10
.github/workflows/src/include/jobs-build.yml.m4
vendored
Normal file
10
.github/workflows/src/include/jobs-build.yml.m4
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
on:
|
||||||
|
- workflow_dispatch
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: zmkfirmware/zmk-build-arm:2.5
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
4
.github/workflows/src/makefile
vendored
Normal file
4
.github/workflows/src/makefile
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
../%.yml: %.yml.m4 include/* makefile
|
||||||
|
m4 -P include/init.yml.m4 $< > $@
|
||||||
22
.github/workflows/src/test-boards.yml.m4
vendored
Normal file
22
.github/workflows/src/test-boards.yml.m4
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
name: 'Test Boards'
|
||||||
|
m4_include(include/jobs-build.yml.m4)m4_dnl
|
||||||
|
shield:
|
||||||
|
- ""
|
||||||
|
board:
|
||||||
|
- ahokore # out
|
||||||
|
# - corne-ish_zen_left # out broken
|
||||||
|
# - corne-ish_zen_right # out broken
|
||||||
|
# - ferris_rev02 out broken
|
||||||
|
- planck_rev6 # in
|
||||||
|
- zaphod # out
|
||||||
|
alphas:
|
||||||
|
- default
|
||||||
|
nav:
|
||||||
|
- default
|
||||||
|
clipboard:
|
||||||
|
- default
|
||||||
|
layers:
|
||||||
|
- default
|
||||||
|
mapping:
|
||||||
|
- default
|
||||||
|
m4_include(include/build-steps.yml.m4)m4_dnl
|
||||||
31
.github/workflows/src/test-build.yml.m4
vendored
Normal file
31
.github/workflows/src/test-build.yml.m4
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
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:
|
||||||
|
- corne_left # in
|
||||||
|
board:
|
||||||
|
- nice_nano
|
||||||
|
alphas:
|
||||||
|
- default
|
||||||
|
nav:
|
||||||
|
- default
|
||||||
|
clipboard:
|
||||||
|
- default
|
||||||
|
layers:
|
||||||
|
- default
|
||||||
|
mapping:
|
||||||
|
- default
|
||||||
|
m4_include(include/build-steps.yml.m4)m4_dnl
|
||||||
29
.github/workflows/src/test-configs.yml.m4
vendored
Normal file
29
.github/workflows/src/test-configs.yml.m4
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
name: 'Test Configs'
|
||||||
|
m4_include(include/jobs-build.yml.m4)m4_dnl
|
||||||
|
shield:
|
||||||
|
- corne_left # in
|
||||||
|
board:
|
||||||
|
- nice_nano
|
||||||
|
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
|
||||||
22
.github/workflows/src/test-controllers.yml.m4
vendored
Normal file
22
.github/workflows/src/test-controllers.yml.m4
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
name: 'Test Controllers'
|
||||||
|
m4_include(include/jobs-build.yml.m4)m4_dnl
|
||||||
|
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:
|
||||||
|
- default
|
||||||
|
nav:
|
||||||
|
- default
|
||||||
|
clipboard:
|
||||||
|
- default
|
||||||
|
layers:
|
||||||
|
- default
|
||||||
|
mapping:
|
||||||
|
- default
|
||||||
|
m4_include(include/build-steps.yml.m4)m4_dnl
|
||||||
55
.github/workflows/src/test-shields.yml.m4
vendored
Normal file
55
.github/workflows/src/test-shields.yml.m4
vendored
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
name: 'Test Shields'
|
||||||
|
m4_include(include/jobs-build.yml.m4)m4_dnl
|
||||||
|
shield:
|
||||||
|
- absolem # out
|
||||||
|
- bastyl_left # out
|
||||||
|
- bastyl_right # out
|
||||||
|
- corne_left # in
|
||||||
|
- corne_right # in
|
||||||
|
- cradio36_left # out
|
||||||
|
- cradio36_right # out
|
||||||
|
- cradio_left # in
|
||||||
|
- cradio_right # in
|
||||||
|
- cradios_left # out
|
||||||
|
- cradios_right # out
|
||||||
|
# - cradioz_left out TODO
|
||||||
|
# - cradioz_right out 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
|
||||||
|
- sweepv2_left # out
|
||||||
|
- sweepv2_right # out
|
||||||
|
- tbkmini_left # out
|
||||||
|
- tbkmini_right # out
|
||||||
|
board:
|
||||||
|
- nice_nano
|
||||||
|
alphas:
|
||||||
|
- default
|
||||||
|
nav:
|
||||||
|
- default
|
||||||
|
clipboard:
|
||||||
|
- default
|
||||||
|
layers:
|
||||||
|
- default
|
||||||
|
mapping:
|
||||||
|
- default
|
||||||
|
m4_include(include/build-steps.yml.m4)m4_dnl
|
||||||
89
.github/workflows/test-boards.yml
vendored
89
.github/workflows/test-boards.yml
vendored
@ -1,3 +1,6 @@
|
|||||||
|
# Copyright 2021 Manna Harbour
|
||||||
|
# https://github.com/manna-harbour/miryoku
|
||||||
|
# generated -*- buffer-read-only: t -*-
|
||||||
name: 'Test Boards'
|
name: 'Test Boards'
|
||||||
on:
|
on:
|
||||||
- workflow_dispatch
|
- workflow_dispatch
|
||||||
@ -19,36 +22,30 @@ jobs:
|
|||||||
- planck_rev6 # in
|
- planck_rev6 # in
|
||||||
- zaphod # out
|
- zaphod # out
|
||||||
alphas:
|
alphas:
|
||||||
- ""
|
- default
|
||||||
nav:
|
nav:
|
||||||
- ""
|
- default
|
||||||
clipboard:
|
clipboard:
|
||||||
- ""
|
- default
|
||||||
layers:
|
layers:
|
||||||
- ""
|
- default
|
||||||
mapping:
|
mapping:
|
||||||
- ""
|
- default
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
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
|
- name: Process variables
|
||||||
id: variables
|
id: variables
|
||||||
run: |
|
run: |
|
||||||
keyboard=${{ steps.inputs.outputs.board }}
|
if [ -n "${{ matrix.shield }}" -a "${{ matrix.shield }}" != "default" ]
|
||||||
if [ -n "${{ steps.inputs.outputs.shield }}" ]
|
|
||||||
then
|
then
|
||||||
SHIELD_ARG="-DSHIELD=${{ steps.inputs.outputs.shield }}"
|
SHIELD_ARG="-DSHIELD=${{ matrix.shield }}"
|
||||||
keyboard=${{ steps.inputs.outputs.shield }}
|
keyboard=${{ matrix.shield }}
|
||||||
|
shield=${{ matrix.shield }}
|
||||||
|
else
|
||||||
|
keyboard=${{ matrix.board }}
|
||||||
|
shield=""
|
||||||
fi
|
fi
|
||||||
echo "::set-output name=shield-arg::${SHIELD_ARG}"
|
echo "::set-output name=shield-arg::${SHIELD_ARG}"
|
||||||
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
|
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
|
||||||
@ -57,11 +54,12 @@ jobs:
|
|||||||
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
|
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
|
||||||
echo "::set-output name=configfile::$configfile"
|
echo "::set-output name=configfile::$configfile"
|
||||||
|
|
||||||
artifact_build_name="miryoku_zmk ${{ steps.inputs.outputs.shield }} ${{ steps.inputs.outputs.board }}"
|
artifact_build_name="miryoku_zmk $shield ${{ matrix.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 }}"
|
for option in "alphas_${{ matrix.alphas }}" "nav_${{ matrix.nav }}" "clipboard_${{ matrix.clipboard }}" "layers_${{ matrix.layers }}" "mapping_${{ matrix.mapping }}"
|
||||||
do
|
do
|
||||||
case "$option" in
|
case "$option" in
|
||||||
*_ ) ;;
|
*_ ) ;;
|
||||||
|
*_default ) ;;
|
||||||
* )
|
* )
|
||||||
artifact_build_name="$artifact_build_name $option"
|
artifact_build_name="$artifact_build_name $option"
|
||||||
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
|
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
|
||||||
@ -73,39 +71,34 @@ jobs:
|
|||||||
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
|
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
|
||||||
echo "::set-output name=artifact-dir::artifacts"
|
echo "::set-output name=artifact-dir::artifacts"
|
||||||
|
|
||||||
manifests="manifests"
|
outboard_file=".github/workflows/outboards/$keyboard"
|
||||||
manifest="$manifests/west-$keyboard.yml"
|
if [ -f "$outboard_file" ]
|
||||||
if [ ! -f "config/$manifest" ]
|
|
||||||
then
|
then
|
||||||
manifest="west.yml"
|
cat "$outboard_file" >> $GITHUB_ENV
|
||||||
fi
|
|
||||||
echo "::set-output name=manifest::$manifest"
|
|
||||||
|
|
||||||
echo "::set-output name=outboard::outboard"
|
|
||||||
|
|
||||||
env_file="config/outboards/$keyboard.env"
|
|
||||||
if [ -f "$env_file" ]
|
|
||||||
then
|
|
||||||
cat "$env_file" >> $GITHUB_ENV
|
|
||||||
echo "::set-output name=has_outboard::true"
|
|
||||||
fi
|
fi
|
||||||
|
echo "::set-output name=outboard_dir::outboard"
|
||||||
- name: Checkout outboard
|
- name: Checkout outboard
|
||||||
if: ${{ steps.variables.outputs.has_outboard == 'true' }}
|
if: ${{ env.outboard_repository != '' && env.outboard_ref != '' }}
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: ${{ env.outboard_repository }}
|
repository: ${{ env.outboard_repository }}
|
||||||
ref: ${{ env.outboard_ref }}
|
ref: ${{ env.outboard_ref }}
|
||||||
path: ${{ steps.variables.outputs.outboard }}
|
path: ${{ steps.variables.outputs.outboard_dir }}
|
||||||
- name: Use outboard
|
- name: Link outboard
|
||||||
if: ${{ steps.variables.outputs.has_outboard == 'true' }}
|
if: ${{ env.outboard_from != '' && env.outboard_to != '' }}
|
||||||
run: |
|
run: |
|
||||||
mkdir -p `dirname "config/${{ env.outboard_to }}"`
|
mkdir -p `dirname "config/${{ env.outboard_to }}"`
|
||||||
ln -sr ${{ steps.variables.outputs.outboard }}/${{ env.outboard_from }} config/${{ env.outboard_to }}
|
ln -sr ${{ steps.variables.outputs.outboard_dir }}/${{ env.outboard_from }} config/${{ env.outboard_to }}
|
||||||
if [ -n "${{ env.outboard_manifestdir }}" ]
|
- name: Generate outboard manifest
|
||||||
then
|
if: ${{ env.outboard_url_base != '' && env.outboard_revision != '' }}
|
||||||
cp ${{ steps.variables.outputs.outboard }}/${{ env.outboard_manifestdir }}/west.yml config/
|
run: |
|
||||||
cat config/west.yml
|
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
|
||||||
fi
|
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
|
- name: Cache west modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
env:
|
env:
|
||||||
@ -117,18 +110,18 @@ jobs:
|
|||||||
tools/
|
tools/
|
||||||
zephyr/
|
zephyr/
|
||||||
zmk/
|
zmk/
|
||||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('config/{0}', steps.variables.outputs.manifest)) }}
|
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('config/west.yml') }}
|
||||||
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
|
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
|
||||||
timeout-minutes: 2
|
timeout-minutes: 2
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: Initialize workspace (west init)
|
- name: Initialize workspace (west init)
|
||||||
run: west init -l config --mf ${{ steps.variables.outputs.manifest }}
|
run: west init -l config
|
||||||
- name: Update modules (west update)
|
- name: Update modules (west update)
|
||||||
run: west update
|
run: west update
|
||||||
- name: Export Zephyr CMake package (west zephyr-export)
|
- name: Export Zephyr CMake package (west zephyr-export)
|
||||||
run: west zephyr-export
|
run: west zephyr-export
|
||||||
- name: Build (west build)
|
- 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"
|
run: west build -s zmk/app -b ${{ matrix.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
|
||||||
- name: Prepare artifacts
|
- name: Prepare artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir ${{ steps.variables.outputs.artifact-dir }}
|
mkdir ${{ steps.variables.outputs.artifact-dir }}
|
||||||
|
|||||||
89
.github/workflows/test-build.yml
vendored
89
.github/workflows/test-build.yml
vendored
@ -1,3 +1,6 @@
|
|||||||
|
# Copyright 2021 Manna Harbour
|
||||||
|
# https://github.com/manna-harbour/miryoku
|
||||||
|
# generated -*- buffer-read-only: t -*-
|
||||||
name: 'Test Build'
|
name: 'Test Build'
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -19,36 +22,30 @@ jobs:
|
|||||||
board:
|
board:
|
||||||
- nice_nano
|
- nice_nano
|
||||||
alphas:
|
alphas:
|
||||||
- ""
|
- default
|
||||||
nav:
|
nav:
|
||||||
- ""
|
- default
|
||||||
clipboard:
|
clipboard:
|
||||||
- ""
|
- default
|
||||||
layers:
|
layers:
|
||||||
- ""
|
- default
|
||||||
mapping:
|
mapping:
|
||||||
- ""
|
- default
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
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
|
- name: Process variables
|
||||||
id: variables
|
id: variables
|
||||||
run: |
|
run: |
|
||||||
keyboard=${{ steps.inputs.outputs.board }}
|
if [ -n "${{ matrix.shield }}" -a "${{ matrix.shield }}" != "default" ]
|
||||||
if [ -n "${{ steps.inputs.outputs.shield }}" ]
|
|
||||||
then
|
then
|
||||||
SHIELD_ARG="-DSHIELD=${{ steps.inputs.outputs.shield }}"
|
SHIELD_ARG="-DSHIELD=${{ matrix.shield }}"
|
||||||
keyboard=${{ steps.inputs.outputs.shield }}
|
keyboard=${{ matrix.shield }}
|
||||||
|
shield=${{ matrix.shield }}
|
||||||
|
else
|
||||||
|
keyboard=${{ matrix.board }}
|
||||||
|
shield=""
|
||||||
fi
|
fi
|
||||||
echo "::set-output name=shield-arg::${SHIELD_ARG}"
|
echo "::set-output name=shield-arg::${SHIELD_ARG}"
|
||||||
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
|
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
|
||||||
@ -57,11 +54,12 @@ jobs:
|
|||||||
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
|
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
|
||||||
echo "::set-output name=configfile::$configfile"
|
echo "::set-output name=configfile::$configfile"
|
||||||
|
|
||||||
artifact_build_name="miryoku_zmk ${{ steps.inputs.outputs.shield }} ${{ steps.inputs.outputs.board }}"
|
artifact_build_name="miryoku_zmk $shield ${{ matrix.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 }}"
|
for option in "alphas_${{ matrix.alphas }}" "nav_${{ matrix.nav }}" "clipboard_${{ matrix.clipboard }}" "layers_${{ matrix.layers }}" "mapping_${{ matrix.mapping }}"
|
||||||
do
|
do
|
||||||
case "$option" in
|
case "$option" in
|
||||||
*_ ) ;;
|
*_ ) ;;
|
||||||
|
*_default ) ;;
|
||||||
* )
|
* )
|
||||||
artifact_build_name="$artifact_build_name $option"
|
artifact_build_name="$artifact_build_name $option"
|
||||||
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
|
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
|
||||||
@ -73,39 +71,34 @@ jobs:
|
|||||||
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
|
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
|
||||||
echo "::set-output name=artifact-dir::artifacts"
|
echo "::set-output name=artifact-dir::artifacts"
|
||||||
|
|
||||||
manifests="manifests"
|
outboard_file=".github/workflows/outboards/$keyboard"
|
||||||
manifest="$manifests/west-$keyboard.yml"
|
if [ -f "$outboard_file" ]
|
||||||
if [ ! -f "config/$manifest" ]
|
|
||||||
then
|
then
|
||||||
manifest="west.yml"
|
cat "$outboard_file" >> $GITHUB_ENV
|
||||||
fi
|
|
||||||
echo "::set-output name=manifest::$manifest"
|
|
||||||
|
|
||||||
echo "::set-output name=outboard::outboard"
|
|
||||||
|
|
||||||
env_file="config/outboards/$keyboard.env"
|
|
||||||
if [ -f "$env_file" ]
|
|
||||||
then
|
|
||||||
cat "$env_file" >> $GITHUB_ENV
|
|
||||||
echo "::set-output name=has_outboard::true"
|
|
||||||
fi
|
fi
|
||||||
|
echo "::set-output name=outboard_dir::outboard"
|
||||||
- name: Checkout outboard
|
- name: Checkout outboard
|
||||||
if: ${{ steps.variables.outputs.has_outboard == 'true' }}
|
if: ${{ env.outboard_repository != '' && env.outboard_ref != '' }}
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: ${{ env.outboard_repository }}
|
repository: ${{ env.outboard_repository }}
|
||||||
ref: ${{ env.outboard_ref }}
|
ref: ${{ env.outboard_ref }}
|
||||||
path: ${{ steps.variables.outputs.outboard }}
|
path: ${{ steps.variables.outputs.outboard_dir }}
|
||||||
- name: Use outboard
|
- name: Link outboard
|
||||||
if: ${{ steps.variables.outputs.has_outboard == 'true' }}
|
if: ${{ env.outboard_from != '' && env.outboard_to != '' }}
|
||||||
run: |
|
run: |
|
||||||
mkdir -p `dirname "config/${{ env.outboard_to }}"`
|
mkdir -p `dirname "config/${{ env.outboard_to }}"`
|
||||||
ln -sr ${{ steps.variables.outputs.outboard }}/${{ env.outboard_from }} config/${{ env.outboard_to }}
|
ln -sr ${{ steps.variables.outputs.outboard_dir }}/${{ env.outboard_from }} config/${{ env.outboard_to }}
|
||||||
if [ -n "${{ env.outboard_manifestdir }}" ]
|
- name: Generate outboard manifest
|
||||||
then
|
if: ${{ env.outboard_url_base != '' && env.outboard_revision != '' }}
|
||||||
cp ${{ steps.variables.outputs.outboard }}/${{ env.outboard_manifestdir }}/west.yml config/
|
run: |
|
||||||
cat config/west.yml
|
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
|
||||||
fi
|
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
|
- name: Cache west modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
env:
|
env:
|
||||||
@ -117,18 +110,18 @@ jobs:
|
|||||||
tools/
|
tools/
|
||||||
zephyr/
|
zephyr/
|
||||||
zmk/
|
zmk/
|
||||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('config/{0}', steps.variables.outputs.manifest)) }}
|
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('config/west.yml') }}
|
||||||
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
|
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
|
||||||
timeout-minutes: 2
|
timeout-minutes: 2
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: Initialize workspace (west init)
|
- name: Initialize workspace (west init)
|
||||||
run: west init -l config --mf ${{ steps.variables.outputs.manifest }}
|
run: west init -l config
|
||||||
- name: Update modules (west update)
|
- name: Update modules (west update)
|
||||||
run: west update
|
run: west update
|
||||||
- name: Export Zephyr CMake package (west zephyr-export)
|
- name: Export Zephyr CMake package (west zephyr-export)
|
||||||
run: west zephyr-export
|
run: west zephyr-export
|
||||||
- name: Build (west build)
|
- 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"
|
run: west build -s zmk/app -b ${{ matrix.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
|
||||||
- name: Prepare artifacts
|
- name: Prepare artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir ${{ steps.variables.outputs.artifact-dir }}
|
mkdir ${{ steps.variables.outputs.artifact-dir }}
|
||||||
|
|||||||
89
.github/workflows/test-configs.yml
vendored
89
.github/workflows/test-configs.yml
vendored
@ -1,3 +1,6 @@
|
|||||||
|
# Copyright 2021 Manna Harbour
|
||||||
|
# https://github.com/manna-harbour/miryoku
|
||||||
|
# generated -*- buffer-read-only: t -*-
|
||||||
name: 'Test Configs'
|
name: 'Test Configs'
|
||||||
on:
|
on:
|
||||||
- workflow_dispatch
|
- workflow_dispatch
|
||||||
@ -14,7 +17,7 @@ jobs:
|
|||||||
board:
|
board:
|
||||||
- nice_nano
|
- nice_nano
|
||||||
alphas:
|
alphas:
|
||||||
- ""
|
- default
|
||||||
- colemak
|
- colemak
|
||||||
- colemakdhk
|
- colemakdhk
|
||||||
- dvorak
|
- dvorak
|
||||||
@ -22,40 +25,34 @@ jobs:
|
|||||||
- workman
|
- workman
|
||||||
- qwerty
|
- qwerty
|
||||||
nav:
|
nav:
|
||||||
- ""
|
- default
|
||||||
- vi
|
- vi
|
||||||
# - invertedt # TODO
|
# - invertedt # TODO
|
||||||
clipboard:
|
clipboard:
|
||||||
- ""
|
- default
|
||||||
- fun
|
- fun
|
||||||
- mac
|
- mac
|
||||||
- win
|
- win
|
||||||
layers:
|
layers:
|
||||||
- ""
|
- default
|
||||||
# - flip # TODO
|
# - flip # TODO
|
||||||
mapping:
|
mapping:
|
||||||
- ""
|
- default
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
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
|
- name: Process variables
|
||||||
id: variables
|
id: variables
|
||||||
run: |
|
run: |
|
||||||
keyboard=${{ steps.inputs.outputs.board }}
|
if [ -n "${{ matrix.shield }}" -a "${{ matrix.shield }}" != "default" ]
|
||||||
if [ -n "${{ steps.inputs.outputs.shield }}" ]
|
|
||||||
then
|
then
|
||||||
SHIELD_ARG="-DSHIELD=${{ steps.inputs.outputs.shield }}"
|
SHIELD_ARG="-DSHIELD=${{ matrix.shield }}"
|
||||||
keyboard=${{ steps.inputs.outputs.shield }}
|
keyboard=${{ matrix.shield }}
|
||||||
|
shield=${{ matrix.shield }}
|
||||||
|
else
|
||||||
|
keyboard=${{ matrix.board }}
|
||||||
|
shield=""
|
||||||
fi
|
fi
|
||||||
echo "::set-output name=shield-arg::${SHIELD_ARG}"
|
echo "::set-output name=shield-arg::${SHIELD_ARG}"
|
||||||
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
|
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
|
||||||
@ -64,11 +61,12 @@ jobs:
|
|||||||
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
|
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
|
||||||
echo "::set-output name=configfile::$configfile"
|
echo "::set-output name=configfile::$configfile"
|
||||||
|
|
||||||
artifact_build_name="miryoku_zmk ${{ steps.inputs.outputs.shield }} ${{ steps.inputs.outputs.board }}"
|
artifact_build_name="miryoku_zmk $shield ${{ matrix.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 }}"
|
for option in "alphas_${{ matrix.alphas }}" "nav_${{ matrix.nav }}" "clipboard_${{ matrix.clipboard }}" "layers_${{ matrix.layers }}" "mapping_${{ matrix.mapping }}"
|
||||||
do
|
do
|
||||||
case "$option" in
|
case "$option" in
|
||||||
*_ ) ;;
|
*_ ) ;;
|
||||||
|
*_default ) ;;
|
||||||
* )
|
* )
|
||||||
artifact_build_name="$artifact_build_name $option"
|
artifact_build_name="$artifact_build_name $option"
|
||||||
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
|
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
|
||||||
@ -80,39 +78,34 @@ jobs:
|
|||||||
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
|
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
|
||||||
echo "::set-output name=artifact-dir::artifacts"
|
echo "::set-output name=artifact-dir::artifacts"
|
||||||
|
|
||||||
manifests="manifests"
|
outboard_file=".github/workflows/outboards/$keyboard"
|
||||||
manifest="$manifests/west-$keyboard.yml"
|
if [ -f "$outboard_file" ]
|
||||||
if [ ! -f "config/$manifest" ]
|
|
||||||
then
|
then
|
||||||
manifest="west.yml"
|
cat "$outboard_file" >> $GITHUB_ENV
|
||||||
fi
|
|
||||||
echo "::set-output name=manifest::$manifest"
|
|
||||||
|
|
||||||
echo "::set-output name=outboard::outboard"
|
|
||||||
|
|
||||||
env_file="config/outboards/$keyboard.env"
|
|
||||||
if [ -f "$env_file" ]
|
|
||||||
then
|
|
||||||
cat "$env_file" >> $GITHUB_ENV
|
|
||||||
echo "::set-output name=has_outboard::true"
|
|
||||||
fi
|
fi
|
||||||
|
echo "::set-output name=outboard_dir::outboard"
|
||||||
- name: Checkout outboard
|
- name: Checkout outboard
|
||||||
if: ${{ steps.variables.outputs.has_outboard == 'true' }}
|
if: ${{ env.outboard_repository != '' && env.outboard_ref != '' }}
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: ${{ env.outboard_repository }}
|
repository: ${{ env.outboard_repository }}
|
||||||
ref: ${{ env.outboard_ref }}
|
ref: ${{ env.outboard_ref }}
|
||||||
path: ${{ steps.variables.outputs.outboard }}
|
path: ${{ steps.variables.outputs.outboard_dir }}
|
||||||
- name: Use outboard
|
- name: Link outboard
|
||||||
if: ${{ steps.variables.outputs.has_outboard == 'true' }}
|
if: ${{ env.outboard_from != '' && env.outboard_to != '' }}
|
||||||
run: |
|
run: |
|
||||||
mkdir -p `dirname "config/${{ env.outboard_to }}"`
|
mkdir -p `dirname "config/${{ env.outboard_to }}"`
|
||||||
ln -sr ${{ steps.variables.outputs.outboard }}/${{ env.outboard_from }} config/${{ env.outboard_to }}
|
ln -sr ${{ steps.variables.outputs.outboard_dir }}/${{ env.outboard_from }} config/${{ env.outboard_to }}
|
||||||
if [ -n "${{ env.outboard_manifestdir }}" ]
|
- name: Generate outboard manifest
|
||||||
then
|
if: ${{ env.outboard_url_base != '' && env.outboard_revision != '' }}
|
||||||
cp ${{ steps.variables.outputs.outboard }}/${{ env.outboard_manifestdir }}/west.yml config/
|
run: |
|
||||||
cat config/west.yml
|
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
|
||||||
fi
|
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
|
- name: Cache west modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
env:
|
env:
|
||||||
@ -124,18 +117,18 @@ jobs:
|
|||||||
tools/
|
tools/
|
||||||
zephyr/
|
zephyr/
|
||||||
zmk/
|
zmk/
|
||||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('config/{0}', steps.variables.outputs.manifest)) }}
|
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('config/west.yml') }}
|
||||||
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
|
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
|
||||||
timeout-minutes: 2
|
timeout-minutes: 2
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: Initialize workspace (west init)
|
- name: Initialize workspace (west init)
|
||||||
run: west init -l config --mf ${{ steps.variables.outputs.manifest }}
|
run: west init -l config
|
||||||
- name: Update modules (west update)
|
- name: Update modules (west update)
|
||||||
run: west update
|
run: west update
|
||||||
- name: Export Zephyr CMake package (west zephyr-export)
|
- name: Export Zephyr CMake package (west zephyr-export)
|
||||||
run: west zephyr-export
|
run: west zephyr-export
|
||||||
- name: Build (west build)
|
- 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"
|
run: west build -s zmk/app -b ${{ matrix.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
|
||||||
- name: Prepare artifacts
|
- name: Prepare artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir ${{ steps.variables.outputs.artifact-dir }}
|
mkdir ${{ steps.variables.outputs.artifact-dir }}
|
||||||
|
|||||||
89
.github/workflows/test-controllers.yml
vendored
89
.github/workflows/test-controllers.yml
vendored
@ -1,3 +1,6 @@
|
|||||||
|
# Copyright 2021 Manna Harbour
|
||||||
|
# https://github.com/manna-harbour/miryoku
|
||||||
|
# generated -*- buffer-read-only: t -*-
|
||||||
name: 'Test Controllers'
|
name: 'Test Controllers'
|
||||||
on:
|
on:
|
||||||
- workflow_dispatch
|
- workflow_dispatch
|
||||||
@ -19,36 +22,30 @@ jobs:
|
|||||||
- nrfmicro_13 # in
|
- nrfmicro_13 # in
|
||||||
- proton_c # in
|
- proton_c # in
|
||||||
alphas:
|
alphas:
|
||||||
- ""
|
- default
|
||||||
nav:
|
nav:
|
||||||
- ""
|
- default
|
||||||
clipboard:
|
clipboard:
|
||||||
- ""
|
- default
|
||||||
layers:
|
layers:
|
||||||
- ""
|
- default
|
||||||
mapping:
|
mapping:
|
||||||
- ""
|
- default
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
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
|
- name: Process variables
|
||||||
id: variables
|
id: variables
|
||||||
run: |
|
run: |
|
||||||
keyboard=${{ steps.inputs.outputs.board }}
|
if [ -n "${{ matrix.shield }}" -a "${{ matrix.shield }}" != "default" ]
|
||||||
if [ -n "${{ steps.inputs.outputs.shield }}" ]
|
|
||||||
then
|
then
|
||||||
SHIELD_ARG="-DSHIELD=${{ steps.inputs.outputs.shield }}"
|
SHIELD_ARG="-DSHIELD=${{ matrix.shield }}"
|
||||||
keyboard=${{ steps.inputs.outputs.shield }}
|
keyboard=${{ matrix.shield }}
|
||||||
|
shield=${{ matrix.shield }}
|
||||||
|
else
|
||||||
|
keyboard=${{ matrix.board }}
|
||||||
|
shield=""
|
||||||
fi
|
fi
|
||||||
echo "::set-output name=shield-arg::${SHIELD_ARG}"
|
echo "::set-output name=shield-arg::${SHIELD_ARG}"
|
||||||
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
|
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
|
||||||
@ -57,11 +54,12 @@ jobs:
|
|||||||
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
|
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
|
||||||
echo "::set-output name=configfile::$configfile"
|
echo "::set-output name=configfile::$configfile"
|
||||||
|
|
||||||
artifact_build_name="miryoku_zmk ${{ steps.inputs.outputs.shield }} ${{ steps.inputs.outputs.board }}"
|
artifact_build_name="miryoku_zmk $shield ${{ matrix.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 }}"
|
for option in "alphas_${{ matrix.alphas }}" "nav_${{ matrix.nav }}" "clipboard_${{ matrix.clipboard }}" "layers_${{ matrix.layers }}" "mapping_${{ matrix.mapping }}"
|
||||||
do
|
do
|
||||||
case "$option" in
|
case "$option" in
|
||||||
*_ ) ;;
|
*_ ) ;;
|
||||||
|
*_default ) ;;
|
||||||
* )
|
* )
|
||||||
artifact_build_name="$artifact_build_name $option"
|
artifact_build_name="$artifact_build_name $option"
|
||||||
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
|
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
|
||||||
@ -73,39 +71,34 @@ jobs:
|
|||||||
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
|
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
|
||||||
echo "::set-output name=artifact-dir::artifacts"
|
echo "::set-output name=artifact-dir::artifacts"
|
||||||
|
|
||||||
manifests="manifests"
|
outboard_file=".github/workflows/outboards/$keyboard"
|
||||||
manifest="$manifests/west-$keyboard.yml"
|
if [ -f "$outboard_file" ]
|
||||||
if [ ! -f "config/$manifest" ]
|
|
||||||
then
|
then
|
||||||
manifest="west.yml"
|
cat "$outboard_file" >> $GITHUB_ENV
|
||||||
fi
|
|
||||||
echo "::set-output name=manifest::$manifest"
|
|
||||||
|
|
||||||
echo "::set-output name=outboard::outboard"
|
|
||||||
|
|
||||||
env_file="config/outboards/$keyboard.env"
|
|
||||||
if [ -f "$env_file" ]
|
|
||||||
then
|
|
||||||
cat "$env_file" >> $GITHUB_ENV
|
|
||||||
echo "::set-output name=has_outboard::true"
|
|
||||||
fi
|
fi
|
||||||
|
echo "::set-output name=outboard_dir::outboard"
|
||||||
- name: Checkout outboard
|
- name: Checkout outboard
|
||||||
if: ${{ steps.variables.outputs.has_outboard == 'true' }}
|
if: ${{ env.outboard_repository != '' && env.outboard_ref != '' }}
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: ${{ env.outboard_repository }}
|
repository: ${{ env.outboard_repository }}
|
||||||
ref: ${{ env.outboard_ref }}
|
ref: ${{ env.outboard_ref }}
|
||||||
path: ${{ steps.variables.outputs.outboard }}
|
path: ${{ steps.variables.outputs.outboard_dir }}
|
||||||
- name: Use outboard
|
- name: Link outboard
|
||||||
if: ${{ steps.variables.outputs.has_outboard == 'true' }}
|
if: ${{ env.outboard_from != '' && env.outboard_to != '' }}
|
||||||
run: |
|
run: |
|
||||||
mkdir -p `dirname "config/${{ env.outboard_to }}"`
|
mkdir -p `dirname "config/${{ env.outboard_to }}"`
|
||||||
ln -sr ${{ steps.variables.outputs.outboard }}/${{ env.outboard_from }} config/${{ env.outboard_to }}
|
ln -sr ${{ steps.variables.outputs.outboard_dir }}/${{ env.outboard_from }} config/${{ env.outboard_to }}
|
||||||
if [ -n "${{ env.outboard_manifestdir }}" ]
|
- name: Generate outboard manifest
|
||||||
then
|
if: ${{ env.outboard_url_base != '' && env.outboard_revision != '' }}
|
||||||
cp ${{ steps.variables.outputs.outboard }}/${{ env.outboard_manifestdir }}/west.yml config/
|
run: |
|
||||||
cat config/west.yml
|
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
|
||||||
fi
|
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
|
- name: Cache west modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
env:
|
env:
|
||||||
@ -117,18 +110,18 @@ jobs:
|
|||||||
tools/
|
tools/
|
||||||
zephyr/
|
zephyr/
|
||||||
zmk/
|
zmk/
|
||||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('config/{0}', steps.variables.outputs.manifest)) }}
|
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('config/west.yml') }}
|
||||||
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
|
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
|
||||||
timeout-minutes: 2
|
timeout-minutes: 2
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: Initialize workspace (west init)
|
- name: Initialize workspace (west init)
|
||||||
run: west init -l config --mf ${{ steps.variables.outputs.manifest }}
|
run: west init -l config
|
||||||
- name: Update modules (west update)
|
- name: Update modules (west update)
|
||||||
run: west update
|
run: west update
|
||||||
- name: Export Zephyr CMake package (west zephyr-export)
|
- name: Export Zephyr CMake package (west zephyr-export)
|
||||||
run: west zephyr-export
|
run: west zephyr-export
|
||||||
- name: Build (west build)
|
- 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"
|
run: west build -s zmk/app -b ${{ matrix.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
|
||||||
- name: Prepare artifacts
|
- name: Prepare artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir ${{ steps.variables.outputs.artifact-dir }}
|
mkdir ${{ steps.variables.outputs.artifact-dir }}
|
||||||
|
|||||||
89
.github/workflows/test-shields.yml
vendored
89
.github/workflows/test-shields.yml
vendored
@ -1,3 +1,6 @@
|
|||||||
|
# Copyright 2021 Manna Harbour
|
||||||
|
# https://github.com/manna-harbour/miryoku
|
||||||
|
# generated -*- buffer-read-only: t -*-
|
||||||
name: 'Test Shields'
|
name: 'Test Shields'
|
||||||
on:
|
on:
|
||||||
- workflow_dispatch
|
- workflow_dispatch
|
||||||
@ -52,36 +55,30 @@ jobs:
|
|||||||
board:
|
board:
|
||||||
- nice_nano
|
- nice_nano
|
||||||
alphas:
|
alphas:
|
||||||
- ""
|
- default
|
||||||
nav:
|
nav:
|
||||||
- ""
|
- default
|
||||||
clipboard:
|
clipboard:
|
||||||
- ""
|
- default
|
||||||
layers:
|
layers:
|
||||||
- ""
|
- default
|
||||||
mapping:
|
mapping:
|
||||||
- ""
|
- default
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
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
|
- name: Process variables
|
||||||
id: variables
|
id: variables
|
||||||
run: |
|
run: |
|
||||||
keyboard=${{ steps.inputs.outputs.board }}
|
if [ -n "${{ matrix.shield }}" -a "${{ matrix.shield }}" != "default" ]
|
||||||
if [ -n "${{ steps.inputs.outputs.shield }}" ]
|
|
||||||
then
|
then
|
||||||
SHIELD_ARG="-DSHIELD=${{ steps.inputs.outputs.shield }}"
|
SHIELD_ARG="-DSHIELD=${{ matrix.shield }}"
|
||||||
keyboard=${{ steps.inputs.outputs.shield }}
|
keyboard=${{ matrix.shield }}
|
||||||
|
shield=${{ matrix.shield }}
|
||||||
|
else
|
||||||
|
keyboard=${{ matrix.board }}
|
||||||
|
shield=""
|
||||||
fi
|
fi
|
||||||
echo "::set-output name=shield-arg::${SHIELD_ARG}"
|
echo "::set-output name=shield-arg::${SHIELD_ARG}"
|
||||||
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
|
keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'`
|
||||||
@ -90,11 +87,12 @@ jobs:
|
|||||||
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
|
echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile"
|
||||||
echo "::set-output name=configfile::$configfile"
|
echo "::set-output name=configfile::$configfile"
|
||||||
|
|
||||||
artifact_build_name="miryoku_zmk ${{ steps.inputs.outputs.shield }} ${{ steps.inputs.outputs.board }}"
|
artifact_build_name="miryoku_zmk $shield ${{ matrix.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 }}"
|
for option in "alphas_${{ matrix.alphas }}" "nav_${{ matrix.nav }}" "clipboard_${{ matrix.clipboard }}" "layers_${{ matrix.layers }}" "mapping_${{ matrix.mapping }}"
|
||||||
do
|
do
|
||||||
case "$option" in
|
case "$option" in
|
||||||
*_ ) ;;
|
*_ ) ;;
|
||||||
|
*_default ) ;;
|
||||||
* )
|
* )
|
||||||
artifact_build_name="$artifact_build_name $option"
|
artifact_build_name="$artifact_build_name $option"
|
||||||
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
|
echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile"
|
||||||
@ -106,39 +104,34 @@ jobs:
|
|||||||
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
|
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
|
||||||
echo "::set-output name=artifact-dir::artifacts"
|
echo "::set-output name=artifact-dir::artifacts"
|
||||||
|
|
||||||
manifests="manifests"
|
outboard_file=".github/workflows/outboards/$keyboard"
|
||||||
manifest="$manifests/west-$keyboard.yml"
|
if [ -f "$outboard_file" ]
|
||||||
if [ ! -f "config/$manifest" ]
|
|
||||||
then
|
then
|
||||||
manifest="west.yml"
|
cat "$outboard_file" >> $GITHUB_ENV
|
||||||
fi
|
|
||||||
echo "::set-output name=manifest::$manifest"
|
|
||||||
|
|
||||||
echo "::set-output name=outboard::outboard"
|
|
||||||
|
|
||||||
env_file="config/outboards/$keyboard.env"
|
|
||||||
if [ -f "$env_file" ]
|
|
||||||
then
|
|
||||||
cat "$env_file" >> $GITHUB_ENV
|
|
||||||
echo "::set-output name=has_outboard::true"
|
|
||||||
fi
|
fi
|
||||||
|
echo "::set-output name=outboard_dir::outboard"
|
||||||
- name: Checkout outboard
|
- name: Checkout outboard
|
||||||
if: ${{ steps.variables.outputs.has_outboard == 'true' }}
|
if: ${{ env.outboard_repository != '' && env.outboard_ref != '' }}
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: ${{ env.outboard_repository }}
|
repository: ${{ env.outboard_repository }}
|
||||||
ref: ${{ env.outboard_ref }}
|
ref: ${{ env.outboard_ref }}
|
||||||
path: ${{ steps.variables.outputs.outboard }}
|
path: ${{ steps.variables.outputs.outboard_dir }}
|
||||||
- name: Use outboard
|
- name: Link outboard
|
||||||
if: ${{ steps.variables.outputs.has_outboard == 'true' }}
|
if: ${{ env.outboard_from != '' && env.outboard_to != '' }}
|
||||||
run: |
|
run: |
|
||||||
mkdir -p `dirname "config/${{ env.outboard_to }}"`
|
mkdir -p `dirname "config/${{ env.outboard_to }}"`
|
||||||
ln -sr ${{ steps.variables.outputs.outboard }}/${{ env.outboard_from }} config/${{ env.outboard_to }}
|
ln -sr ${{ steps.variables.outputs.outboard_dir }}/${{ env.outboard_from }} config/${{ env.outboard_to }}
|
||||||
if [ -n "${{ env.outboard_manifestdir }}" ]
|
- name: Generate outboard manifest
|
||||||
then
|
if: ${{ env.outboard_url_base != '' && env.outboard_revision != '' }}
|
||||||
cp ${{ steps.variables.outputs.outboard }}/${{ env.outboard_manifestdir }}/west.yml config/
|
run: |
|
||||||
cat config/west.yml
|
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
|
||||||
fi
|
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
|
- name: Cache west modules
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
env:
|
env:
|
||||||
@ -150,18 +143,18 @@ jobs:
|
|||||||
tools/
|
tools/
|
||||||
zephyr/
|
zephyr/
|
||||||
zmk/
|
zmk/
|
||||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('config/{0}', steps.variables.outputs.manifest)) }}
|
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('config/west.yml') }}
|
||||||
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
|
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
|
||||||
timeout-minutes: 2
|
timeout-minutes: 2
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: Initialize workspace (west init)
|
- name: Initialize workspace (west init)
|
||||||
run: west init -l config --mf ${{ steps.variables.outputs.manifest }}
|
run: west init -l config
|
||||||
- name: Update modules (west update)
|
- name: Update modules (west update)
|
||||||
run: west update
|
run: west update
|
||||||
- name: Export Zephyr CMake package (west zephyr-export)
|
- name: Export Zephyr CMake package (west zephyr-export)
|
||||||
run: west zephyr-export
|
run: west zephyr-export
|
||||||
- name: Build (west build)
|
- 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"
|
run: west build -s zmk/app -b ${{ matrix.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
|
||||||
- name: Prepare artifacts
|
- name: Prepare artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir ${{ steps.variables.outputs.artifact-dir }}
|
mkdir ${{ steps.variables.outputs.artifact-dir }}
|
||||||
|
|||||||
@ -1,54 +0,0 @@
|
|||||||
# requires ZMK_APP_DIR (.../zmk/app) and ZMK_CONFIG (.../zmk-config/config)
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: default
|
|
||||||
default: corne
|
|
||||||
|
|
||||||
.PHONY: all
|
|
||||||
all: corne planck
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: corne
|
|
||||||
corne: corne_left corne_right
|
|
||||||
|
|
||||||
.PHONY: corne_left
|
|
||||||
corne_left: ZMK_BOARD = nice_nano
|
|
||||||
corne_left: ZMK_SHIELD = corne_left
|
|
||||||
corne_left: ZMK_TARGET = $(ZMK_BOARD)-$(ZMK_SHIELD)
|
|
||||||
corne_left: ZMK_MACROS += -DSHIELD=$(ZMK_SHIELD)
|
|
||||||
corne_left: zmk-nice_nano-corne_left.uf2
|
|
||||||
|
|
||||||
.PHONY: corne_right
|
|
||||||
corne_right: ZMK_BOARD = nice_nano
|
|
||||||
corne_right: ZMK_SHIELD = corne_right
|
|
||||||
corne_right: ZMK_TARGET = $(ZMK_BOARD)-$(ZMK_SHIELD)
|
|
||||||
corne_right: ZMK_MACROS += -DSHIELD=$(ZMK_SHIELD)
|
|
||||||
corne_right: zmk-nice_nano-corne_right.uf2
|
|
||||||
|
|
||||||
$(ZMK_APP_DIR)/build/nice_nano-corne_*/zephyr/zmk.uf2: corne.keymap ../miryoku/mapping/42-corne.h ../miryoku/miryoku.dtsi
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: planck
|
|
||||||
planck: planck_rev6
|
|
||||||
|
|
||||||
.PHONY: planck_rev6
|
|
||||||
planck_rev6: ZMK_BOARD = planck_rev6
|
|
||||||
planck_rev6: ZMK_TARGET = $(ZMK_BOARD)
|
|
||||||
planck_rev6: zmk-planck_rev6.uf2
|
|
||||||
|
|
||||||
$(ZMK_APP_DIR)/build/planck_rev6/zephyr/zmk.uf2: planck_rev6.keymap ../miryoku/mapping/48-planck.h ../miryoku/miryoku.dtsi
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: log
|
|
||||||
log: minicom -D /dev/ttyACM0
|
|
||||||
|
|
||||||
zmk-%.uf2: $(ZMK_APP_DIR)/build/%/zephyr/zmk.uf2
|
|
||||||
cp -p $< $@
|
|
||||||
|
|
||||||
$(ZMK_APP_DIR)/build/%/zephyr/zmk.uf2: FORCE
|
|
||||||
cd $(ZMK_APP_DIR) && west build -d build/$(ZMK_TARGET) -b $(ZMK_BOARD) -- -DZMK_CONFIG=$(ZMK_CONFIG) $(ZMK_MACROS)
|
|
||||||
|
|
||||||
.PHONY: FORCE
|
|
||||||
FORCE:
|
|
||||||
|
|
||||||
# nice_nano.dts.pre.tmp is in app/build/left/zephyr
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
manifest:
|
|
||||||
remotes:
|
|
||||||
- name: zmkfirmware
|
|
||||||
url-base: https://github.com/zmkfirmware
|
|
||||||
- name: corne-ish_zen
|
|
||||||
url-base: https://github.com/Darryldh
|
|
||||||
projects:
|
|
||||||
- name: zmk
|
|
||||||
remote: corne-ish_zen
|
|
||||||
revision: Add-new-Board-Corne-ish-Zen
|
|
||||||
import: app/west.yml
|
|
||||||
self:
|
|
||||||
path: config
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
manifest:
|
|
||||||
remotes:
|
|
||||||
- name: zmkfirmware
|
|
||||||
url-base: https://github.com/zmkfirmware
|
|
||||||
- name: ferris_rev02
|
|
||||||
url-base: https://github.com/petejohanson
|
|
||||||
projects:
|
|
||||||
- name: zmk
|
|
||||||
remote: ferris_rev02
|
|
||||||
revision: boards/ferris-02-bling-basics
|
|
||||||
import: app/west.yml
|
|
||||||
self:
|
|
||||||
path: config
|
|
||||||
@ -31,7 +31,7 @@ Any compatible combination of [[https://github.com/zmkfirmware/zmk/tree/main/app
|
|||||||
|
|
||||||
*** Out of Tree Boards and Shields
|
*** 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/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. See [[./.github/workflows/outboards/]] for supported out of tree boards and shields.
|
||||||
|
|
||||||
|
|
||||||
** Local Builds
|
** Local Builds
|
||||||
@ -44,12 +44,12 @@ Clone this repo and use for [[https://zmk.dev/docs/development/build-flash#build
|
|||||||
|
|
||||||
*** Inputs
|
*** 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.
|
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.
|
||||||
|
|
||||||
|
|
||||||
*** Build Matrix Template
|
*** Build Matrix Template
|
||||||
|
|
||||||
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 matrix values for the required [[#Supported-Keyboards][supported keyboards]] and [[#configuration-options][configuration options]].
|
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.
|
||||||
|
|
||||||
|
|
||||||
*** Prebuilt Firmware
|
*** Prebuilt Firmware
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user