forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[miryoku-github] Squashed local commits from previous miryoku branch
- Squashed local commits from previous miryoku branch - Update actions/upload-artifact in workflow - Add choice to Build Inputs workflow for alternative layout options - Add Test Inputs workflow with all text fields for matrix builds - Fix make git-submodule in workflow - Fix merge in workflow (#16)
- Loading branch information
1 parent
aebc99a
commit e1307cc
Showing
14 changed files
with
478 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
github: [manna-harbour] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Copyright 2021 Manna Harbour | ||
# https://github.com/manna-harbour/miryoku | ||
|
||
name: 'Build Example contra' | ||
on: | ||
- workflow_dispatch | ||
jobs: | ||
build: | ||
uses: ./.github/workflows/main.yml | ||
with: | ||
keyboard: '["contra"]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Copyright 2021 Manna Harbour | ||
# https://github.com/manna-harbour/miryoku | ||
|
||
name: 'Build Example crkbd' | ||
on: | ||
- workflow_dispatch | ||
jobs: | ||
build: | ||
uses: ./.github/workflows/main.yml | ||
with: | ||
keyboard: '["crkbd"]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Copyright 2021 Manna Harbour | ||
# https://github.com/manna-harbour/miryoku | ||
|
||
name: 'Build Example ergodox_ez' | ||
on: | ||
- workflow_dispatch | ||
jobs: | ||
build: | ||
uses: ./.github/workflows/main.yml | ||
with: | ||
keyboard: '["ergodox_ez"]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Copyright 2021 Manna Harbour | ||
# https://github.com/manna-harbour/miryoku | ||
|
||
name: 'Build Example keebio/levinson' | ||
on: | ||
- workflow_dispatch | ||
jobs: | ||
build: | ||
uses: ./.github/workflows/main.yml | ||
with: | ||
keyboard: '["keebio/levinson"]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Copyright 2021 Manna Harbour | ||
# https://github.com/manna-harbour/miryoku | ||
|
||
name: 'Build Example planck/rev6' | ||
on: | ||
- workflow_dispatch | ||
jobs: | ||
build: | ||
uses: ./.github/workflows/main.yml | ||
with: | ||
keyboard: '["planck/rev6"]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Copyright 2022 Manna Harbour | ||
# https://github.com/manna-harbour/miryoku | ||
|
||
name: 'Build Example 𝑥MK' | ||
on: | ||
- workflow_dispatch | ||
jobs: | ||
build: | ||
uses: ./.github/workflows/main.yml | ||
with: | ||
keyboard: '["converter/xmk"]' | ||
merge: '["manna-harbour/qmk_firmware/xmk"]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
# Copyright 2021 Manna Harbour | ||
# https://github.com/manna-harbour/miryoku | ||
|
||
name: 'Build Inputs' | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
keyboard: | ||
description: 'Keyboard' | ||
required: true | ||
alphas: | ||
description: 'Miryoku Alphas' | ||
required: false | ||
default: 'default' | ||
type: choice | ||
options: | ||
- "default" | ||
- "AZERTY" | ||
- "BEAKL15" | ||
- "Colemak" | ||
- "ColemakDHK" | ||
- "Dvorak" | ||
- "Halmak" | ||
- "QWERTY" | ||
- "QWERTZ" | ||
- "Workman" | ||
nav: | ||
description: 'Miryoku Nav' | ||
required: false | ||
default: 'default' | ||
type: choice | ||
options: | ||
- "default" | ||
- "invertedT" | ||
- "vi" | ||
clipboard: | ||
description: 'Miryoku Clipboard' | ||
required: false | ||
default: 'default' | ||
type: choice | ||
options: | ||
- "default" | ||
- "fun" | ||
- "Mac" | ||
- "Win" | ||
layers: | ||
description: 'Miryoku Layers' | ||
required: false | ||
default: 'default' | ||
type: choice | ||
options: | ||
- "default" | ||
- "flip" | ||
mapping: | ||
description: 'Miryoku Mapping' | ||
required: false | ||
default: 'default' | ||
rules: | ||
description: 'custom_rules.mk' | ||
required: false | ||
default: 'default' | ||
custom_config: | ||
description: 'custom_config.h' | ||
required: false | ||
default: 'default' | ||
merge: | ||
description: 'Merge QMK Branches' | ||
required: false | ||
default: 'default' | ||
jobs: | ||
process-inputs: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
keyboard: ${{ steps.process-inputs.outputs.keyboard }} | ||
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 }} | ||
rules: ${{ steps.process-inputs.outputs.rules }} | ||
custom_config: ${{ steps.process-inputs.outputs.custom_config }} | ||
merge: ${{ steps.process-inputs.outputs.merge }} | ||
steps: | ||
- name: Process inputs | ||
id: process-inputs | ||
run: | | ||
set-output() | ||
{ | ||
json=`echo "$2" | jq -cnR 'inputs | split(",";"")'` | ||
echo "$1=$json" >> $GITHUB_OUTPUT | ||
} | ||
set-output "keyboard" "${{ github.event.inputs.keyboard }}" | ||
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 }}" | ||
set-output "rules" "${{ github.event.inputs.rules }}" | ||
set-output "custom_config" "${{ github.event.inputs.custom_config }}" | ||
set-output "merge" "${{ github.event.inputs.merge }}" | ||
build: | ||
uses: ./.github/workflows/main.yml | ||
needs: process-inputs | ||
with: | ||
keyboard: ${{ needs.process-inputs.outputs.keyboard }} | ||
alphas: ${{ needs.process-inputs.outputs.alphas }} | ||
nav: ${{ needs.process-inputs.outputs.nav }} | ||
clipboard: ${{ needs.process-inputs.outputs.clipboard }} | ||
layers: ${{ needs.process-inputs.outputs.layers }} | ||
mapping: ${{ needs.process-inputs.outputs.mapping }} | ||
rules: ${{ needs.process-inputs.outputs.rules }} | ||
custom_config: ${{ needs.process-inputs.outputs.custom_config }} | ||
merge: ${{ needs.process-inputs.outputs.merge }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
# Copyright 2021 Manna Harbour | ||
# https://github.com/manna-harbour/miryoku | ||
|
||
name: 'Main' | ||
on: | ||
workflow_call: | ||
inputs: | ||
keyboard: | ||
type: string | ||
default: '["default"]' | ||
alphas: | ||
type: string | ||
default: '["default"]' | ||
nav: | ||
type: string | ||
default: '["default"]' | ||
clipboard: | ||
type: string | ||
default: '["default"]' | ||
layers: | ||
type: string | ||
default: '["default"]' | ||
mapping: | ||
type: string | ||
default: '["default"]' | ||
rules: | ||
type: string | ||
default: '["default"]' | ||
custom_config: | ||
type: string | ||
default: '["default"]' | ||
merge: | ||
type: string | ||
default: '["default"]' | ||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
container: qmkfm/qmk_cli | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
keyboard: ${{ fromJSON(inputs.keyboard) }} | ||
alphas: ${{ fromJSON(inputs.alphas) }} | ||
nav: ${{ fromJSON(inputs.nav) }} | ||
clipboard: ${{ fromJSON(inputs.clipboard) }} | ||
layers: ${{ fromJSON(inputs.layers) }} | ||
mapping: ${{ fromJSON(inputs.mapping) }} | ||
rules: ${{ fromJSON(inputs.rules) }} | ||
custom_config: ${{ fromJSON(inputs.custom_config) }} | ||
merge: ${{ fromJSON(inputs.merge) }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Merge branches | ||
if: ${{ matrix.merge != '' && matrix.merge != 'default' }} | ||
run: | | ||
git config --global --add safe.directory '*' | ||
git config user.name "${GITHUB_ACTOR}" | ||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
git fetch --unshallow | ||
revert=`git log --grep='^\[miryoku-github\]' --pretty='format:%H' | tr '\n' ' '` | ||
git revert $revert | ||
for merge in ${{ matrix.merge }} | ||
do | ||
user=`echo "$merge" | cut -f 1 -d '/'` | ||
repo=`echo "$merge" | cut -f 2 -d '/'` | ||
branch=`echo "$merge" | cut -f 3- -d '/'` | ||
remote="$user-$repo" | ||
git remote add "$remote" "https://github.com/$user/$repo.git" | ||
git fetch "$remote" "$branch" | ||
git merge "$remote/$branch" | ||
git remote remove "$remote" | ||
git status | ||
done | ||
- name: Submodules | ||
run: | | ||
git config --global --add safe.directory '*' | ||
make git-submodule | ||
- name: Process inputs | ||
id: inputs | ||
run: | | ||
artifact_dir="artifacts" | ||
mkdir "$artifact_dir" | ||
user='users/manna-harbour_miryoku' | ||
rules="$user/custom_rules.mk" | ||
config="$user/custom_config.h" | ||
artifact_build_name=`echo "miryoku_qmk ${{ matrix.keyboard }}" | tr '/' '_'` | ||
for option in "alphas=${{ matrix.alphas }}" "nav=${{ matrix.nav }}" "clipboard=${{ matrix.clipboard }}" "layers=${{ matrix.layers }}" "mapping=${{ matrix.mapping }}" | ||
do | ||
if ! expr "$option" : '.*=default$' | ||
then | ||
artifact_build_name="$artifact_build_name "`echo "$option" | tr '=' '_'` | ||
option=`echo "MIRYOKU_$option" | tr 'a-z' 'A-Z'` | ||
echo "$option" >> "$rules" | ||
fi | ||
done | ||
if [ -n "${{ matrix.rules }}" -a "${{ matrix.rules }}" != 'default' ] | ||
then | ||
artifact_build_name="$artifact_build_name rules_"`echo "${{ matrix.rules }}" | md5sum | cut -d ' ' -f 1` | ||
echo "${{ matrix.rules }}" >> "$rules" | ||
fi | ||
if [ -n "${{ matrix.custom_config }}" -a "${{ matrix.custom_config }}" != 'default' ] | ||
then | ||
artifact_build_name="$artifact_build_name config_"`echo "${{ matrix.custom_config }}" | md5sum | cut -d ' ' -f 1` | ||
echo "${{ matrix.custom_config }}" >> "$config" | ||
fi | ||
cp "$rules" "$config" "$artifact_dir" | ||
if [ -n "${{ matrix.merge }}" -a "${{ matrix.merge }}" != 'default' ] | ||
then | ||
artifact_build_name="$artifact_build_name merge_"`echo "${{ matrix.merge }}" | md5sum | cut -d ' ' -f 1` | ||
fi | ||
artifact_build_name=`echo $artifact_build_name | tr ' ' '-'` | ||
echo "artifact_build_name=$artifact_build_name" >> $GITHUB_OUTPUT | ||
echo "artifact_dir=$artifact_dir" >> $GITHUB_OUTPUT | ||
- name: Build | ||
run: qmk compile -kb ${{ matrix.keyboard }} -km manna-harbour_miryoku | ||
- name: Copy firmware | ||
run: | | ||
cp *manna-harbour_miryoku* "${{ steps.inputs.outputs.artifact_dir }}" | ||
- name: Archive artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ steps.inputs.outputs.artifact_build_name }} | ||
path: ${{ steps.inputs.outputs.artifact_dir }} | ||
continue-on-error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Copyright 2021 Manna Harbour | ||
# https://github.com/manna-harbour/miryoku | ||
|
||
name: 'Test All Configs' | ||
on: | ||
- workflow_dispatch | ||
jobs: | ||
build: | ||
if: github.repository_owner == 'manna-harbour' | ||
uses: ./.github/workflows/main.yml | ||
with: | ||
keyboard: '["crkbd"]' | ||
alphas: '[ | ||
"default", | ||
"azerty", | ||
"colemak", | ||
"colemakdhk", | ||
"dvorak", | ||
"halmak", | ||
"workman", | ||
"qwerty", | ||
"qwertz" | ||
]' | ||
nav: '[ | ||
"default", | ||
"vi", | ||
"invertedt" | ||
]' | ||
clipboard: '[ | ||
"default", | ||
"fun", | ||
"mac", | ||
"win" | ||
]' | ||
layers: '[ | ||
"default", | ||
"flip" | ||
]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Copyright 2021 Manna Harbour | ||
# https://github.com/manna-harbour/miryoku | ||
|
||
name: 'Test Build' | ||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
if: github.repository_owner == 'manna-harbour' | ||
uses: ./.github/workflows/main.yml | ||
with: | ||
keyboard: '["crkbd"]' |
Oops, something went wrong.