diff --git a/.github/workflows/build-example-corne-ish_zen.yml b/.github/workflows/build-example-corne-ish_zen.yml new file mode 100644 index 0000000..812b249 --- /dev/null +++ b/.github/workflows/build-example-corne-ish_zen.yml @@ -0,0 +1,11 @@ +# Copyright 2021 Manna Harbour +# https://github.com/manna-harbour/miryoku + +name: 'Build Example corne-ish_zen' +on: + - workflow_dispatch +jobs: + build: + uses: manna-harbour/zmk-config/.github/workflows/main.yml@master + with: + board: '["corne-ish_zen_left","corne-ish_zen_right"]' diff --git a/.github/workflows/build-example-corne-nice_nano.yml b/.github/workflows/build-example-corne-nice_nano.yml index 2337d84..49db26d 100644 --- a/.github/workflows/build-example-corne-nice_nano.yml +++ b/.github/workflows/build-example-corne-nice_nano.yml @@ -1,4 +1,3 @@ -# generated -*- buffer-read-only: t -*- # Copyright 2021 Manna Harbour # https://github.com/manna-harbour/miryoku @@ -7,160 +6,7 @@ on: - workflow_dispatch jobs: build: - runs-on: ubuntu-latest - container: - image: zmkfirmware/zmk-build-arm:2.5 - strategy: - fail-fast: false - matrix: - shield: - - corne_left - - corne_right - board: - - nice_nano - alphas: - - default - nav: - - default - clipboard: - - default - layers: - - default - mapping: - - default - kconfig: - - default - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Process variables - id: variables - run: | - if [ -n "${{ matrix.shield }}" -a "${{ matrix.shield }}" != "default" ] - then - SHIELD_ARG="-DSHIELD=${{ matrix.shield }}" - keyboard=${{ matrix.shield }} - shield=${{ matrix.shield }} - else - keyboard=${{ matrix.board }} - shield="" - fi - echo "::set-output name=shield-arg::${SHIELD_ARG}" - keyboard_split="$keyboard" - keyboard_base=`echo "$keyboard" | sed 's/_\(left\|right\)//'` - - configfile="${GITHUB_WORKSPACE}/miryoku/config.h" - echo '// Copyright 2021 Manna Harbour\n// https://github.com/manna-harbour/miryoku' > "$configfile" - echo "::set-output name=configfile::$configfile" - - artifact_build_name="miryoku_zmk $shield ${{ matrix.board }}" - for option in "alphas_${{ matrix.alphas }}" "nav_${{ matrix.nav }}" "clipboard_${{ matrix.clipboard }}" "layers_${{ matrix.layers }}" "mapping_${{ matrix.mapping }}" - do - case "$option" in - *_ ) ;; - *_default ) ;; - * ) - artifact_build_name="$artifact_build_name $option" - echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile" - ;; - esac - done - - artifacts_dir="artifacts" - echo "::set-output name=artifact-dir::$artifacts_dir" - mkdir "$artifacts_dir" - cp "$configfile" "$artifacts_dir" - - if [ -n "${{ matrix.kconfig }}" -a "${{ matrix.kconfig }}" != 'default' ] - then - kconfig_file="config/$keyboard_split.conf" - echo "${{ matrix.kconfig }}" > "$kconfig_file" - cat "$kconfig_file" - cp "$kconfig_file" "$artifacts_dir" - artifact_build_name="$artifact_build_name kconfig_"`echo "${{ matrix.kconfig }}" | md5sum | cut -d ' ' -f 1` - fi - - outboard_dir=".github/workflows/outboards" - if [ -n "$shield" ] - then - outboard_file="$outboard_dir/$keyboard_base.shield.outboard" - else - outboard_file="$outboard_dir/$keyboard_base.board.outboard" - fi - if [ ! -f "$outboard_file" ] - then - outboard_file="$outboard_dir/$keyboard_base.outboard" - fi - if [ -f "$outboard_file" ] - then - grep -v '^#' "$outboard_file" >> $GITHUB_ENV - cat "$outboard_file" - cp "$outboard_file" "$artifacts_dir" - fi - echo "::set-output name=outboard_chekout_dir::outboard" - - 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\)//'` - - - 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_chekout_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_chekout_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_chekout_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 firmware artifacts - run: | - 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 + uses: manna-harbour/zmk-config/.github/workflows/main.yml@master + with: + board: '["nice_nano"]' + shield: '["corne_left","corne_right"]' diff --git a/.github/workflows/build-example-tbkmini-nice_nano_v2.yml b/.github/workflows/build-example-tbkmini-nice_nano_v2.yml index cd222cb..1965220 100644 --- a/.github/workflows/build-example-tbkmini-nice_nano_v2.yml +++ b/.github/workflows/build-example-tbkmini-nice_nano_v2.yml @@ -1,4 +1,3 @@ -# generated -*- buffer-read-only: t -*- # Copyright 2021 Manna Harbour # https://github.com/manna-harbour/miryoku @@ -7,160 +6,7 @@ on: - workflow_dispatch jobs: build: - runs-on: ubuntu-latest - container: - image: zmkfirmware/zmk-build-arm:2.5 - strategy: - fail-fast: false - matrix: - shield: - - tbkmini_left # outboard - - tbkmini_right # outboard - board: - - nice_nano_v2 - alphas: - - default - nav: - - default - clipboard: - - default - layers: - - default - mapping: - - default - kconfig: - - default - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Process variables - id: variables - run: | - if [ -n "${{ matrix.shield }}" -a "${{ matrix.shield }}" != "default" ] - then - SHIELD_ARG="-DSHIELD=${{ matrix.shield }}" - keyboard=${{ matrix.shield }} - shield=${{ matrix.shield }} - else - keyboard=${{ matrix.board }} - shield="" - fi - echo "::set-output name=shield-arg::${SHIELD_ARG}" - keyboard_split="$keyboard" - keyboard_base=`echo "$keyboard" | sed 's/_\(left\|right\)//'` - - configfile="${GITHUB_WORKSPACE}/miryoku/config.h" - echo '// Copyright 2021 Manna Harbour\n// https://github.com/manna-harbour/miryoku' > "$configfile" - echo "::set-output name=configfile::$configfile" - - artifact_build_name="miryoku_zmk $shield ${{ matrix.board }}" - for option in "alphas_${{ matrix.alphas }}" "nav_${{ matrix.nav }}" "clipboard_${{ matrix.clipboard }}" "layers_${{ matrix.layers }}" "mapping_${{ matrix.mapping }}" - do - case "$option" in - *_ ) ;; - *_default ) ;; - * ) - artifact_build_name="$artifact_build_name $option" - echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile" - ;; - esac - done - - artifacts_dir="artifacts" - echo "::set-output name=artifact-dir::$artifacts_dir" - mkdir "$artifacts_dir" - cp "$configfile" "$artifacts_dir" - - if [ -n "${{ matrix.kconfig }}" -a "${{ matrix.kconfig }}" != 'default' ] - then - kconfig_file="config/$keyboard_split.conf" - echo "${{ matrix.kconfig }}" > "$kconfig_file" - cat "$kconfig_file" - cp "$kconfig_file" "$artifacts_dir" - artifact_build_name="$artifact_build_name kconfig_"`echo "${{ matrix.kconfig }}" | md5sum | cut -d ' ' -f 1` - fi - - outboard_dir=".github/workflows/outboards" - if [ -n "$shield" ] - then - outboard_file="$outboard_dir/$keyboard_base.shield.outboard" - else - outboard_file="$outboard_dir/$keyboard_base.board.outboard" - fi - if [ ! -f "$outboard_file" ] - then - outboard_file="$outboard_dir/$keyboard_base.outboard" - fi - if [ -f "$outboard_file" ] - then - grep -v '^#' "$outboard_file" >> $GITHUB_ENV - cat "$outboard_file" - cp "$outboard_file" "$artifacts_dir" - fi - echo "::set-output name=outboard_chekout_dir::outboard" - - 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\)//'` - - - 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_chekout_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_chekout_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_chekout_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 firmware artifacts - run: | - 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 + uses: manna-harbour/zmk-config/.github/workflows/main.yml@master + with: + board: '["nice_nano_v2"]' + shield: '["tbkmini_left","tbkmini_right"]' diff --git a/.github/workflows/build-inputs.yml b/.github/workflows/build-inputs.yml index e83924a..51ea472 100644 --- a/.github/workflows/build-inputs.yml +++ b/.github/workflows/build-inputs.yml @@ -1,4 +1,3 @@ -# generated -*- buffer-read-only: t -*- # Copyright 2021 Manna Harbour # https://github.com/manna-harbour/miryoku @@ -67,152 +66,14 @@ jobs: set-output "mapping" "${{ github.event.inputs.mapping }}" set-output "kconfig" "${{ github.event.inputs.kconfig }}" build: - runs-on: ubuntu-latest - container: - image: zmkfirmware/zmk-build-arm:2.5 + uses: manna-harbour/zmk-config/.github/workflows/main.yml@master 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) }} - kconfig: ${{ fromJSON(needs.process-inputs.outputs.kconfig) }} - 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_split="$keyboard" - keyboard_base=`echo "$keyboard" | sed 's/_\(left\|right\)//'` - - configfile="${GITHUB_WORKSPACE}/miryoku/config.h" - echo '// Copyright 2021 Manna Harbour\n// https://github.com/manna-harbour/miryoku' > "$configfile" - echo "::set-output name=configfile::$configfile" - - artifact_build_name="miryoku_zmk $shield ${{ matrix.board }}" - for option in "alphas_${{ matrix.alphas }}" "nav_${{ matrix.nav }}" "clipboard_${{ matrix.clipboard }}" "layers_${{ matrix.layers }}" "mapping_${{ matrix.mapping }}" - do - case "$option" in - *_ ) ;; - *_default ) ;; - * ) - artifact_build_name="$artifact_build_name $option" - echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile" - ;; - esac - done - - artifacts_dir="artifacts" - echo "::set-output name=artifact-dir::$artifacts_dir" - mkdir "$artifacts_dir" - cp "$configfile" "$artifacts_dir" - - if [ -n "${{ matrix.kconfig }}" -a "${{ matrix.kconfig }}" != 'default' ] - then - kconfig_file="config/$keyboard_split.conf" - echo "${{ matrix.kconfig }}" > "$kconfig_file" - cat "$kconfig_file" - cp "$kconfig_file" "$artifacts_dir" - artifact_build_name="$artifact_build_name kconfig_"`echo "${{ matrix.kconfig }}" | md5sum | cut -d ' ' -f 1` - fi - - outboard_dir=".github/workflows/outboards" - if [ -n "$shield" ] - then - outboard_file="$outboard_dir/$keyboard_base.shield.outboard" - else - outboard_file="$outboard_dir/$keyboard_base.board.outboard" - fi - if [ ! -f "$outboard_file" ] - then - outboard_file="$outboard_dir/$keyboard_base.outboard" - fi - if [ -f "$outboard_file" ] - then - grep -v '^#' "$outboard_file" >> $GITHUB_ENV - cat "$outboard_file" - cp "$outboard_file" "$artifacts_dir" - fi - echo "::set-output name=outboard_chekout_dir::outboard" - - 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\)//'` - - - 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_chekout_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_chekout_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_chekout_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 firmware artifacts - run: | - 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 + with: + board: ${{ needs.process-inputs.outputs.board }} + shield: ${{ needs.process-inputs.outputs.shield }} + 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 }} + kconfig: ${{ needs.process-inputs.outputs.kconfig }} diff --git a/.github/workflows/test-boards.yml b/.github/workflows/main.yml similarity index 86% rename from .github/workflows/test-boards.yml rename to .github/workflows/main.yml index b030452..ef2d70f 100644 --- a/.github/workflows/test-boards.yml +++ b/.github/workflows/main.yml @@ -1,41 +1,50 @@ -# generated -*- buffer-read-only: t -*- # Copyright 2021 Manna Harbour # https://github.com/manna-harbour/miryoku -name: 'Test Boards' +name: 'Main' on: - - workflow_dispatch + workflow_call: + inputs: + board: + type: string + default: '["default"]' + shield: + 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"]' + kconfig: + type: string + default: '["default"]' jobs: - build: + main: runs-on: ubuntu-latest container: image: zmkfirmware/zmk-build-arm:2.5 strategy: fail-fast: false matrix: - shield: - - "" - board: - - ahokore # outboard - - ble_chiffre # outboard - - corne-ish_zen_left # outboard - - corne-ish_zen_right # outboard - - ferris_rev02 # outboard - - planck_rev6 - - preonic_rev3 # outboard - - zaphod # outboard - alphas: - - default - nav: - - default - clipboard: - - default - layers: - - default - mapping: - - default - kconfig: - - default + board: ${{ fromJSON(inputs.board) }} + shield: ${{ fromJSON(inputs.shield) }} + alphas: ${{ fromJSON(inputs.alphas) }} + nav: ${{ fromJSON(inputs.nav) }} + clipboard: ${{ fromJSON(inputs.clipboard) }} + layers: ${{ fromJSON(inputs.layers) }} + mapping: ${{ fromJSON(inputs.mapping) }} + kconfig: ${{ fromJSON(inputs.kconfig) }} steps: - name: Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/src/build-example-corne-nice_nano.yml.m4 b/.github/workflows/src/build-example-corne-nice_nano.yml.m4 deleted file mode 100644 index 27870c5..0000000 --- a/.github/workflows/src/build-example-corne-nice_nano.yml.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2021 Manna Harbour -# https://github.com/manna-harbour/miryoku - -name: 'Build Example corne nice_nano' -m4_include(include/jobs-build.yml.m4)m4_dnl - shield: - - corne_left - - corne_right - board: - - nice_nano - alphas: - - default - nav: - - default - clipboard: - - default - layers: - - default - mapping: - - default - kconfig: - - default -m4_include(include/build-steps.yml.m4)m4_dnl diff --git a/.github/workflows/src/build-example-tbkmini-nice_nano_v2.yml.m4 b/.github/workflows/src/build-example-tbkmini-nice_nano_v2.yml.m4 deleted file mode 100644 index b59fc0e..0000000 --- a/.github/workflows/src/build-example-tbkmini-nice_nano_v2.yml.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2021 Manna Harbour -# https://github.com/manna-harbour/miryoku - -name: 'Build Example tbkmini nice_nano_v2' -m4_include(include/jobs-build.yml.m4)m4_dnl - shield: - - tbkmini_left # outboard - - tbkmini_right # outboard - board: - - nice_nano_v2 - alphas: - - default - nav: - - default - clipboard: - - default - layers: - - default - mapping: - - default - kconfig: - - default -m4_include(include/build-steps.yml.m4)m4_dnl diff --git a/.github/workflows/src/build-inputs.yml.m4 b/.github/workflows/src/build-inputs.yml.m4 deleted file mode 100644 index 86d6644..0000000 --- a/.github/workflows/src/build-inputs.yml.m4 +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright 2021 Manna Harbour -# https://github.com/manna-harbour/miryoku - -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' - kconfig: - description: 'Kconfig' - 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 }} - kconfig: ${{ steps.process-inputs.outputs.kconfig }} - 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 }}" - set-output "kconfig" "${{ github.event.inputs.kconfig }}" - 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) }} - kconfig: ${{ fromJSON(needs.process-inputs.outputs.kconfig) }} -m4_include(include/build-steps.yml.m4)m4_dnl diff --git a/.github/workflows/src/include/build-steps.yml.m4 b/.github/workflows/src/include/build-steps.yml.m4 deleted file mode 100644 index c1af0cb..0000000 --- a/.github/workflows/src/include/build-steps.yml.m4 +++ /dev/null @@ -1,134 +0,0 @@ - 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_split="$keyboard" - keyboard_base=`echo "$keyboard" | sed 's/_\(left\|right\)//'` - - configfile="${GITHUB_WORKSPACE}/miryoku/config.h" - echo '// Copyright 2021 Manna Harbour\n// https://github.com/manna-harbour/miryoku' > "$configfile" - echo "::set-output name=configfile::$configfile" - - artifact_build_name="miryoku_zmk $shield ${{ matrix.board }}" - for option in "alphas_${{ matrix.alphas }}" "nav_${{ matrix.nav }}" "clipboard_${{ matrix.clipboard }}" "layers_${{ matrix.layers }}" "mapping_${{ matrix.mapping }}" - do - case "$option" in - *_ ) ;; - *_default ) ;; - * ) - artifact_build_name="$artifact_build_name $option" - echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile" - ;; - esac - done - - artifacts_dir="artifacts" - echo "::set-output name=artifact-dir::$artifacts_dir" - mkdir "$artifacts_dir" - cp "$configfile" "$artifacts_dir" - - if [ -n "${{ matrix.kconfig }}" -a "${{ matrix.kconfig }}" != 'default' ] - then - kconfig_file="config/$keyboard_split.conf" - echo "${{ matrix.kconfig }}" > "$kconfig_file" - cat "$kconfig_file" - cp "$kconfig_file" "$artifacts_dir" - artifact_build_name="$artifact_build_name kconfig_"`echo "${{ matrix.kconfig }}" | md5sum | cut -d ' ' -f 1` - fi - - outboard_dir=".github/workflows/outboards" - if [ -n "$shield" ] - then - outboard_file="$outboard_dir/$keyboard_base.shield.outboard" - else - outboard_file="$outboard_dir/$keyboard_base.board.outboard" - fi - if [ ! -f "$outboard_file" ] - then - outboard_file="$outboard_dir/$keyboard_base.outboard" - fi - if [ -f "$outboard_file" ] - then - grep -v '^#' "$outboard_file" >> $GITHUB_ENV - cat "$outboard_file" - cp "$outboard_file" "$artifacts_dir" - fi - echo "::set-output name=outboard_chekout_dir::outboard" - - 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\)//'` - - - 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_chekout_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_chekout_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_chekout_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 firmware artifacts - run: | - 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 diff --git a/.github/workflows/src/include/init.yml.m4 b/.github/workflows/src/include/init.yml.m4 deleted file mode 100644 index 96167c5..0000000 --- a/.github/workflows/src/include/init.yml.m4 +++ /dev/null @@ -1,2 +0,0 @@ -# generated -*- buffer-read-only: t -*- -m4_changequote(<<<,>>>)m4_dnl diff --git a/.github/workflows/src/include/jobs-build.yml.m4 b/.github/workflows/src/include/jobs-build.yml.m4 deleted file mode 100644 index 1eada96..0000000 --- a/.github/workflows/src/include/jobs-build.yml.m4 +++ /dev/null @@ -1,10 +0,0 @@ -on: - - workflow_dispatch -jobs: - build: - runs-on: ubuntu-latest - container: - image: zmkfirmware/zmk-build-arm:2.5 - strategy: - fail-fast: false - matrix: diff --git a/.github/workflows/src/makefile b/.github/workflows/src/makefile deleted file mode 100644 index 4e8116d..0000000 --- a/.github/workflows/src/makefile +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright 2021 Manna Harbour -# https://github.com/manna-harbour/miryoku - -source := $(wildcard *.yml.m4) -targets := $(source:%.yml.m4=../%.yml) -all: $(targets) - -../%.yml: %.yml.m4 include/* makefile - m4 -P include/init.yml.m4 $< > $@ diff --git a/.github/workflows/src/test-boards.yml.m4 b/.github/workflows/src/test-boards.yml.m4 deleted file mode 100644 index 2600a2f..0000000 --- a/.github/workflows/src/test-boards.yml.m4 +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2021 Manna Harbour -# https://github.com/manna-harbour/miryoku - -name: 'Test Boards' -m4_include(include/jobs-build.yml.m4)m4_dnl - shield: - - "" - board: - - ahokore # outboard - - ble_chiffre # outboard - - corne-ish_zen_left # outboard - - corne-ish_zen_right # outboard - - ferris_rev02 # outboard - - planck_rev6 - - preonic_rev3 # outboard - - zaphod # outboard - alphas: - - default - nav: - - default - clipboard: - - default - layers: - - default - mapping: - - default - kconfig: - - default -m4_include(include/build-steps.yml.m4)m4_dnl diff --git a/.github/workflows/src/test-build.yml.m4 b/.github/workflows/src/test-build.yml.m4 deleted file mode 100644 index d1040e6..0000000 --- a/.github/workflows/src/test-build.yml.m4 +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 2021 Manna Harbour -# https://github.com/manna-harbour/miryoku - -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 - board: - - nice_nano - alphas: - - default - nav: - - default - clipboard: - - default - layers: - - default - mapping: - - default - kconfig: - - default -m4_include(include/build-steps.yml.m4)m4_dnl diff --git a/.github/workflows/src/test-configs.yml.m4 b/.github/workflows/src/test-configs.yml.m4 deleted file mode 100644 index 5dd1cdc..0000000 --- a/.github/workflows/src/test-configs.yml.m4 +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2021 Manna Harbour -# https://github.com/manna-harbour/miryoku - -name: 'Test Configs' -m4_include(include/jobs-build.yml.m4)m4_dnl - shield: - - corne_left - 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 - kconfig: - - default -m4_include(include/build-steps.yml.m4)m4_dnl diff --git a/.github/workflows/src/test-controllers.yml.m4 b/.github/workflows/src/test-controllers.yml.m4 deleted file mode 100644 index 5e97e8a..0000000 --- a/.github/workflows/src/test-controllers.yml.m4 +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 2021 Manna Harbour -# https://github.com/manna-harbour/miryoku - -name: 'Test Controllers' -m4_include(include/jobs-build.yml.m4)m4_dnl - shield: - - corne_left - board: - - bluemicro840_v1 - - nice_nano - - nice_nano_v2 - - nrfmicro_11 - - nrfmicro_13 - - proton_c - alphas: - - default - nav: - - default - clipboard: - - default - layers: - - default - mapping: - - default - kconfig: - - default -m4_include(include/build-steps.yml.m4)m4_dnl diff --git a/.github/workflows/src/test-shields.yml.m4 b/.github/workflows/src/test-shields.yml.m4 deleted file mode 100644 index 470dbde..0000000 --- a/.github/workflows/src/test-shields.yml.m4 +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright 2021 Manna Harbour -# https://github.com/manna-harbour/miryoku - -name: 'Test Shields' -m4_include(include/jobs-build.yml.m4)m4_dnl - shield: - - absolem # outboard - - a_dux_left - - a_dux_right - - ahokore # outboard - # - arch36_left # outboard - # - arch36_right # outboard - - bastyl_left # outboard - - bastyl_right # outboard - - bat43 # outboard - - boardsource5x12 # outboard - - contra # outboard - - corne_left - - corne_right - - cradio36_left # outboard - - cradio36_right # outboard - - cradio_left - - cradio_right - - cradios_left # outboard - - cradios_right # outboard - - crbn - - eek - - ergodash_left # outboard - - ergodash_right # outboard - - helix_left - - helix_right - - iris_left - - iris_right - - jian_left - - jian_right - - jorne_left - - jorne_right - - kyria_left - - kyria_right - - levinson_left # outboard - - levinson_right # outboard - - lily58_left - - lily58_right - - microdox_left - - microdox_right - - microdox_mod_left # outboard - - microdox_mod_right # outboard - - naked60 - - pockettype # outboard - - pteron36_left # outboard - - pteron36_right # outboard - - rebound_v4 # outboard - - reviung39 # outboard - - reviung41 - - sofle_left - - sofle_right - - splitreus62_left - - splitreus62_right - - tbkmini_left # outboard - - tbkmini_right # outboard - - tightyl_left # outboard - - tightyl_right # outboard - - viterbi_left # outboard - - viterbi_right # outboard - - zodiark_left # outboard - - zodiark_right # outboard - board: - - nice_nano - alphas: - - default - nav: - - default - clipboard: - - default - layers: - - default - mapping: - - default - kconfig: - - default -m4_include(include/build-steps.yml.m4)m4_dnl diff --git a/.github/workflows/test-all-boards.yml b/.github/workflows/test-all-boards.yml new file mode 100644 index 0000000..8fd9548 --- /dev/null +++ b/.github/workflows/test-all-boards.yml @@ -0,0 +1,13 @@ +# Copyright 2021 Manna Harbour +# https://github.com/manna-harbour/miryoku + +name: 'Test All Boards' +on: + - workflow_dispatch +jobs: + build: + if: github.repository_owner == 'manna-harbour' + uses: manna-harbour/zmk-config/.github/workflows/main.yml@master + with: + board: '["ahokore","ble_chiffre","corne-ish_zen_left","corne-ish_zen_right","ferris_rev02","planck_rev6","preonic_rev3","zaphod"]' + diff --git a/.github/workflows/test-all-configs.yml b/.github/workflows/test-all-configs.yml new file mode 100644 index 0000000..53552f2 --- /dev/null +++ b/.github/workflows/test-all-configs.yml @@ -0,0 +1,17 @@ +# 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: manna-harbour/zmk-config/.github/workflows/main.yml@master + with: + board: '["nice_nano"]' + shield: '["corne_left"]' + alphas: '["default","azerty","colemak","colemakdhk","dvorak","halmak","workman","qwerty","qwertz"]' + nav: '["default","vi","invertedt"]' + clipboard: '["default","fun","mac","win"]' + layers: '["default","flip"]' diff --git a/.github/workflows/test-all-controllers.yml b/.github/workflows/test-all-controllers.yml new file mode 100644 index 0000000..68aa552 --- /dev/null +++ b/.github/workflows/test-all-controllers.yml @@ -0,0 +1,13 @@ +# Copyright 2021 Manna Harbour +# https://github.com/manna-harbour/miryoku + +name: 'Test All Controllers' +on: + - workflow_dispatch +jobs: + build: + if: github.repository_owner == 'manna-harbour' + uses: manna-harbour/zmk-config/.github/workflows/main.yml@master + with: + board: '["bluemicro840_v1","nice_nano","nice_nano_v2","nrfmicro_11","nrfmicro_13","proton_c"]' + shield: '["corne_left"]' diff --git a/.github/workflows/test-all-shields.yml b/.github/workflows/test-all-shields.yml new file mode 100644 index 0000000..b0bdb7f --- /dev/null +++ b/.github/workflows/test-all-shields.yml @@ -0,0 +1,14 @@ +# Copyright 2021 Manna Harbour +# https://github.com/manna-harbour/miryoku + +name: 'Test All Shields' +on: + - workflow_dispatch +jobs: + build: + if: github.repository_owner == 'manna-harbour' + uses: manna-harbour/zmk-config/.github/workflows/main.yml@master + with: + board: '["nice_nano"]' + shield: '["absolem","a_dux_left","a_dux_right","ahokore","arch36_left","arch36_right","bastyl_left","bastyl_right","bat43","boardsource5x12","contra","corne_left","corne_right","cradio36_left","cradio36_right","cradio_left","cradio_right","cradios_left","cradios_right","crbn","eek","ergodash_left","ergodash_right","helix_left","helix_right","iris_left","iris_right","jian_left","jian_right","jorne_left","jorne_right","kyria_left","kyria_right","levinson_left","levinson_right","lily58_left","lily58_right","microdox_left","microdox_right","microdox_mod_left","microdox_mod_right","naked60","pockettype","pteron36_left","pteron36_right","rebound_v4","reviung39","reviung41","sofle_left","sofle_right","splitreus62_left","splitreus62_right","tbkmini_left","tbkmini_right","tightyl_left","tightyl_right","viterbi_left","viterbi_right","zodiark_left","zodiark_right"]' + diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index 1b2566d..341b8eb 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -1,170 +1,15 @@ -# generated -*- buffer-read-only: t -*- # Copyright 2021 Manna Harbour # https://github.com/manna-harbour/miryoku 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 - board: - - nice_nano - alphas: - - default - nav: - - default - clipboard: - - default - layers: - - default - mapping: - - default - kconfig: - - default - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Process variables - id: variables - run: | - if [ -n "${{ matrix.shield }}" -a "${{ matrix.shield }}" != "default" ] - then - SHIELD_ARG="-DSHIELD=${{ matrix.shield }}" - keyboard=${{ matrix.shield }} - shield=${{ matrix.shield }} - else - keyboard=${{ matrix.board }} - shield="" - fi - echo "::set-output name=shield-arg::${SHIELD_ARG}" - keyboard_split="$keyboard" - keyboard_base=`echo "$keyboard" | sed 's/_\(left\|right\)//'` - - configfile="${GITHUB_WORKSPACE}/miryoku/config.h" - echo '// Copyright 2021 Manna Harbour\n// https://github.com/manna-harbour/miryoku' > "$configfile" - echo "::set-output name=configfile::$configfile" - - artifact_build_name="miryoku_zmk $shield ${{ matrix.board }}" - for option in "alphas_${{ matrix.alphas }}" "nav_${{ matrix.nav }}" "clipboard_${{ matrix.clipboard }}" "layers_${{ matrix.layers }}" "mapping_${{ matrix.mapping }}" - do - case "$option" in - *_ ) ;; - *_default ) ;; - * ) - artifact_build_name="$artifact_build_name $option" - echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile" - ;; - esac - done - - artifacts_dir="artifacts" - echo "::set-output name=artifact-dir::$artifacts_dir" - mkdir "$artifacts_dir" - cp "$configfile" "$artifacts_dir" - - if [ -n "${{ matrix.kconfig }}" -a "${{ matrix.kconfig }}" != 'default' ] - then - kconfig_file="config/$keyboard_split.conf" - echo "${{ matrix.kconfig }}" > "$kconfig_file" - cat "$kconfig_file" - cp "$kconfig_file" "$artifacts_dir" - artifact_build_name="$artifact_build_name kconfig_"`echo "${{ matrix.kconfig }}" | md5sum | cut -d ' ' -f 1` - fi - - outboard_dir=".github/workflows/outboards" - if [ -n "$shield" ] - then - outboard_file="$outboard_dir/$keyboard_base.shield.outboard" - else - outboard_file="$outboard_dir/$keyboard_base.board.outboard" - fi - if [ ! -f "$outboard_file" ] - then - outboard_file="$outboard_dir/$keyboard_base.outboard" - fi - if [ -f "$outboard_file" ] - then - grep -v '^#' "$outboard_file" >> $GITHUB_ENV - cat "$outboard_file" - cp "$outboard_file" "$artifacts_dir" - fi - echo "::set-output name=outboard_chekout_dir::outboard" - - 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\)//'` - - - 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_chekout_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_chekout_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_chekout_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 firmware artifacts - run: | - 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 + if: github.repository_owner == 'manna-harbour' + uses: manna-harbour/zmk-config/.github/workflows/main.yml@master + with: + board: '["nice_nano"]' + shield: '["corne_left"]' diff --git a/.github/workflows/test-configs.yml b/.github/workflows/test-configs.yml deleted file mode 100644 index 6f909ba..0000000 --- a/.github/workflows/test-configs.yml +++ /dev/null @@ -1,177 +0,0 @@ -# generated -*- buffer-read-only: t -*- -# Copyright 2021 Manna Harbour -# https://github.com/manna-harbour/miryoku - -name: 'Test Configs' -on: - - workflow_dispatch -jobs: - build: - runs-on: ubuntu-latest - container: - image: zmkfirmware/zmk-build-arm:2.5 - strategy: - fail-fast: false - matrix: - shield: - - corne_left - 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 - kconfig: - - default - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Process variables - id: variables - run: | - if [ -n "${{ matrix.shield }}" -a "${{ matrix.shield }}" != "default" ] - then - SHIELD_ARG="-DSHIELD=${{ matrix.shield }}" - keyboard=${{ matrix.shield }} - shield=${{ matrix.shield }} - else - keyboard=${{ matrix.board }} - shield="" - fi - echo "::set-output name=shield-arg::${SHIELD_ARG}" - keyboard_split="$keyboard" - keyboard_base=`echo "$keyboard" | sed 's/_\(left\|right\)//'` - - configfile="${GITHUB_WORKSPACE}/miryoku/config.h" - echo '// Copyright 2021 Manna Harbour\n// https://github.com/manna-harbour/miryoku' > "$configfile" - echo "::set-output name=configfile::$configfile" - - artifact_build_name="miryoku_zmk $shield ${{ matrix.board }}" - for option in "alphas_${{ matrix.alphas }}" "nav_${{ matrix.nav }}" "clipboard_${{ matrix.clipboard }}" "layers_${{ matrix.layers }}" "mapping_${{ matrix.mapping }}" - do - case "$option" in - *_ ) ;; - *_default ) ;; - * ) - artifact_build_name="$artifact_build_name $option" - echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile" - ;; - esac - done - - artifacts_dir="artifacts" - echo "::set-output name=artifact-dir::$artifacts_dir" - mkdir "$artifacts_dir" - cp "$configfile" "$artifacts_dir" - - if [ -n "${{ matrix.kconfig }}" -a "${{ matrix.kconfig }}" != 'default' ] - then - kconfig_file="config/$keyboard_split.conf" - echo "${{ matrix.kconfig }}" > "$kconfig_file" - cat "$kconfig_file" - cp "$kconfig_file" "$artifacts_dir" - artifact_build_name="$artifact_build_name kconfig_"`echo "${{ matrix.kconfig }}" | md5sum | cut -d ' ' -f 1` - fi - - outboard_dir=".github/workflows/outboards" - if [ -n "$shield" ] - then - outboard_file="$outboard_dir/$keyboard_base.shield.outboard" - else - outboard_file="$outboard_dir/$keyboard_base.board.outboard" - fi - if [ ! -f "$outboard_file" ] - then - outboard_file="$outboard_dir/$keyboard_base.outboard" - fi - if [ -f "$outboard_file" ] - then - grep -v '^#' "$outboard_file" >> $GITHUB_ENV - cat "$outboard_file" - cp "$outboard_file" "$artifacts_dir" - fi - echo "::set-output name=outboard_chekout_dir::outboard" - - 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\)//'` - - - 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_chekout_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_chekout_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_chekout_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 firmware artifacts - run: | - 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 diff --git a/.github/workflows/test-controllers.yml b/.github/workflows/test-controllers.yml deleted file mode 100644 index d5952cb..0000000 --- a/.github/workflows/test-controllers.yml +++ /dev/null @@ -1,170 +0,0 @@ -# generated -*- buffer-read-only: t -*- -# Copyright 2021 Manna Harbour -# https://github.com/manna-harbour/miryoku - -name: 'Test Controllers' -on: - - workflow_dispatch -jobs: - build: - runs-on: ubuntu-latest - container: - image: zmkfirmware/zmk-build-arm:2.5 - strategy: - fail-fast: false - matrix: - shield: - - corne_left - board: - - bluemicro840_v1 - - nice_nano - - nice_nano_v2 - - nrfmicro_11 - - nrfmicro_13 - - proton_c - alphas: - - default - nav: - - default - clipboard: - - default - layers: - - default - mapping: - - default - kconfig: - - default - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Process variables - id: variables - run: | - if [ -n "${{ matrix.shield }}" -a "${{ matrix.shield }}" != "default" ] - then - SHIELD_ARG="-DSHIELD=${{ matrix.shield }}" - keyboard=${{ matrix.shield }} - shield=${{ matrix.shield }} - else - keyboard=${{ matrix.board }} - shield="" - fi - echo "::set-output name=shield-arg::${SHIELD_ARG}" - keyboard_split="$keyboard" - keyboard_base=`echo "$keyboard" | sed 's/_\(left\|right\)//'` - - configfile="${GITHUB_WORKSPACE}/miryoku/config.h" - echo '// Copyright 2021 Manna Harbour\n// https://github.com/manna-harbour/miryoku' > "$configfile" - echo "::set-output name=configfile::$configfile" - - artifact_build_name="miryoku_zmk $shield ${{ matrix.board }}" - for option in "alphas_${{ matrix.alphas }}" "nav_${{ matrix.nav }}" "clipboard_${{ matrix.clipboard }}" "layers_${{ matrix.layers }}" "mapping_${{ matrix.mapping }}" - do - case "$option" in - *_ ) ;; - *_default ) ;; - * ) - artifact_build_name="$artifact_build_name $option" - echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile" - ;; - esac - done - - artifacts_dir="artifacts" - echo "::set-output name=artifact-dir::$artifacts_dir" - mkdir "$artifacts_dir" - cp "$configfile" "$artifacts_dir" - - if [ -n "${{ matrix.kconfig }}" -a "${{ matrix.kconfig }}" != 'default' ] - then - kconfig_file="config/$keyboard_split.conf" - echo "${{ matrix.kconfig }}" > "$kconfig_file" - cat "$kconfig_file" - cp "$kconfig_file" "$artifacts_dir" - artifact_build_name="$artifact_build_name kconfig_"`echo "${{ matrix.kconfig }}" | md5sum | cut -d ' ' -f 1` - fi - - outboard_dir=".github/workflows/outboards" - if [ -n "$shield" ] - then - outboard_file="$outboard_dir/$keyboard_base.shield.outboard" - else - outboard_file="$outboard_dir/$keyboard_base.board.outboard" - fi - if [ ! -f "$outboard_file" ] - then - outboard_file="$outboard_dir/$keyboard_base.outboard" - fi - if [ -f "$outboard_file" ] - then - grep -v '^#' "$outboard_file" >> $GITHUB_ENV - cat "$outboard_file" - cp "$outboard_file" "$artifacts_dir" - fi - echo "::set-output name=outboard_chekout_dir::outboard" - - 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\)//'` - - - 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_chekout_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_chekout_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_chekout_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 firmware artifacts - run: | - 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 diff --git a/.github/workflows/test-shields.yml b/.github/workflows/test-shields.yml deleted file mode 100644 index a6eb96c..0000000 --- a/.github/workflows/test-shields.yml +++ /dev/null @@ -1,224 +0,0 @@ -# generated -*- buffer-read-only: t -*- -# Copyright 2021 Manna Harbour -# https://github.com/manna-harbour/miryoku - -name: 'Test Shields' -on: - - workflow_dispatch -jobs: - build: - runs-on: ubuntu-latest - container: - image: zmkfirmware/zmk-build-arm:2.5 - strategy: - fail-fast: false - matrix: - shield: - - absolem # outboard - - a_dux_left - - a_dux_right - - ahokore # outboard - # - arch36_left # outboard - # - arch36_right # outboard - - bastyl_left # outboard - - bastyl_right # outboard - - bat43 # outboard - - boardsource5x12 # outboard - - contra # outboard - - corne_left - - corne_right - - cradio36_left # outboard - - cradio36_right # outboard - - cradio_left - - cradio_right - - cradios_left # outboard - - cradios_right # outboard - - crbn - - eek - - ergodash_left # outboard - - ergodash_right # outboard - - helix_left - - helix_right - - iris_left - - iris_right - - jian_left - - jian_right - - jorne_left - - jorne_right - - kyria_left - - kyria_right - - levinson_left # outboard - - levinson_right # outboard - - lily58_left - - lily58_right - - microdox_left - - microdox_right - - microdox_mod_left # outboard - - microdox_mod_right # outboard - - naked60 - - pockettype # outboard - - pteron36_left # outboard - - pteron36_right # outboard - - rebound_v4 # outboard - - reviung39 # outboard - - reviung41 - - sofle_left - - sofle_right - - splitreus62_left - - splitreus62_right - - tbkmini_left # outboard - - tbkmini_right # outboard - - tightyl_left # outboard - - tightyl_right # outboard - - viterbi_left # outboard - - viterbi_right # outboard - - zodiark_left # outboard - - zodiark_right # outboard - board: - - nice_nano - alphas: - - default - nav: - - default - clipboard: - - default - layers: - - default - mapping: - - default - kconfig: - - default - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Process variables - id: variables - run: | - if [ -n "${{ matrix.shield }}" -a "${{ matrix.shield }}" != "default" ] - then - SHIELD_ARG="-DSHIELD=${{ matrix.shield }}" - keyboard=${{ matrix.shield }} - shield=${{ matrix.shield }} - else - keyboard=${{ matrix.board }} - shield="" - fi - echo "::set-output name=shield-arg::${SHIELD_ARG}" - keyboard_split="$keyboard" - keyboard_base=`echo "$keyboard" | sed 's/_\(left\|right\)//'` - - configfile="${GITHUB_WORKSPACE}/miryoku/config.h" - echo '// Copyright 2021 Manna Harbour\n// https://github.com/manna-harbour/miryoku' > "$configfile" - echo "::set-output name=configfile::$configfile" - - artifact_build_name="miryoku_zmk $shield ${{ matrix.board }}" - for option in "alphas_${{ matrix.alphas }}" "nav_${{ matrix.nav }}" "clipboard_${{ matrix.clipboard }}" "layers_${{ matrix.layers }}" "mapping_${{ matrix.mapping }}" - do - case "$option" in - *_ ) ;; - *_default ) ;; - * ) - artifact_build_name="$artifact_build_name $option" - echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile" - ;; - esac - done - - artifacts_dir="artifacts" - echo "::set-output name=artifact-dir::$artifacts_dir" - mkdir "$artifacts_dir" - cp "$configfile" "$artifacts_dir" - - if [ -n "${{ matrix.kconfig }}" -a "${{ matrix.kconfig }}" != 'default' ] - then - kconfig_file="config/$keyboard_split.conf" - echo "${{ matrix.kconfig }}" > "$kconfig_file" - cat "$kconfig_file" - cp "$kconfig_file" "$artifacts_dir" - artifact_build_name="$artifact_build_name kconfig_"`echo "${{ matrix.kconfig }}" | md5sum | cut -d ' ' -f 1` - fi - - outboard_dir=".github/workflows/outboards" - if [ -n "$shield" ] - then - outboard_file="$outboard_dir/$keyboard_base.shield.outboard" - else - outboard_file="$outboard_dir/$keyboard_base.board.outboard" - fi - if [ ! -f "$outboard_file" ] - then - outboard_file="$outboard_dir/$keyboard_base.outboard" - fi - if [ -f "$outboard_file" ] - then - grep -v '^#' "$outboard_file" >> $GITHUB_ENV - cat "$outboard_file" - cp "$outboard_file" "$artifacts_dir" - fi - echo "::set-output name=outboard_chekout_dir::outboard" - - 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\)//'` - - - 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_chekout_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_chekout_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_chekout_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 firmware artifacts - run: | - 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 diff --git a/readme.org b/readme.org index 921fa80..3391b04 100644 --- a/readme.org +++ b/readme.org @@ -5,73 +5,82 @@ [[https://raw.githubusercontent.com/manna-harbour/miryoku/master/data/cover/miryoku-kle-cover.png]] -[[https://github.com/manna-harbour/miryoku/][Miryoku]] is an ergonomic, minimal, orthogonal, and universal keyboard layout. This is the Miryoku implementation for [[https://zmkfirmware.dev/][ZMK]]. +[[https://github.com/manna-harbour/miryoku/][Miryoku]] is an ergonomic, minimal, orthogonal, and universal keyboard layout. [[https://github.com/manna-harbour/miryoku_zmk][Miryoku ZMK]] is the Miryoku implementation for [[https://zmkfirmware.dev/][ZMK]]. ** Building -*** Supported Keyboards - -See the various Test [[#github-actions-workflows][workflow]] files for lists of supported keyboards. - - -**** Board Only - -Any [[https://github.com/zmkfirmware/zmk/tree/main/app/boards/arm][board supported by ZMK]] with a [[#keyboard-keymaps][keymap in Miryoku ZMK]]. - - -**** Board / Shield Combination - -Any compatible combination of [[https://github.com/zmkfirmware/zmk/tree/main/app/boards/arm][board supported by ZMK]] and [[https://github.com/zmkfirmware/zmk/tree/main/app/boards/shields][shield supported by ZMK]] with a [[#keyboard-keymaps][keymap in Miryoku ZMK]]. - - -**** Out of Tree Boards and Shields - -Additionally, some out of tree boards and shields are automatically supported by the included [[#github-actions-workflows][workflows]]. See [[.github/workflows/outboards]]. - - *** Local Builds -Clone this repo and use for [[https://zmk.dev/docs/development/build-flash#building-from-zmk-config-folder][ZMK_CONFIG]]. +Clone this repository and use for [[https://zmk.dev/docs/development/build-flash#building-from-zmk-config-folder][ZMK_CONFIG]]. *** GitHub Actions Workflows -Workflow files are in [[.github/workflows]]. To access a workflow, log in to GitHub, visit the [[https://github.com/manna-harbour/zmk-config/actions][Actions]] tab, and select the workflow. To download the firmware from a workflow run, select the workflow, select the workflow run, select the desired Artifacts, and unzip the downloaded zip file. +First log in to GitHub and fork the Miryoku ZMK repository. -[[#Supported-Keyboards][Supported keyboards]] and [[#configuration-options][configuration options]] can be used as values for the corresponding [[#build-examples][matrix]] or [[#build-inputs][inputs]] options. +To access a workflow, visit the Actions tab and select the workflow. To download the firmware from a workflow run, select the workflow, select the workflow run, select the desired Artifacts, and unzip the downloaded zip file. -The ~kconfig~ option can be used to generate a ~keyboard.conf~. Join multiple lines with ~\n~. +Workflow files are in [[.github/workflows]]. **** Build Examples -Fork this repo, copy one of the included Build Example workflow files, edit the ~name~ value, and edit the values for each matrix option as desired. +Copy one of the included Build Example workflow files, edit the ~name~ value, and edit and add options and values as desired. Select Run workflow, select the Branch if desired, and activate Run workflow. + +Options are specified in the ~with~ section and are of the following form. +: option: '["value"]' + +For multiple values per option use the following form, and a matrix build will be performed for each combination of values across all options. +: option: '["value1","value2"]' + +The ~board~ option specifies the ZMK ~board~ and is required. All other options are optional. The ~shield~ option specifies the ZMK ~shield~. + +The ~alphas~, ~nav~, ~clipboard~, and ~layers~ options correspond to the [[https://github.com/manna-harbour/miryoku/tree/master/docs/reference#alternative-layouts][alternative layout]] options. The ~mapping~ option corresponds to the alternative [[#mapping][mapping]] options. Values for these five options are case-insensitive. + +The ~kconfig~ option can be used to generate a ~keyboard.conf~. Join multiple lines with ~\n~. + +See the Test All workflow files for all supported values for each option. **** Build Inputs -Fork this repo, select the [[https://github.com/manna-harbour/zmk-config/actions/workflows/build-inputs.yml][Build Inputs]] workflow, select Run workflow, and fill out the form as desired. Multiple (comma and / or space separated) values can be entered in each field. Activate Run workflow, and wait for successful completion. +The Build Inputs workflow can be used without editing workflow files. Select Run workflow, select the Branch and fill out the form as desired, and activate Run workflow. + +Options are specified by entering values directly in the corresponding field. Multiple comma separated values can be entered per option and a matrix build will be performed for each combination of values across all options. + +The ~Board~ option specifies the ZMK ~board~ and is required. All other options are optional. The ~Shield~ option specifies the ZMK ~shield~. + +The ~Miryoku Alphas~, ~Miryoku Nav~, ~Miryoku Clipboard~, and ~Miryoku Layers~ options correspond to the [[https://github.com/manna-harbour/miryoku/tree/master/docs/reference#alternative-layouts][alternative layout]] options. The ~Miryoku Mapping~ option corresponds to the alternative [[#mapping][mapping]] options. Values for these five options are case-insensitive. + +The ~Kconfig~ option can be used to generate a ~keyboard.conf~. Join multiple lines with ~\n~. -**** Prebuilt Firmware +** Supported Keyboards -Some prebuilt firmware is available from previous workflow runs. +See the Test All [[#github-actions-workflows][workflow]] files for lists of supported keyboards. -** Miryoku Keymap +*** Board Only -The Miryoku keymap is a ZMK DT keymap file using C preprocessor macros for [[#configuration-options][configuration options]] and to abstract the physical layout. The file is [[miryoku/miryoku.dtsi]]. The file is included into the [[#keyboard-keymaps][keyboard's keymap]] after the config file and mapping with: +Any [[https://github.com/zmkfirmware/zmk/tree/main/app/boards/arm][board supported by ZMK]] with a [[#keyboard-keymaps][keymap in Miryoku ZMK]]. + + +*** Board / Shield Combination + +Any compatible combination of [[https://github.com/zmkfirmware/zmk/tree/main/app/boards/arm][board supported by ZMK]] and [[https://github.com/zmkfirmware/zmk/tree/main/app/boards/shields][shield supported by ZMK]] with a [[#keyboard-keymaps][keymap in Miryoku ZMK]]. + + +*** Out of Tree Boards and Shields + +Additionally, some out of tree boards and shields are automatically supported by the included [[#github-actions-workflows][workflows]]. See [[.github/workflows/outboards]]. -#+BEGIN_SRC C :tangle no -#include "../miryoku/miryoku.dtsi" -#+END_SRC ** Configuration Options -[[https://github.com/manna-harbour/qmk_firmware/blob/miryoku/users/manna-harbour_miryoku/miryoku.org#alternative-layouts][Keymap configuration options]] and [[#mapping][mapping]] configuration options are given in the documentation in the form ~option=value~. +[[https://github.com/manna-harbour/miryoku/tree/master/docs/reference#alternative-layouts][Keymap configuration options]] and [[#mapping][mapping]] configuration options are given in the documentation in the form ~option=value~. *** Use in Local Builds @@ -93,7 +102,7 @@ The config file can be used to provide [[#configuration-options][configuration o #+END_SRC -** Example Config File +*** Example Config File Below is an example [[#config-file][config file]] with the following keymap [[#configuration-options][configuration options]]: @@ -111,6 +120,17 @@ Below is an example [[#config-file][config file]] with the following keymap [[#c #+END_SRC +** Miryoku Keymap + +The Miryoku keymap is a ZMK DT keymap file using C preprocessor macros for [[#configuration-options][configuration options]] and to abstract the physical layout. The Miryoku keymap file is [[miryoku/miryoku.dtsi]]. The file is included into the [[#keyboard-keymaps][keyboard's keymap]] after the config file and mapping with: + +#+BEGIN_SRC C :tangle no +#include "../miryoku/miryoku.dtsi" +#+END_SRC + +Macros are included from [[miryoku/miryoku.h]]. Layer data is generated by [[https://github.com/manna-harbour/miryoku_babel][Miryoku Babel]] and is included from files in the [[miryoku/miryoku_babel]] directory. + + ** Mapping The keymap is mapped onto keyboards with different physical layouts. The keymap is specified in terms of the ~MIRYOKU_MAPPING~ macro. The macro is defined in a C header file for each physical layout. Unused keys are mapped to ~&none~. The files are in [[miryoku/mapping/]]. The mapping file is included into the keyboard's keymap file before the Miryoku keymap with e.g.