diff --git a/.github/workflows/build-ahokore-all.yml b/.github/workflows/build-ahokore-all.yml deleted file mode 100644 index fc2b96e..0000000 --- a/.github/workflows/build-ahokore-all.yml +++ /dev/null @@ -1,108 +0,0 @@ -name: 'Build ahokore with all options' -on: - - workflow_dispatch -jobs: - build: - runs-on: ubuntu-latest - container: - image: zmkfirmware/zmk-build-arm:2.4 - strategy: - fail-fast: false - matrix: - shield: - - "" - board: - - ahokore - alphas: - - "" - # - colemak - # - colemakdhk - # - dvorak - # - halmak - # - workman - # - qwerty - nav: - - "" - # - vi - clipboard: - - "" - # - fun - # - mac - # - win - layers: - - "" - mapping: - - "" - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Cache west modules - uses: actions/cache@v2 - env: - cache-name: cache-zephyr-modules - with: - path: | - bootloader/ - modules/ - tools/ - zephyr/ - zmk/ - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('config/west-ahokore.yml') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - timeout-minutes: 2 - continue-on-error: true - - name: Initialize workspace (west init) - run: west init -l config --mf west-ahokore.yml - - name: Update modules (west update) - run: west update - - name: Export Zephyr CMake package (west zephyr-export) - run: west zephyr-export - - name: Process matrix - id: variables - run: | - if [ -n "${{ matrix.shield }}" ] - then - SHIELD_ARG="-DSHIELD=${{ matrix.shield }}" - fi - echo "::set-output name=shield-arg::${SHIELD_ARG}" - 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 ${{ matrix.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 - *_ ) ;; - * ) - 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::$artifact_build_name" - echo "::set-output name=artifact-dir::artifacts" - - 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 diff --git a/.github/workflows/build-all-default.yml b/.github/workflows/build-all-default.yml deleted file mode 100644 index 1b858b4..0000000 --- a/.github/workflows/build-all-default.yml +++ /dev/null @@ -1,118 +0,0 @@ -name: 'Build all keyboards with default options' -on: - - workflow_dispatch -jobs: - build: - runs-on: ubuntu-latest - container: - image: zmkfirmware/zmk-build-arm:2.4 - strategy: - fail-fast: false - matrix: - shield: - - corne_left - - corne_right - - cradio_left - - cradio_right - - crbn - - eek - - helix_left - - helix_right - - iris_left - - iris_right - - jian_left - - jian_right - - jorne_left - - jorne_right - - kyria_left - - kyria_right - - lily58_left - - lily58_right - - microdox_left - - microdox_right - - sofle_left - - sofle_right - - splitreus62_left - - splitreus62_right - board: - - nice_nano - alphas: [""] - nav: [""] - clipboard: [""] - layers: [""] - mapping: [""] - include: - - board: planck_rev6 - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Cache west modules - uses: actions/cache@v2 - env: - cache-name: cache-zephyr-modules - with: - path: | - bootloader/ - modules/ - tools/ - zephyr/ - zmk/ - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('config/west.yml') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - 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: Process matrix - id: variables - run: | - if [ -n "${{ matrix.shield }}" ] - then - SHIELD_ARG="-DSHIELD=${{ matrix.shield }}" - fi - echo "::set-output name=shield-arg::${SHIELD_ARG}" - 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 ${{ matrix.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 - *_ ) ;; - * ) - 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" - - 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 diff --git a/.github/workflows/build-corne-all.yml b/.github/workflows/build-corne-all.yml deleted file mode 100644 index cf72471..0000000 --- a/.github/workflows/build-corne-all.yml +++ /dev/null @@ -1,111 +0,0 @@ -name: 'Build corne with all options' -on: - - workflow_dispatch -jobs: - build: - runs-on: ubuntu-latest - container: - image: zmkfirmware/zmk-build-arm:2.4 - strategy: - fail-fast: false - matrix: - shield: - - corne_left - board: - - nice_nano - alphas: - - "" - # - colemak - # - colemakdhk - # - dvorak - # - halmak - # - workman - # - qwerty - nav: - - "" - # - vi - clipboard: - - "" - # - fun - # - mac - # - win - layers: - - "" - mapping: - - "" - include: - - shield: corne_right - board: nice_nano - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Cache west modules - uses: actions/cache@v2 - env: - cache-name: cache-zephyr-modules - with: - path: | - bootloader/ - modules/ - tools/ - zephyr/ - zmk/ - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('config/west.yml') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - 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: Process matrix - id: variables - run: | - if [ -n "${{ matrix.shield }}" ] - then - SHIELD_ARG="-DSHIELD=${{ matrix.shield }}" - fi - echo "::set-output name=shield-arg::${SHIELD_ARG}" - 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 ${{ matrix.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 - *_ ) ;; - * ) - 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::$artifact_build_name" - echo "::set-output name=artifact-dir::artifacts" - - 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 diff --git a/.github/workflows/build-corne_left-default.yml b/.github/workflows/build-corne_left-default.yml deleted file mode 100644 index 6aa35f2..0000000 --- a/.github/workflows/build-corne_left-default.yml +++ /dev/null @@ -1,98 +0,0 @@ -name: 'Build corne_left with default options' -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.4 - strategy: - fail-fast: false - matrix: - shield: - - corne_left - board: - - nice_nano - alphas: [""] - nav: [""] - clipboard: [""] - layers: [""] - mapping: [""] - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Cache west modules - uses: actions/cache@v2 - env: - cache-name: cache-zephyr-modules - with: - path: | - bootloader/ - modules/ - tools/ - zephyr/ - zmk/ - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('config/west.yml') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - 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: Process matrix - id: variables - run: | - if [ -n "${{ matrix.shield }}" ] - then - SHIELD_ARG="-DSHIELD=${{ matrix.shield }}" - fi - echo "::set-output name=shield-arg::${SHIELD_ARG}" - 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 ${{ matrix.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 - *_ ) ;; - * ) - 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" - - 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 diff --git a/.github/workflows/build-corneishzen-all.yml b/.github/workflows/build-corneishzen-all.yml deleted file mode 100644 index 62ae234..0000000 --- a/.github/workflows/build-corneishzen-all.yml +++ /dev/null @@ -1,110 +0,0 @@ -name: 'Build corne-ish_zen with all options' -on: - - workflow_dispatch -jobs: - build: - runs-on: ubuntu-latest - container: - image: zmkfirmware/zmk-build-arm:2.4 - strategy: - fail-fast: false - matrix: - shield: - - "" - board: - - corne-ish_zen_left - alphas: - - "" - - colemak - - colemakdhk - - dvorak - - halmak - - workman - - qwerty - nav: - - "" - - vi - clipboard: - - "" - - fun - - mac - - win - layers: - - "" - mapping: - - "" - include: - - board: corne-ish_zen_right - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Cache west modules - uses: actions/cache@v2 - env: - cache-name: cache-zephyr-modules - with: - path: | - bootloader/ - modules/ - tools/ - zephyr/ - zmk/ - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('config/west-corneishzen.yml') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - timeout-minutes: 2 - continue-on-error: true - - name: Initialize workspace (west init) - run: west init -l config --mf west-corneishzen.yml - - name: Update modules (west update) - run: west update - - name: Export Zephyr CMake package (west zephyr-export) - run: west zephyr-export - - name: Process matrix - id: variables - run: | - if [ -n "${{ matrix.shield }}" ] - then - SHIELD_ARG="-DSHIELD=${{ matrix.shield }}" - fi - echo "::set-output name=shield-arg::${SHIELD_ARG}" - 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 ${{ matrix.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 - *_ ) ;; - * ) - 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::$artifact_build_name" - echo "::set-output name=artifact-dir::artifacts" - - 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 diff --git a/.github/workflows/build-inputs.yml b/.github/workflows/build-inputs.yml new file mode 100644 index 0000000..eb5c3bd --- /dev/null +++ b/.github/workflows/build-inputs.yml @@ -0,0 +1,158 @@ +name: 'Build inputs' +on: + workflow_dispatch: + inputs: + board: + description: 'Board' + required: true + default: 'nice_nano' + shield: + description: 'Shield' + required: false + default: 'corne_left' + alphas: + description: 'Miryoku Alphas' + required: false + default: '' + nav: + description: 'Miryoku Nav' + required: false + default: '' + clipboard: + description: 'Miryoku Clipboard' + required: false + default: '' + layers: + description: 'Miryoku Layers' + required: false + default: '' + mapping: + description: 'Miryoku Mapping' + required: false + default: '' +jobs: + build: + runs-on: ubuntu-latest + container: + image: zmkfirmware/zmk-build-arm:2.5 + strategy: + fail-fast: false + steps: + - name: Checkout + 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 + id: variables + run: | + keyboard=${{ steps.inputs.outputs.board }} + if [ -n "${{ steps.inputs.outputs.shield }}" ] + then + SHIELD_ARG="-DSHIELD=${{ steps.inputs.outputs.shield }}" + keyboard=${{ steps.inputs.outputs.shield }} + fi + echo "::set-output name=shield-arg::${SHIELD_ARG}" + keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'` + + configfile="${GITHUB_WORKSPACE}/miryoku/config.h" + echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile" + echo "::set-output name=configfile::$configfile" + + artifact_build_name="miryoku_zmk ${{ steps.inputs.outputs.shield }} ${{ steps.inputs.outputs.board }}" + for option in "alphas_${{ steps.inputs.outputs.alphas }}" "nav_${{ steps.inputs.outputs.nav }}" "clipboard_${{ steps.inputs.outputs.clipboard }}" "layers_${{ steps.inputs.outputs.layers }}" "mapping_${{ steps.inputs.outputs.mapping }}" + do + case "$option" in + *_ ) ;; + * ) + artifact_build_name="$artifact_build_name $option" + echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile" + ;; + esac + done + artifact_build_name=`echo $artifact_build_name | tr ' ' '-'` + echo "::set-output name=artifact-build-name::$artifact_build_name" + echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'` + echo "::set-output name=artifact-dir::artifacts" + + manifests="manifests" + manifest="$manifests/west-$keyboard.yml" + if [ ! -f "config/$manifest" ] + then + manifest="west.yml" + fi + echo "::set-output name=manifest::$manifest" + + echo "::set-output name=board-config::board-config" + + env_file="config/board-configs/$keyboard.env" + if [ -f "$env_file" ] + then + cat "$env_file" >> $GITHUB_ENV + echo "::set-output name=has_board_config::true" + fi + - name: Checkout board-config + if: ${{ steps.variables.outputs.has_board_config == 'true' }} + uses: actions/checkout@v2 + with: + repository: ${{ env.board_config_repository }} + ref: ${{ env.board_config_ref }} + path: ${{ steps.variables.outputs.board-config }} + - name: Use board-config + if: ${{ steps.variables.outputs.has_board_config == 'true' }} + run: | + mkdir -p `dirname "config/${{ env.board_config_to }}"` + ln -sr ${{ steps.variables.outputs.board-config }}/${{ env.board_config_from }} config/${{ env.board_config_to }} + if [ -n "${{ env.board_config_manifestdir }}" ] + then + cp ${{ steps.variables.outputs.board-config }}/${{ env.board_config_manifestdir }}/west.yml config/ + cat config/west.yml + fi + - name: Cache west modules + uses: actions/cache@v2 + env: + cache-name: zephyr + with: + path: | + bootloader/ + modules/ + tools/ + zephyr/ + zmk/ + key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('config/{0}', steps.variables.outputs.manifest)) }} + restore-keys: ${{ runner.os }}-${{ env.cache-name }} + timeout-minutes: 2 + continue-on-error: true + - name: Initialize workspace (west init) + run: west init -l config --mf ${{ steps.variables.outputs.manifest }} + - name: Update modules (west update) + run: west update + - name: Export Zephyr CMake package (west zephyr-export) + run: west zephyr-export + - name: Build (west build) + run: west build -s zmk/app -b ${{ steps.inputs.outputs.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config" + - name: Prepare artifacts + run: | + mkdir ${{ steps.variables.outputs.artifact-dir }} + cp "${{ steps.variables.outputs.configfile }}" "${{ steps.variables.outputs.artifact-dir }}" + for extension in "hex" "uf2" + do + file="build/zephyr/zmk.$extension" + if [ -f "$file" ] + then + cp "$file" "${{ steps.variables.outputs.artifact-dir }}/${{ steps.variables.outputs.artifact-build-name }}.$extension" + fi + done + - name: Archive artifacts + uses: actions/upload-artifact@v2 + with: + name: ${{ steps.variables.outputs.artifact-generic-name }} + path: ${{ steps.variables.outputs.artifact-dir }} + continue-on-error: true diff --git a/.github/workflows/build-matrix.yml b/.github/workflows/build-matrix.yml new file mode 100644 index 0000000..7320ff5 --- /dev/null +++ b/.github/workflows/build-matrix.yml @@ -0,0 +1,206 @@ +name: 'Build matrix' +on: + - workflow_dispatch +jobs: + build: + runs-on: ubuntu-latest + container: + image: zmkfirmware/zmk-build-arm:2.5 + strategy: + fail-fast: false + matrix: + shield: +# with shield: + # - absolem # out + # - bastyl_left # out + # - bastyl_right # out + # - corne_left # in + # - corne_right # in + # - cradio36_left # TODO + # - cradio36_right # TODO + # - cradio_left # in + # - cradio_right # in + # - cradios_left # TODO + # - cradios_right # TODO + # - cradioz_left # TODO + # - cradioz_right # TODO + # - crbn # in + # - eek # in + # - helix_left # in + # - helix_right # in + # - iris_left # in + # - iris_right # in + # - jian_left # in + # - jian_right # in + # - jorne_left # in + # - jorne_right # in + # - kyria_left # in + # - kyria_right # in + # - lily58_left # in + # - lily58_right # in + # - microdox_left # in + # - microdox_right # in + # - pteron36_left # out + # - pteron36_right # out + # - sofle_left # in + # - sofle_right # in + # - splitreus62_left # in + # - splitreus62_right # in +# without shield: + - "" + board: +# with shield: + # - bluemicro840 + # - nice_nano + # - nice_nano_v2 + # - nrfmicro + # - proton_c +# without shield: + # - ahokore # out + # - corne-ish_zen_left # TODO + # - corne-ish_zen_right # TODO + # - ferris_rev02_left # WIP + # - ferris_rev02_right # WIP + # - planck_rev6 # in + - zaphod # out + alphas: + - "" + # - colemak + # - colemakdhk + # - dvorak + # - halmak + # - workman + # - qwerty + nav: + - "" + # - vi + # - invertedt + clipboard: + - "" + # - fun + # - mac + # - win + layers: + - "" + # - flip + mapping: + - "" + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Process inputs + id: inputs + run: | + echo "::set-output name=board::${{ matrix.board }}" + echo "::set-output name=shield::${{ matrix.shield }}" + echo "::set-output name=alphas::${{ matrix.alphas }}" + echo "::set-output name=nav::${{ matrix.nav }}" + echo "::set-output name=clipboard::${{ matrix.clipboard }}" + echo "::set-output name=layers::${{ matrix.layers }}" + echo "::set-output name=mapping::${{ matrix.mapping }}" + - name: Process variables + id: variables + run: | + keyboard=${{ steps.inputs.outputs.board }} + if [ -n "${{ steps.inputs.outputs.shield }}" ] + then + SHIELD_ARG="-DSHIELD=${{ steps.inputs.outputs.shield }}" + keyboard=${{ steps.inputs.outputs.shield }} + fi + echo "::set-output name=shield-arg::${SHIELD_ARG}" + keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'` + + configfile="${GITHUB_WORKSPACE}/miryoku/config.h" + echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile" + echo "::set-output name=configfile::$configfile" + + artifact_build_name="miryoku_zmk ${{ steps.inputs.outputs.shield }} ${{ steps.inputs.outputs.board }}" + for option in "alphas_${{ steps.inputs.outputs.alphas }}" "nav_${{ steps.inputs.outputs.nav }}" "clipboard_${{ steps.inputs.outputs.clipboard }}" "layers_${{ steps.inputs.outputs.layers }}" "mapping_${{ steps.inputs.outputs.mapping }}" + do + case "$option" in + *_ ) ;; + * ) + artifact_build_name="$artifact_build_name $option" + echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile" + ;; + esac + done + artifact_build_name=`echo $artifact_build_name | tr ' ' '-'` + echo "::set-output name=artifact-build-name::$artifact_build_name" + echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'` + echo "::set-output name=artifact-dir::artifacts" + + manifests="manifests" + manifest="$manifests/west-$keyboard.yml" + if [ ! -f "config/$manifest" ] + then + manifest="west.yml" + fi + echo "::set-output name=manifest::$manifest" + + echo "::set-output name=board-config::board-config" + + env_file="config/board-configs/$keyboard.env" + if [ -f "$env_file" ] + then + cat "$env_file" >> $GITHUB_ENV + echo "::set-output name=has_board_config::true" + fi + - name: Checkout board-config + if: ${{ steps.variables.outputs.has_board_config == 'true' }} + uses: actions/checkout@v2 + with: + repository: ${{ env.board_config_repository }} + ref: ${{ env.board_config_ref }} + path: ${{ steps.variables.outputs.board-config }} + - name: Use board-config + if: ${{ steps.variables.outputs.has_board_config == 'true' }} + run: | + mkdir -p `dirname "config/${{ env.board_config_to }}"` + ln -sr ${{ steps.variables.outputs.board-config }}/${{ env.board_config_from }} config/${{ env.board_config_to }} + if [ -n "${{ env.board_config_manifestdir }}" ] + then + cp ${{ steps.variables.outputs.board-config }}/${{ env.board_config_manifestdir }}/west.yml config/ + cat config/west.yml + fi + - name: Cache west modules + uses: actions/cache@v2 + env: + cache-name: zephyr + with: + path: | + bootloader/ + modules/ + tools/ + zephyr/ + zmk/ + key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('config/{0}', steps.variables.outputs.manifest)) }} + restore-keys: ${{ runner.os }}-${{ env.cache-name }} + timeout-minutes: 2 + continue-on-error: true + - name: Initialize workspace (west init) + run: west init -l config --mf ${{ steps.variables.outputs.manifest }} + - name: Update modules (west update) + run: west update + - name: Export Zephyr CMake package (west zephyr-export) + run: west zephyr-export + - name: Build (west build) + run: west build -s zmk/app -b ${{ steps.inputs.outputs.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config" + - name: Prepare artifacts + run: | + mkdir ${{ steps.variables.outputs.artifact-dir }} + cp "${{ steps.variables.outputs.configfile }}" "${{ steps.variables.outputs.artifact-dir }}" + for extension in "hex" "uf2" + do + file="build/zephyr/zmk.$extension" + if [ -f "$file" ] + then + cp "$file" "${{ steps.variables.outputs.artifact-dir }}/${{ steps.variables.outputs.artifact-build-name }}.$extension" + fi + done + - name: Archive artifacts + uses: actions/upload-artifact@v2 + with: + name: ${{ steps.variables.outputs.artifact-generic-name }} + path: ${{ steps.variables.outputs.artifact-dir }} + continue-on-error: true diff --git a/.github/workflows/build-with-inputs.yml b/.github/workflows/build-with-inputs.yml deleted file mode 100644 index 33a6184..0000000 --- a/.github/workflows/build-with-inputs.yml +++ /dev/null @@ -1,123 +0,0 @@ -name: 'Build with inputs' -on: - workflow_dispatch: - inputs: - board: - description: 'Board' - required: true - default: 'nice_nano' - shield: - description: 'Shield' - required: false - default: 'corne_left' - alphas: - description: 'Miryoku Alphas' - required: false - default: '' - nav: - description: 'Miryoku Nav' - required: false - default: '' - clipboard: - description: 'Miryoku Clipboard' - required: false - default: '' - layers: - description: 'Miryoku Layers' - required: false - default: '' - mapping: - description: 'Miryoku Mapping' - required: false - default: '' -jobs: - build: - runs-on: ubuntu-latest - container: - image: zmkfirmware/zmk-build-arm:2.4 - strategy: - fail-fast: false - steps: - - name: Check inputs - run: | - echo "board: ${{ github.event.inputs.board }}" - echo "shield: ${{ github.event.inputs.shield }}" - echo "alphas: ${{ github.event.inputs.alphas }}" - echo "nav: ${{ github.event.inputs.nav }}" - echo "clipboard: ${{ github.event.inputs.clipboard }}" - echo "layers: ${{ github.event.inputs.layers }}" - echo "mapping: ${{ github.event.inputs.mapping }}" - - name: Checkout - uses: actions/checkout@v2 - - name: Cache west modules - uses: actions/cache@v2 - env: - cache-name: cache-zephyr-modules - with: - path: | - bootloader/ - modules/ - tools/ - zephyr/ - zmk/ - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('config/west.yml') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - 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: Process variables - id: variables - run: | - if [ -n "${{ github.event.inputs.shield }}" ] - then - SHIELD_ARG="-DSHIELD=${{ github.event.inputs.shield }}" - fi - echo "::set-output name=shield-arg::${SHIELD_ARG}" - 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 ${{ github.event.inputs.shield }} ${{ github.event.inputs.board }}" - for option in "alphas_${{ github.event.inputs.alphas }}" "nav_${{ github.event.inputs.nav }}" "clipboard_${{ github.event.inputs.clipboard }}" "layers_${{ github.event.inputs.layers }}" "mapping_${{ github.event.inputs.mapping }}" - do - case "$option" in - *_ ) ;; - * ) - artifact_build_name="$artifact_build_name $option" - echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile" - ;; - esac - done - artifact_build_name=`echo $artifact_build_name | tr ' ' '-'` - echo "::set-output name=artifact-build-name::$artifact_build_name" - echo "::set-output name=artifact-generic-name::$artifact_build_name" - echo "::set-output name=artifact-dir::artifacts" - - name: Build (west build) - run: west build -s zmk/app -b ${{ github.event.inputs.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 - - diff --git a/.github/workflows/build-zaphod-all.yml b/.github/workflows/build-zaphod-all.yml deleted file mode 100644 index 9bc72b9..0000000 --- a/.github/workflows/build-zaphod-all.yml +++ /dev/null @@ -1,117 +0,0 @@ -name: 'Build zaphod with all options' -on: - - workflow_dispatch -jobs: - build: - runs-on: ubuntu-latest - container: - image: zmkfirmware/zmk-build-arm:2.4 - strategy: - fail-fast: false - matrix: - shield: - - "" - board: - - zaphod - alphas: - - "" - # - colemak - # - colemakdhk - # - dvorak - # - halmak - # - workman - # - qwerty - nav: - - "" - # - vi - clipboard: - - "" - # - fun - # - mac - # - win - layers: - - "" - mapping: - - "" - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Checkout zaphod - uses: actions/checkout@v2 - with: - repository: petejohanson/zaphod-config - path: petejohanson-zaphod-config - - name: Add zaphod - run: | - cp petejohanson-zaphod-config/west.yml config/ - ln -s ../petejohanson-zaphod-config/boards config/ - - name: Cache west modules - uses: actions/cache@v2 - env: - cache-name: cache-zephyr-modules - with: - path: | - bootloader/ - modules/ - tools/ - zephyr/ - zmk/ - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('config/west.yml') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - 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: Process matrix - id: variables - run: | - if [ -n "${{ matrix.shield }}" ] - then - SHIELD_ARG="-DSHIELD=${{ matrix.shield }}" - fi - echo "::set-output name=shield-arg::${SHIELD_ARG}" - 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 ${{ matrix.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 - *_ ) ;; - * ) - 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::$artifact_build_name" - echo "::set-output name=artifact-dir::artifacts" - - 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 diff --git a/.github/workflows/test-boards.yml b/.github/workflows/test-boards.yml new file mode 100644 index 0000000..91ed571 --- /dev/null +++ b/.github/workflows/test-boards.yml @@ -0,0 +1,206 @@ +name: 'Test Boards' +on: + - workflow_dispatch +jobs: + build: + runs-on: ubuntu-latest + container: + image: zmkfirmware/zmk-build-arm:2.5 + strategy: + fail-fast: false + matrix: + shield: +# with shield: + # - absolem # out + # - bastyl_left # out + # - bastyl_right # out + # - corne_left # in + # - corne_right # in + # - cradio36_left # TODO + # - cradio36_right # TODO + # - cradio_left # in + # - cradio_right # in + # - cradios_left # TODO + # - cradios_right # TODO + # - cradioz_left # TODO + # - cradioz_right # TODO + # - crbn # in + # - eek # in + # - helix_left # in + # - helix_right # in + # - iris_left # in + # - iris_right # in + # - jian_left # in + # - jian_right # in + # - jorne_left # in + # - jorne_right # in + # - kyria_left # in + # - kyria_right # in + # - lily58_left # in + # - lily58_right # in + # - microdox_left # in + # - microdox_right # in + # - pteron36_left # out + # - pteron36_right # out + # - sofle_left # in + # - sofle_right # in + # - splitreus62_left # in + # - splitreus62_right # in +# without shield: + - "" + board: +# with shield: + # - bluemicro840 + # - nice_nano + # - nice_nano_v2 + # - nrfmicro + # - proton_c +# without shield: + - ahokore # out + # - corne-ish_zen_left # TODO + # - corne-ish_zen_right # TODO + # - ferris_rev02_left # WIP + # - ferris_rev02_right # WIP + - planck_rev6 # in + - zaphod # out + alphas: + - "" + # - colemak + # - colemakdhk + # - dvorak + # - halmak + # - workman + # - qwerty + nav: + - "" + # - vi + # - invertedt + clipboard: + - "" + # - fun + # - mac + # - win + layers: + - "" + # - flip + mapping: + - "" + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Process inputs + id: inputs + run: | + echo "::set-output name=board::${{ matrix.board }}" + echo "::set-output name=shield::${{ matrix.shield }}" + echo "::set-output name=alphas::${{ matrix.alphas }}" + echo "::set-output name=nav::${{ matrix.nav }}" + echo "::set-output name=clipboard::${{ matrix.clipboard }}" + echo "::set-output name=layers::${{ matrix.layers }}" + echo "::set-output name=mapping::${{ matrix.mapping }}" + - name: Process variables + id: variables + run: | + keyboard=${{ steps.inputs.outputs.board }} + if [ -n "${{ steps.inputs.outputs.shield }}" ] + then + SHIELD_ARG="-DSHIELD=${{ steps.inputs.outputs.shield }}" + keyboard=${{ steps.inputs.outputs.shield }} + fi + echo "::set-output name=shield-arg::${SHIELD_ARG}" + keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'` + + configfile="${GITHUB_WORKSPACE}/miryoku/config.h" + echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile" + echo "::set-output name=configfile::$configfile" + + artifact_build_name="miryoku_zmk ${{ steps.inputs.outputs.shield }} ${{ steps.inputs.outputs.board }}" + for option in "alphas_${{ steps.inputs.outputs.alphas }}" "nav_${{ steps.inputs.outputs.nav }}" "clipboard_${{ steps.inputs.outputs.clipboard }}" "layers_${{ steps.inputs.outputs.layers }}" "mapping_${{ steps.inputs.outputs.mapping }}" + do + case "$option" in + *_ ) ;; + * ) + artifact_build_name="$artifact_build_name $option" + echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile" + ;; + esac + done + artifact_build_name=`echo $artifact_build_name | tr ' ' '-'` + echo "::set-output name=artifact-build-name::$artifact_build_name" + echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'` + echo "::set-output name=artifact-dir::artifacts" + + manifests="manifests" + manifest="$manifests/west-$keyboard.yml" + if [ ! -f "config/$manifest" ] + then + manifest="west.yml" + fi + echo "::set-output name=manifest::$manifest" + + echo "::set-output name=board-config::board-config" + + env_file="config/board-configs/$keyboard.env" + if [ -f "$env_file" ] + then + cat "$env_file" >> $GITHUB_ENV + echo "::set-output name=has_board_config::true" + fi + - name: Checkout board-config + if: ${{ steps.variables.outputs.has_board_config == 'true' }} + uses: actions/checkout@v2 + with: + repository: ${{ env.board_config_repository }} + ref: ${{ env.board_config_ref }} + path: ${{ steps.variables.outputs.board-config }} + - name: Use board-config + if: ${{ steps.variables.outputs.has_board_config == 'true' }} + run: | + mkdir -p `dirname "config/${{ env.board_config_to }}"` + ln -sr ${{ steps.variables.outputs.board-config }}/${{ env.board_config_from }} config/${{ env.board_config_to }} + if [ -n "${{ env.board_config_manifestdir }}" ] + then + cp ${{ steps.variables.outputs.board-config }}/${{ env.board_config_manifestdir }}/west.yml config/ + cat config/west.yml + fi + - name: Cache west modules + uses: actions/cache@v2 + env: + cache-name: zephyr + with: + path: | + bootloader/ + modules/ + tools/ + zephyr/ + zmk/ + key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('config/{0}', steps.variables.outputs.manifest)) }} + restore-keys: ${{ runner.os }}-${{ env.cache-name }} + timeout-minutes: 2 + continue-on-error: true + - name: Initialize workspace (west init) + run: west init -l config --mf ${{ steps.variables.outputs.manifest }} + - name: Update modules (west update) + run: west update + - name: Export Zephyr CMake package (west zephyr-export) + run: west zephyr-export + - name: Build (west build) + run: west build -s zmk/app -b ${{ steps.inputs.outputs.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config" + - name: Prepare artifacts + run: | + mkdir ${{ steps.variables.outputs.artifact-dir }} + cp "${{ steps.variables.outputs.configfile }}" "${{ steps.variables.outputs.artifact-dir }}" + for extension in "hex" "uf2" + do + file="build/zephyr/zmk.$extension" + if [ -f "$file" ] + then + cp "$file" "${{ steps.variables.outputs.artifact-dir }}/${{ steps.variables.outputs.artifact-build-name }}.$extension" + fi + done + - name: Archive artifacts + uses: actions/upload-artifact@v2 + with: + name: ${{ steps.variables.outputs.artifact-generic-name }} + path: ${{ steps.variables.outputs.artifact-dir }} + continue-on-error: true diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml new file mode 100644 index 0000000..ec0cf6c --- /dev/null +++ b/.github/workflows/test-build.yml @@ -0,0 +1,211 @@ +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: +# with shield: + # - absolem # out + # - bastyl_left # out + # - bastyl_right # out + - corne_left # in + # - corne_right # in + # - cradio36_left # TODO + # - cradio36_right # TODO + # - cradio_left # in + # - cradio_right # in + # - cradios_left # TODO + # - cradios_right # TODO + # - cradioz_left # TODO + # - cradioz_right # TODO + # - crbn # in + # - eek # in + # - helix_left # in + # - helix_right # in + # - iris_left # in + # - iris_right # in + # - jian_left # in + # - jian_right # in + # - jorne_left # in + # - jorne_right # in + # - kyria_left # in + # - kyria_right # in + # - lily58_left # in + # - lily58_right # in + # - microdox_left # in + # - microdox_right # in + # - pteron36_left # out + # - pteron36_right # out + # - sofle_left # in + # - sofle_right # in + # - splitreus62_left # in + # - splitreus62_right # in +# without shield: + # - "" + board: +# with shield: + # - bluemicro840 + - nice_nano + # - nice_nano_v2 + # - nrfmicro + # - proton_c +# without shield: + # - ahokore # out + # - corne-ish_zen_left # TODO + # - corne-ish_zen_right # TODO + # - ferris_rev02_left # WIP + # - ferris_rev02_right # WIP + # - planck_rev6 # in + # - zaphod # out + alphas: + - "" + # - colemak + # - colemakdhk + # - dvorak + # - halmak + # - workman + # - qwerty + nav: + - "" + # - vi + # - invertedt + clipboard: + - "" + # - fun + # - mac + # - win + layers: + - "" + # - flip + mapping: + - "" + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Process inputs + id: inputs + run: | + echo "::set-output name=board::${{ matrix.board }}" + echo "::set-output name=shield::${{ matrix.shield }}" + echo "::set-output name=alphas::${{ matrix.alphas }}" + echo "::set-output name=nav::${{ matrix.nav }}" + echo "::set-output name=clipboard::${{ matrix.clipboard }}" + echo "::set-output name=layers::${{ matrix.layers }}" + echo "::set-output name=mapping::${{ matrix.mapping }}" + - name: Process variables + id: variables + run: | + keyboard=${{ steps.inputs.outputs.board }} + if [ -n "${{ steps.inputs.outputs.shield }}" ] + then + SHIELD_ARG="-DSHIELD=${{ steps.inputs.outputs.shield }}" + keyboard=${{ steps.inputs.outputs.shield }} + fi + echo "::set-output name=shield-arg::${SHIELD_ARG}" + keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'` + + configfile="${GITHUB_WORKSPACE}/miryoku/config.h" + echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile" + echo "::set-output name=configfile::$configfile" + + artifact_build_name="miryoku_zmk ${{ steps.inputs.outputs.shield }} ${{ steps.inputs.outputs.board }}" + for option in "alphas_${{ steps.inputs.outputs.alphas }}" "nav_${{ steps.inputs.outputs.nav }}" "clipboard_${{ steps.inputs.outputs.clipboard }}" "layers_${{ steps.inputs.outputs.layers }}" "mapping_${{ steps.inputs.outputs.mapping }}" + do + case "$option" in + *_ ) ;; + * ) + artifact_build_name="$artifact_build_name $option" + echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile" + ;; + esac + done + artifact_build_name=`echo $artifact_build_name | tr ' ' '-'` + echo "::set-output name=artifact-build-name::$artifact_build_name" + echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'` + echo "::set-output name=artifact-dir::artifacts" + + manifests="manifests" + manifest="$manifests/west-$keyboard.yml" + if [ ! -f "config/$manifest" ] + then + manifest="west.yml" + fi + echo "::set-output name=manifest::$manifest" + + echo "::set-output name=board-config::board-config" + + env_file="config/board-configs/$keyboard.env" + if [ -f "$env_file" ] + then + cat "$env_file" >> $GITHUB_ENV + echo "::set-output name=has_board_config::true" + fi + - name: Checkout board-config + if: ${{ steps.variables.outputs.has_board_config == 'true' }} + uses: actions/checkout@v2 + with: + repository: ${{ env.board_config_repository }} + ref: ${{ env.board_config_ref }} + path: ${{ steps.variables.outputs.board-config }} + - name: Use board-config + if: ${{ steps.variables.outputs.has_board_config == 'true' }} + run: | + mkdir -p `dirname "config/${{ env.board_config_to }}"` + ln -sr ${{ steps.variables.outputs.board-config }}/${{ env.board_config_from }} config/${{ env.board_config_to }} + if [ -n "${{ env.board_config_manifestdir }}" ] + then + cp ${{ steps.variables.outputs.board-config }}/${{ env.board_config_manifestdir }}/west.yml config/ + cat config/west.yml + fi + - name: Cache west modules + uses: actions/cache@v2 + env: + cache-name: zephyr + with: + path: | + bootloader/ + modules/ + tools/ + zephyr/ + zmk/ + key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('config/{0}', steps.variables.outputs.manifest)) }} + restore-keys: ${{ runner.os }}-${{ env.cache-name }} + timeout-minutes: 2 + continue-on-error: true + - name: Initialize workspace (west init) + run: west init -l config --mf ${{ steps.variables.outputs.manifest }} + - name: Update modules (west update) + run: west update + - name: Export Zephyr CMake package (west zephyr-export) + run: west zephyr-export + - name: Build (west build) + run: west build -s zmk/app -b ${{ steps.inputs.outputs.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config" + - name: Prepare artifacts + run: | + mkdir ${{ steps.variables.outputs.artifact-dir }} + cp "${{ steps.variables.outputs.configfile }}" "${{ steps.variables.outputs.artifact-dir }}" + for extension in "hex" "uf2" + do + file="build/zephyr/zmk.$extension" + if [ -f "$file" ] + then + cp "$file" "${{ steps.variables.outputs.artifact-dir }}/${{ steps.variables.outputs.artifact-build-name }}.$extension" + fi + done + - name: Archive artifacts + uses: actions/upload-artifact@v2 + with: + name: ${{ steps.variables.outputs.artifact-generic-name }} + path: ${{ steps.variables.outputs.artifact-dir }} + continue-on-error: true diff --git a/.github/workflows/test-configs.yml b/.github/workflows/test-configs.yml new file mode 100644 index 0000000..b613d21 --- /dev/null +++ b/.github/workflows/test-configs.yml @@ -0,0 +1,206 @@ +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: +# with shield: + # - absolem # out + # - bastyl_left # out + # - bastyl_right # out + - corne_left # in + # - corne_right # in + # - cradio36_left # TODO + # - cradio36_right # TODO + # - cradio_left # in + # - cradio_right # in + # - cradios_left # TODO + # - cradios_right # TODO + # - cradioz_left # TODO + # - cradioz_right # TODO + # - crbn # in + # - eek # in + # - helix_left # in + # - helix_right # in + # - iris_left # in + # - iris_right # in + # - jian_left # in + # - jian_right # in + # - jorne_left # in + # - jorne_right # in + # - kyria_left # in + # - kyria_right # in + # - lily58_left # in + # - lily58_right # in + # - microdox_left # in + # - microdox_right # in + # - pteron36_left # out + # - pteron36_right # out + # - sofle_left # in + # - sofle_right # in + # - splitreus62_left # in + # - splitreus62_right # in +# without shield: + # - "" + board: +# with shield: + # - bluemicro840 + - nice_nano + # - nice_nano_v2 + # - nrfmicro + # - proton_c +# without shield: + # - ahokore # out + # - corne-ish_zen_left # TODO + # - corne-ish_zen_right # TODO + # - ferris_rev02_left # WIP + # - ferris_rev02_right # WIP + # - planck_rev6 # in + # - zaphod # out + alphas: + - "" + - colemak + - colemakdhk + - dvorak + - halmak + - workman + - qwerty + nav: + - "" + - vi + - invertedt + clipboard: + - "" + - fun + - mac + - win + layers: + - "" + # - flip + mapping: + - "" + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Process inputs + id: inputs + run: | + echo "::set-output name=board::${{ matrix.board }}" + echo "::set-output name=shield::${{ matrix.shield }}" + echo "::set-output name=alphas::${{ matrix.alphas }}" + echo "::set-output name=nav::${{ matrix.nav }}" + echo "::set-output name=clipboard::${{ matrix.clipboard }}" + echo "::set-output name=layers::${{ matrix.layers }}" + echo "::set-output name=mapping::${{ matrix.mapping }}" + - name: Process variables + id: variables + run: | + keyboard=${{ steps.inputs.outputs.board }} + if [ -n "${{ steps.inputs.outputs.shield }}" ] + then + SHIELD_ARG="-DSHIELD=${{ steps.inputs.outputs.shield }}" + keyboard=${{ steps.inputs.outputs.shield }} + fi + echo "::set-output name=shield-arg::${SHIELD_ARG}" + keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'` + + configfile="${GITHUB_WORKSPACE}/miryoku/config.h" + echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile" + echo "::set-output name=configfile::$configfile" + + artifact_build_name="miryoku_zmk ${{ steps.inputs.outputs.shield }} ${{ steps.inputs.outputs.board }}" + for option in "alphas_${{ steps.inputs.outputs.alphas }}" "nav_${{ steps.inputs.outputs.nav }}" "clipboard_${{ steps.inputs.outputs.clipboard }}" "layers_${{ steps.inputs.outputs.layers }}" "mapping_${{ steps.inputs.outputs.mapping }}" + do + case "$option" in + *_ ) ;; + * ) + artifact_build_name="$artifact_build_name $option" + echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile" + ;; + esac + done + artifact_build_name=`echo $artifact_build_name | tr ' ' '-'` + echo "::set-output name=artifact-build-name::$artifact_build_name" + echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'` + echo "::set-output name=artifact-dir::artifacts" + + manifests="manifests" + manifest="$manifests/west-$keyboard.yml" + if [ ! -f "config/$manifest" ] + then + manifest="west.yml" + fi + echo "::set-output name=manifest::$manifest" + + echo "::set-output name=board-config::board-config" + + env_file="config/board-configs/$keyboard.env" + if [ -f "$env_file" ] + then + cat "$env_file" >> $GITHUB_ENV + echo "::set-output name=has_board_config::true" + fi + - name: Checkout board-config + if: ${{ steps.variables.outputs.has_board_config == 'true' }} + uses: actions/checkout@v2 + with: + repository: ${{ env.board_config_repository }} + ref: ${{ env.board_config_ref }} + path: ${{ steps.variables.outputs.board-config }} + - name: Use board-config + if: ${{ steps.variables.outputs.has_board_config == 'true' }} + run: | + mkdir -p `dirname "config/${{ env.board_config_to }}"` + ln -sr ${{ steps.variables.outputs.board-config }}/${{ env.board_config_from }} config/${{ env.board_config_to }} + if [ -n "${{ env.board_config_manifestdir }}" ] + then + cp ${{ steps.variables.outputs.board-config }}/${{ env.board_config_manifestdir }}/west.yml config/ + cat config/west.yml + fi + - name: Cache west modules + uses: actions/cache@v2 + env: + cache-name: zephyr + with: + path: | + bootloader/ + modules/ + tools/ + zephyr/ + zmk/ + key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('config/{0}', steps.variables.outputs.manifest)) }} + restore-keys: ${{ runner.os }}-${{ env.cache-name }} + timeout-minutes: 2 + continue-on-error: true + - name: Initialize workspace (west init) + run: west init -l config --mf ${{ steps.variables.outputs.manifest }} + - name: Update modules (west update) + run: west update + - name: Export Zephyr CMake package (west zephyr-export) + run: west zephyr-export + - name: Build (west build) + run: west build -s zmk/app -b ${{ steps.inputs.outputs.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config" + - name: Prepare artifacts + run: | + mkdir ${{ steps.variables.outputs.artifact-dir }} + cp "${{ steps.variables.outputs.configfile }}" "${{ steps.variables.outputs.artifact-dir }}" + for extension in "hex" "uf2" + do + file="build/zephyr/zmk.$extension" + if [ -f "$file" ] + then + cp "$file" "${{ steps.variables.outputs.artifact-dir }}/${{ steps.variables.outputs.artifact-build-name }}.$extension" + fi + done + - name: Archive artifacts + uses: actions/upload-artifact@v2 + with: + name: ${{ steps.variables.outputs.artifact-generic-name }} + path: ${{ steps.variables.outputs.artifact-dir }} + continue-on-error: true diff --git a/.github/workflows/test-shields.yml b/.github/workflows/test-shields.yml new file mode 100644 index 0000000..af750ff --- /dev/null +++ b/.github/workflows/test-shields.yml @@ -0,0 +1,206 @@ +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: +# with shield: + - absolem # out + - bastyl_left # out + - bastyl_right # out + - corne_left # in + - corne_right # in + # - cradio36_left # TODO + # - cradio36_right # TODO + - cradio_left # in + - cradio_right # in + # - cradios_left # TODO + # - cradios_right # TODO + # - cradioz_left # TODO + # - cradioz_right # TODO + - crbn # in + - eek # in + - helix_left # in + - helix_right # in + - iris_left # in + - iris_right # in + - jian_left # in + - jian_right # in + - jorne_left # in + - jorne_right # in + - kyria_left # in + - kyria_right # in + - lily58_left # in + - lily58_right # in + - microdox_left # in + - microdox_right # in + - pteron36_left # out + - pteron36_right # out + - sofle_left # in + - sofle_right # in + - splitreus62_left # in + - splitreus62_right # in +# without shield: + # - "" + board: +# with shield: + # - bluemicro840 + - nice_nano + # - nice_nano_v2 + # - nrfmicro + # - proton_c +# without shield: + # - ahokore # out + # - corne-ish_zen_left # TODO + # - corne-ish_zen_right # TODO + # - ferris_rev02_left # WIP + # - ferris_rev02_right # WIP + # - planck_rev6 # in + # - zaphod # out + alphas: + - "" + # - colemak + # - colemakdhk + # - dvorak + # - halmak + # - workman + # - qwerty + nav: + - "" + # - vi + # - invertedt + clipboard: + - "" + # - fun + # - mac + # - win + layers: + - "" + # - flip + mapping: + - "" + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Process inputs + id: inputs + run: | + echo "::set-output name=board::${{ matrix.board }}" + echo "::set-output name=shield::${{ matrix.shield }}" + echo "::set-output name=alphas::${{ matrix.alphas }}" + echo "::set-output name=nav::${{ matrix.nav }}" + echo "::set-output name=clipboard::${{ matrix.clipboard }}" + echo "::set-output name=layers::${{ matrix.layers }}" + echo "::set-output name=mapping::${{ matrix.mapping }}" + - name: Process variables + id: variables + run: | + keyboard=${{ steps.inputs.outputs.board }} + if [ -n "${{ steps.inputs.outputs.shield }}" ] + then + SHIELD_ARG="-DSHIELD=${{ steps.inputs.outputs.shield }}" + keyboard=${{ steps.inputs.outputs.shield }} + fi + echo "::set-output name=shield-arg::${SHIELD_ARG}" + keyboard=`echo "$keyboard" | sed 's/_\(left\|right\)//'` + + configfile="${GITHUB_WORKSPACE}/miryoku/config.h" + echo '// https://github.com/manna-harbour/miryoku-zmk/' > "$configfile" + echo "::set-output name=configfile::$configfile" + + artifact_build_name="miryoku_zmk ${{ steps.inputs.outputs.shield }} ${{ steps.inputs.outputs.board }}" + for option in "alphas_${{ steps.inputs.outputs.alphas }}" "nav_${{ steps.inputs.outputs.nav }}" "clipboard_${{ steps.inputs.outputs.clipboard }}" "layers_${{ steps.inputs.outputs.layers }}" "mapping_${{ steps.inputs.outputs.mapping }}" + do + case "$option" in + *_ ) ;; + * ) + artifact_build_name="$artifact_build_name $option" + echo "#define MIRYOKU_"`echo "$option" | tr 'a-z' 'A-Z'` >> "$configfile" + ;; + esac + done + artifact_build_name=`echo $artifact_build_name | tr ' ' '-'` + echo "::set-output name=artifact-build-name::$artifact_build_name" + echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'` + echo "::set-output name=artifact-dir::artifacts" + + manifests="manifests" + manifest="$manifests/west-$keyboard.yml" + if [ ! -f "config/$manifest" ] + then + manifest="west.yml" + fi + echo "::set-output name=manifest::$manifest" + + echo "::set-output name=board-config::board-config" + + env_file="config/board-configs/$keyboard.env" + if [ -f "$env_file" ] + then + cat "$env_file" >> $GITHUB_ENV + echo "::set-output name=has_board_config::true" + fi + - name: Checkout board-config + if: ${{ steps.variables.outputs.has_board_config == 'true' }} + uses: actions/checkout@v2 + with: + repository: ${{ env.board_config_repository }} + ref: ${{ env.board_config_ref }} + path: ${{ steps.variables.outputs.board-config }} + - name: Use board-config + if: ${{ steps.variables.outputs.has_board_config == 'true' }} + run: | + mkdir -p `dirname "config/${{ env.board_config_to }}"` + ln -sr ${{ steps.variables.outputs.board-config }}/${{ env.board_config_from }} config/${{ env.board_config_to }} + if [ -n "${{ env.board_config_manifestdir }}" ] + then + cp ${{ steps.variables.outputs.board-config }}/${{ env.board_config_manifestdir }}/west.yml config/ + cat config/west.yml + fi + - name: Cache west modules + uses: actions/cache@v2 + env: + cache-name: zephyr + with: + path: | + bootloader/ + modules/ + tools/ + zephyr/ + zmk/ + key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('config/{0}', steps.variables.outputs.manifest)) }} + restore-keys: ${{ runner.os }}-${{ env.cache-name }} + timeout-minutes: 2 + continue-on-error: true + - name: Initialize workspace (west init) + run: west init -l config --mf ${{ steps.variables.outputs.manifest }} + - name: Update modules (west update) + run: west update + - name: Export Zephyr CMake package (west zephyr-export) + run: west zephyr-export + - name: Build (west build) + run: west build -s zmk/app -b ${{ steps.inputs.outputs.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config" + - name: Prepare artifacts + run: | + mkdir ${{ steps.variables.outputs.artifact-dir }} + cp "${{ steps.variables.outputs.configfile }}" "${{ steps.variables.outputs.artifact-dir }}" + for extension in "hex" "uf2" + do + file="build/zephyr/zmk.$extension" + if [ -f "$file" ] + then + cp "$file" "${{ steps.variables.outputs.artifact-dir }}/${{ steps.variables.outputs.artifact-build-name }}.$extension" + fi + done + - name: Archive artifacts + uses: actions/upload-artifact@v2 + with: + name: ${{ steps.variables.outputs.artifact-generic-name }} + path: ${{ steps.variables.outputs.artifact-dir }} + continue-on-error: true diff --git a/config/bastyl.keymap b/config/bastyl.keymap new file mode 100644 index 0000000..3018d98 --- /dev/null +++ b/config/bastyl.keymap @@ -0,0 +1,6 @@ +// https://github.com/manna-harbour/miryoku-zmk/ + +#define MIRYOKU_COMBO_TPS_ENABLE + +#include "../miryoku/mapping/42-corne.h" +#include "../miryoku/miryoku.dtsi" diff --git a/config/board-configs/absolem.env b/config/board-configs/absolem.env new file mode 100644 index 0000000..9234069 --- /dev/null +++ b/config/board-configs/absolem.env @@ -0,0 +1,5 @@ +board_config_repository=mrzealot/zmk-config +board_config_ref=master +board_config_from=/ +board_config_to=boards/shields/absolem + diff --git a/config/board-configs/ahokore.env b/config/board-configs/ahokore.env new file mode 100644 index 0000000..b8fe18b --- /dev/null +++ b/config/board-configs/ahokore.env @@ -0,0 +1,4 @@ +board_config_repository=dezlidezlidezli/ahokore-zmk-config +board_config_ref=master +board_config_from=config/boards +board_config_to=boards diff --git a/config/board-configs/bastyl.env b/config/board-configs/bastyl.env new file mode 100644 index 0000000..00d9fb5 --- /dev/null +++ b/config/board-configs/bastyl.env @@ -0,0 +1,5 @@ +board_config_repository=mseflek/zmk +board_config_ref=main +board_config_from=app/boards +board_config_to=boards + diff --git a/config/board-configs/ferris_rev02.env b/config/board-configs/ferris_rev02.env new file mode 100644 index 0000000..d12b95f --- /dev/null +++ b/config/board-configs/ferris_rev02.env @@ -0,0 +1,4 @@ +board_config_repository=petejohanson/zmk +board_config_ref=boards/ferris-02-bling-basics +board_config_from=app/boards +board_config_to=boards diff --git a/config/board-configs/pteron36.env b/config/board-configs/pteron36.env new file mode 100644 index 0000000..82c8434 --- /dev/null +++ b/config/board-configs/pteron36.env @@ -0,0 +1,4 @@ +board_config_repository=harshitgoel96/zmk +board_config_ref=pteron36 +board_config_from=app/boards +board_config_to=boards diff --git a/config/board-configs/zaphod.env b/config/board-configs/zaphod.env new file mode 100644 index 0000000..efd032a --- /dev/null +++ b/config/board-configs/zaphod.env @@ -0,0 +1,5 @@ +board_config_repository=petejohanson/zaphod-config +board_config_ref=main +board_config_from=boards +board_config_to=boards +board_config_manifestdir=. diff --git a/config/ferris.keymap b/config/ferris_rev02.keymap similarity index 100% rename from config/ferris.keymap rename to config/ferris_rev02.keymap diff --git a/config/west-corneishzen.yml b/config/manifests/west-corneishzen.yml similarity index 100% rename from config/west-corneishzen.yml rename to config/manifests/west-corneishzen.yml diff --git a/config/west-ahokore.yml b/config/west-ahokore.yml deleted file mode 100644 index a45cc91..0000000 --- a/config/west-ahokore.yml +++ /dev/null @@ -1,13 +0,0 @@ -manifest: - remotes: - - name: zmkfirmware - url-base: https://github.com/zmkfirmware - - name: dezlidezlidezli - url-base: https://github.com/dezlidezlidezli - projects: - - name: zmk - remote: dezlidezlidezli - revision: ahokorev2 - import: app/west.yml - self: - path: config diff --git a/readme.org b/readme.org index d54d31e..5b4183a 100644 --- a/readme.org +++ b/readme.org @@ -37,6 +37,7 @@ Clone this repo and use for [[https://zmk.dev/docs/development/build-flash#build ** GitHub Actions Workflows +Some out of tree boards and shields are automatically supported in the included workflows. See [[./config/board-configs/]]. *** Prebuilt Firmware @@ -45,12 +46,12 @@ Some prebuilt firmware can be downloaded from the repo. Log in to GitHub, visit *** Inputs -Fork this repo, select the [[https://github.com/manna-harbour/zmk-config/actions/workflows/build-with-inputs.yml][Build with 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. *** Customise Workflow Files -Fork this repo and edit the included workflow files with [[#Supported-Keyboards][supported keyboards]] and [[#configuration-options][configuration options]]. +Fork this repo, copy, and edit the included [[https://github.com/manna-harbour/zmk-config/actions/workflows/build-matrix.yml][Build Matrix]] workflow files with [[#Supported-Keyboards][supported keyboards]] and [[#configuration-options][configuration options]]. * Miryoku Keymap