diff --git a/.github/actions/checkout-qmk_firmware/action.yml b/.github/actions/checkout-qmk_firmware/action.yml new file mode 100644 index 000000000..4eb816b1a --- /dev/null +++ b/.github/actions/checkout-qmk_firmware/action.yml @@ -0,0 +1,27 @@ +name: 'Checkout QMK firmware' + +inputs: + version: + default: '0.22.3' + type: string + required: false + path: + default: '__qmk__' + type: string + required: false + +runs: + using: 'composite' + steps: + + - name: Checkout qmk_firmware + uses: actions/checkout@v4 + with: + path: ${{ inputs.path }} + repository: qmk/qmk_firmware + submodules: recursive + ref: ${{ inputs.version }} + + - name: Setup QMK + shell: bash + run: qmk setup --home ${{ inputs.path }} --yes diff --git a/.github/actions/release-archive/action.yml b/.github/actions/release-archive/action.yml new file mode 100644 index 000000000..dd10f7aab --- /dev/null +++ b/.github/actions/release-archive/action.yml @@ -0,0 +1,30 @@ +name: Relase archive + +inputs: + name: + type: string + required: true + version: + default: ${{ github.ref_name }} + type: string + required: false + +runs: + using: 'composite' + steps: + + - name: Download artifact + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.name }}-firmwares + + - name: Archive firmwares + shell: bash + run: | + zip -9 ${{ inputs.name }}-${{ inputs.version }}.zip keyball_${{ inputs.name }}_*.hex README.md + # Add README.md if available + if [ -f ${{ inputs.name }}/doc/firmware_README.md ] ; then + cp ${{ inputs.name }}/doc/firmware_README.md README.md + zip -9 ${{ inputs.name }}-${{ inputs.version }}.zip README.md + rm -f README.md + fi diff --git a/.github/actions/setup-qmk/action.yml b/.github/actions/setup-qmk/action.yml index d45e10645..1d1bb9371 100644 --- a/.github/actions/setup-qmk/action.yml +++ b/.github/actions/setup-qmk/action.yml @@ -9,26 +9,40 @@ inputs: default: '__qmk__' type: string required: false + avrgcc_version: + default: '8.3.0' + type: string + required: false runs: using: 'composite' steps: - - name: Checkout qmk_firmware - uses: actions/checkout@v3 - with: - path: ${{ inputs.path }} - repository: qmk/qmk_firmware - submodules: recursive - ref: ${{ inputs.version }} - name: Install git and pip shell: bash - run: sudo apt-get install -y git python3-pip + run: sudo apt-get install -y git python3-pip libfl2 - name: Install QMK CLI shell: bash run: python3 -m pip install --user qmk + - name: Checkout qmk_firmware + uses: actions/checkout@v4 + with: + path: ${{ inputs.path }} + repository: qmk/qmk_firmware + submodules: recursive + ref: ${{ inputs.version }} + - name: Setup QMK shell: bash run: qmk setup --home ${{ inputs.path }} --yes + + - name: Install newer gcc-avr + shell: bash + run: | + # use https://github.com/ZakKemble/avr-gcc-build instead of default + wget -q --show-progress --progress=bar:force https://github.com/ZakKemble/avr-gcc-build/releases/download/v${{ inputs.avrgcc_version }}-1/avr-gcc-${{ inputs.avrgcc_version }}-x64-linux.tar.bz2 -O /tmp/avrgcc.tar.bz2 + sudo tar xjf /tmp/avrgcc.tar.bz2 --strip-components=1 -C /usr/ + rm -f /tmp/avrgcc.tar.bz2 + avr-gcc --version diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..d44d4f622 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,88 @@ +name: Build all firmwares + +on: + push: + paths: + - 'qmk_firmware/keyboards/keyball/**.c' + - 'qmk_firmware/keyboards/keyball/**.h' + - 'qmk_firmware/keyboards/keyball/**.json' + - '.github/actions/setup-qmk/**.yml' + - '.github/workflows/build*.yml' + tags-ignore: + - '*' + branches: + - '*' + workflow_call: {} + +jobs: + + build: + + strategy: + matrix: + keyboard: [ keyball39, keyball44, keyball61, keyball46, one47 ] + keymap: [ test, default, via ] + include: + - keyboard: keyball46 + keymap: test_Left + - keyboard: keyball46 + keymap: test_Both + - keyboard: keyball46 + keymap: via_Left + - keyboard: keyball46 + keymap: via_Both + + name: Build ${{ matrix.keyboard }} w/ ${{ matrix.keymap }} + + runs-on: ubuntu-latest + container: + image: ghcr.io/qmk/qmk_cli:latest + + steps: + + - name: Checkout source + uses: actions/checkout@v4 + + - name: Checkout qmk_firmware + uses: ./.github/actions/checkout-qmk_firmware + + - name: Install a link to own source + run: ln -s $(pwd)/qmk_firmware/keyboards/keyball __qmk__/keyboards/keyball + + - run: qmk compile -j 4 -kb keyball/${{ matrix.keyboard }} -km ${{ matrix.keymap }} + + - name: Archive firmwares + uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.keyboard }}-firmwares + path: __qmk__/*.hex + + check-size: + name: Check size + runs-on: ubuntu-latest + needs: + - build + + steps: + + - uses: actions/download-artifact@v3 + with: { name: keyball39-firmwares } + + - uses: actions/download-artifact@v3 + with: { name: keyball44-firmwares } + + - uses: actions/download-artifact@v3 + with: { name: keyball61-firmwares } + + - uses: actions/download-artifact@v3 + with: { name: keyball46-firmwares } + + - uses: actions/download-artifact@v3 + with: { name: one47-firmwares } + + - name: List size of firmwares + run: | + for f in *.hex ; do + cut -c 2,3 $f | awk '{s+=strtonum("0x" $1)}END{printf "%5d/28672 (%2d%%, %5d bytes free) ",s,s*100/28672,28672-s}' + echo $f + done diff --git a/.github/workflows/keyball39.yml b/.github/workflows/keyball39.yml deleted file mode 100644 index 9ac118177..000000000 --- a/.github/workflows/keyball39.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Keyball39 firmware - -on: - push: - branches: - - '*' - tags: - - 'keyball39/v[0-9]+.[0-9]+.[0-9]+*' - pull_request: - -jobs: - - build: - name: Build - runs-on: ubuntu-latest - - steps: - - name: Checkout source - uses: actions/checkout@v3 - - - name: Setup QMK firmware - uses: ./.github/actions/setup-qmk - - - name: Install a link to own source - run: ln -s $(pwd)/qmk_firmware/keyboards/keyball __qmk__/keyboards/keyball - - - run: qmk compile -j 4 -kb keyball/keyball39 -km default - - - run: qmk compile -j 4 -kb keyball/keyball39 -km test - - - run: qmk compile -j 4 -kb keyball/keyball39 -km via - - - name: Archive firmwares - uses: actions/upload-artifact@v3 - with: - name: keyball39-firmwares - path: __qmk__/*.hex - - release: - name: Release - runs-on: ubuntu-latest - needs: [ build ] - if: github.ref_type == 'tag' && startsWith(github.ref_name, 'keyball39/v') - - steps: - - name: Download built firmwares - uses: actions/download-artifact@v3 - with: - name: keyball39-firmwares - - name: List assets - run: ls -l *.hex - - name: Release - uses: softprops/action-gh-release@v1 - with: - draft: true - prerelease: ${{ contains(github.ref_name, '-alpha.') || contains(github.ref_name, '-beta.') }} - files: | - *.hex - fail_on_unmatched_files: true - generate_release_notes: true - append_body: true diff --git a/.github/workflows/keyball44.yml b/.github/workflows/keyball44.yml deleted file mode 100644 index 5a130f5c1..000000000 --- a/.github/workflows/keyball44.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Keyball44 firmware - -on: - push: - branches: - - '*' - tags: - - 'keyball44/v[0-9]+.[0-9]+.[0-9]+*' - pull_request: - -jobs: - - build: - name: Build - runs-on: ubuntu-latest - - steps: - - name: Checkout source - uses: actions/checkout@v3 - - - name: Setup QMK firmware - uses: ./.github/actions/setup-qmk - - - name: Install a link to own source - run: ln -s $(pwd)/qmk_firmware/keyboards/keyball __qmk__/keyboards/keyball - - - run: qmk compile -j 4 -kb keyball/keyball44 -km default - - - run: qmk compile -j 4 -kb keyball/keyball44 -km test - - - run: qmk compile -j 4 -kb keyball/keyball44 -km via - - - name: Archive firmwares - uses: actions/upload-artifact@v3 - with: - name: keyball44-firmwares - path: __qmk__/*.hex - - release: - name: Release - runs-on: ubuntu-latest - needs: [ build ] - if: github.ref_type == 'tag' && startsWith(github.ref_name, 'keyball44/v') - - steps: - - name: Download built firmwares - uses: actions/download-artifact@v3 - with: - name: keyball44-firmwares - - name: List assets - run: ls -l *.hex - - name: Release - uses: softprops/action-gh-release@v1 - with: - draft: true - prerelease: ${{ contains(github.ref_name, '-alpha.') || contains(github.ref_name, '-beta.') }} - files: | - *.hex - fail_on_unmatched_files: true - generate_release_notes: true - append_body: true diff --git a/.github/workflows/keyball46.yml b/.github/workflows/keyball46.yml deleted file mode 100644 index 478afdf55..000000000 --- a/.github/workflows/keyball46.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: Keyball46 firmware - -on: - push: - branches: - - '*' - tags: - - 'keyball46/v[0-9]+.[0-9]+.[0-9]+*' - pull_request: - -jobs: - - build: - name: Build - runs-on: ubuntu-latest - - steps: - - name: Checkout source - uses: actions/checkout@v3 - - - name: Setup QMK firmware - uses: ./.github/actions/setup-qmk - - - name: Install a link to own source - run: ln -s $(pwd)/qmk_firmware/keyboards/keyball __qmk__/keyboards/keyball - - - run: qmk compile -j 4 -kb keyball/keyball46 -km default - - - run: qmk compile -j 4 -kb keyball/keyball46 -km test - - run: qmk compile -j 4 -kb keyball/keyball46 -km test_Left - - run: qmk compile -j 4 -kb keyball/keyball46 -km test_Both - - - run: qmk compile -j 4 -kb keyball/keyball46 -km via - - run: qmk compile -j 4 -kb keyball/keyball46 -km via_Left - - run: qmk compile -j 4 -kb keyball/keyball46 -km via_Both - - - name: Archive firmwares - uses: actions/upload-artifact@v3 - with: - name: keyball46-firmwares - path: __qmk__/*.hex - - release: - name: Release - runs-on: ubuntu-latest - needs: [ build ] - if: github.ref_type == 'tag' && startsWith(github.ref_name, 'keyball46/v') - - steps: - - name: Download built firmwares - uses: actions/download-artifact@v3 - with: - name: keyball46-firmwares - - name: List assets - run: ls -l *.hex - - name: Release - uses: softprops/action-gh-release@v1 - with: - draft: true - prerelease: ${{ contains(github.ref_name, '-alpha.') || contains(github.ref_name, '-beta.') }} - files: | - *.hex - fail_on_unmatched_files: true - generate_release_notes: true - append_body: true diff --git a/.github/workflows/keyball61.yml b/.github/workflows/keyball61.yml deleted file mode 100644 index 57fe68cef..000000000 --- a/.github/workflows/keyball61.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Keyball61 firmware - -on: - push: - branches: - - '*' - tags: - - 'keyball61/v[0-9]+.[0-9]+.[0-9]+*' - pull_request: - -jobs: - - build: - name: Build - runs-on: ubuntu-latest - - steps: - - name: Checkout source - uses: actions/checkout@v3 - - - name: Setup QMK firmware - uses: ./.github/actions/setup-qmk - - - name: Install a link to own source - run: ln -s $(pwd)/qmk_firmware/keyboards/keyball __qmk__/keyboards/keyball - - - run: qmk compile -j 4 -kb keyball/keyball61 -km default - - - run: qmk compile -j 4 -kb keyball/keyball61 -km test - - - run: qmk compile -j 4 -kb keyball/keyball61 -km via - - - name: Archive firmwares - uses: actions/upload-artifact@v3 - with: - name: keyball61-firmwares - path: __qmk__/*.hex - - release: - name: Release - runs-on: ubuntu-latest - needs: [ build ] - if: github.ref_type == 'tag' && startsWith(github.ref_name, 'keyball61/v') - - steps: - - name: Download built firmwares - uses: actions/download-artifact@v3 - with: - name: keyball61-firmwares - - name: List assets - run: ls -l *.hex - - name: Release - uses: softprops/action-gh-release@v1 - with: - draft: true - prerelease: ${{ contains(github.ref_name, '-alpha.') || contains(github.ref_name, '-beta.') }} - files: | - *.hex - fail_on_unmatched_files: true - generate_release_notes: true - append_body: true diff --git a/.github/workflows/one47.yml b/.github/workflows/one47.yml deleted file mode 100644 index ec3196a24..000000000 --- a/.github/workflows/one47.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: KeyballONE47 firmware - -on: - push: - branches: - - '*' - tags: - - 'one47/v[0-9]+.[0-9]+.[0-9]+*' - pull_request: - -jobs: - - build: - name: Build - runs-on: ubuntu-latest - - steps: - - name: Checkout source - uses: actions/checkout@v3 - - - name: Setup QMK firmware - uses: ./.github/actions/setup-qmk - - - name: Install a link to own source - run: ln -s $(pwd)/qmk_firmware/keyboards/keyball __qmk__/keyboards/keyball - - - run: qmk compile -j 4 -kb keyball/one47 -km default - - - run: qmk compile -j 4 -kb keyball/one47 -km test - - - run: qmk compile -j 4 -kb keyball/one47 -km via - - - name: Archive firmwares - uses: actions/upload-artifact@v3 - with: - name: one47-firmwares - path: __qmk__/*.hex - - release: - name: Release - runs-on: ubuntu-latest - needs: [ build ] - if: github.ref_type == 'tag' && startsWith(github.ref_name, 'one47/v') - - steps: - - name: Download built firmwares - uses: actions/download-artifact@v3 - with: - name: one47-firmwares - - name: List assets - run: ls -l *.hex - - name: Release - uses: softprops/action-gh-release@v1 - with: - draft: true - prerelease: ${{ contains(github.ref_name, '-alpha.') || contains(github.ref_name, '-beta.') }} - files: | - *.hex - fail_on_unmatched_files: true - generate_release_notes: true - append_body: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..e191bd3e1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,57 @@ +name: Release firmwares + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+*' + +jobs: + + build: + name: Build firmwares + uses: ./.github/workflows/build.yml + + deploy: + name: Deploy firmwares + runs-on: ubuntu-latest + needs: + - build + + steps: + + - name: Checkout source + uses: actions/checkout@v4 + + - name: Archive Keyball39 firmwares + uses: ./.github/actions/release-archive + with: { name: keyball39 } + + - name: Archive Keyball44 firmwares + uses: ./.github/actions/release-archive + with: { name: keyball44 } + + - name: Archive Keyball61 firmwares + uses: ./.github/actions/release-archive + with: { name: keyball61 } + + - name: Archive Keyball46 firmwares + uses: ./.github/actions/release-archive + with: { name: keyball46 } + + - name: Archive One47 firmwares + uses: ./.github/actions/release-archive + with: { name: one47 } + + - name: List archives + run: ls -l *.zip + + - name: Release + uses: softprops/action-gh-release@v1 + with: + draft: true + prerelease: ${{ contains(github.ref_name, '-alpha.') || contains(github.ref_name, '-beta.') }} + files: | + *.zip + fail_on_unmatched_files: true + generate_release_notes: true + append_body: true diff --git a/keyball39/doc/firmware_README.md b/keyball39/doc/firmware_README.md new file mode 100644 index 000000000..1689d8204 --- /dev/null +++ b/keyball39/doc/firmware_README.md @@ -0,0 +1,52 @@ +# Keyball39 firmwares README + +## Description in English + +This archive includes firmwares for Keyball39. + +Included variations of firmware are below: + +* `default` - base version for customization +* `test` - used for testing during assembly +* `via` - Recommended version that can use [Remap][remap] + +The recommended usage of these firmwares is: + +1. Please use `test` version during assemble the keyboard. + It is designed to help verifying that the soldering of diodes and switch + sockets is correct, and easy to check the operation of RGB LED. +2. After confirming the operation, rewrite it with `via` version. + +## 日本語の説明 + +このアーカイブには Keyball39 のファームウェアが含まれています。 + +含まれているファームウェアのバリエーションは以下の通りです: + +* `default` - カスタマイズの基礎となる版 +* `test` - 組立時のテストに用いる版 +* `via` - [Remap][remap] で利用できる、推奨版 + +推奨する使い方は次の通りです: + +1. キーボードを組み立てる際は `test` を使ってください。 + ダイオードやスイッチソケットのハンダ付けが正しいか確認できる他、 + RGB LEDの動作確認が容易になるように構成してあります。 +2. 動作確認が取れたあとは `via` に書き換えて利用してください。 + +## Fixed keymap for `test` + +This keymap does not use any layers or QMK function keys to make it easier to test. + +``` +KC_Q KC_W KC_E KC_R KC_T KC_Y KC_U KC_I KC_O KC_P +KC_A KC_S KC_D KC_F KC_G KC_H KC_J KC_K KC_L KC_SCLN +KC_Z KC_X KC_C KC_V KC_B KC_N KC_M KC_COMM KC_DOT KC_SLSH +KC_LCTL (KC_LGUI KC_LALT KC_ESC) KC_SPC KC_TAB KC_BSPC KC_ENT (KC_ESC KC_RALT KC_RGUI) KC_RSFT +``` + +The area enclosed in parentheses may be replaced by a trackball. + + is useful for testing keys. + +[remap]:https://remap-keys.app/ diff --git a/keyball44/doc/firmware_README.md b/keyball44/doc/firmware_README.md new file mode 100644 index 000000000..2eadcabdf --- /dev/null +++ b/keyball44/doc/firmware_README.md @@ -0,0 +1,52 @@ +# Keyball44 firmwares README + +## Description in English + +This archive includes firmwares for Keyball44. + +Included variations of firmware are below: + +* `default` - base version for customization +* `test` - used for testing during assembly +* `via` - Recommended version that can use [Remap][remap] + +The recommended usage of these firmwares is: + +1. Please use `test` version during assemble the keyboard. + It is designed to help verifying that the soldering of diodes and switch + sockets is correct, and easy to check the operation of RGB LED. +2. After confirming the operation, rewrite it with `via` version. + +## 日本語の説明 + +このアーカイブには Keyball44 のファームウェアが含まれています。 + +含まれているファームウェアのバリエーションは以下の通りです: + +* `default` - カスタマイズの基礎となる版 +* `test` - 組立時のテストに用いる版 +* `via` - [Remap][remap] で利用できる、推奨版 + +推奨する使い方は次の通りです: + +1. キーボードを組み立てる際は `test` を使ってください。 + ダイオードやスイッチソケットのハンダ付けが正しいか確認できる他、 + RGB LEDの動作確認が容易になるように構成してあります。 +2. 動作確認が取れたあとは `via` に書き換えて利用してください。 + +## Fixed keymap for `test` + +This keymap does not use any layers or QMK function keys to make it easier to test. + +``` +KC_ESC KC_Q KC_W KC_E KC_R KC_T KC_Y KC_U KC_I KC_O KC_P KC_MINS +KC_TAB KC_A KC_S KC_D KC_F KC_G KC_H KC_J KC_K KC_L KC_SCLN KC_QUOT +KC_LSFT KC_Z KC_X KC_C KC_V KC_B KC_N KC_M KC_COMM KC_DOT KC_SLSH KC_RSFT + KC_LCTL (KC_LGUI KC_LALT) KC_SPC KC_DEL KC_BSPC KC_ENT (KC_RALT KC_RGUI) KC_RCTL +``` + +The area enclosed in parentheses may be replaced by a trackball. + + is useful for testing keys. + +[remap]:https://remap-keys.app/ diff --git a/keyball61/doc/firmware_README.md b/keyball61/doc/firmware_README.md new file mode 100644 index 000000000..d19bd9134 --- /dev/null +++ b/keyball61/doc/firmware_README.md @@ -0,0 +1,53 @@ +# Keyball61 firmwares README + +## Description in English + +This archive includes firmwares for Keyball61. + +Included variations of firmware are below: + +* `default` - base version for customization +* `test` - used for testing during assembly +* `via` - Recommended version that can use [Remap][remap] + +The recommended usage of these firmwares is: + +1. Please use `test` version during assemble the keyboard. + It is designed to help verifying that the soldering of diodes and switch + sockets is correct, and easy to check the operation of RGB LED. +2. After confirming the operation, rewrite it with `via` version. + +## 日本語の説明 + +このアーカイブには Keyball61 のファームウェアが含まれています。 + +含まれているファームウェアのバリエーションは以下の通りです: + +* `default` - カスタマイズの基礎となる版 +* `test` - 組立時のテストに用いる版 +* `via` - [Remap][remap] で利用できる、推奨版 + +推奨する使い方は次の通りです: + +1. キーボードを組み立てる際は `test` を使ってください。 + ダイオードやスイッチソケットのハンダ付けが正しいか確認できる他、 + RGB LEDの動作確認が容易になるように構成してあります。 +2. 動作確認が取れたあとは `via` に書き換えて利用してください。 + +## Fixed keymap for `test` + +This keymap does not use any layers or QMK function keys to make it easier to test. + +``` +KC_ESC KC_1 KC_2 KC_3 KC_4 KC_5 KC_6 KC_7 KC_8 KC_9 KC_0 KC_MINS +KC_GRV KC_Q KC_W KC_E KC_R KC_T KC_Y KC_U KC_I KC_O KC_P KC_EQL +KC_LCTL KC_A KC_S KC_D KC_F KC_G KC_H KC_J KC_K KC_L KC_SCLN KC_QUOT +KC_LSFT KC_Z KC_X KC_C KC_V KC_B KC_LBRC KC_RBRC KC_N KC_M KC_COMM KC_DOT KC_SLSH KC_RSFT +KC_LGUI KC_APP (KC_HOME KC_END KC_LALT) KC_SPC KC_TAB KC_BSPC KC_ENT (KC_RALT KC_PGUP KC_PGDN) KC_BSLS KC_RGUI +``` + +The area enclosed in parentheses may be replaced by a trackball. + + is useful for testing keys. + +[remap]:https://remap-keys.app/