Build #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: qmkfm/qmk_cli | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- layout: ardux_thepaintbrush | |
hand: left | |
size: std | |
fwext: hex | |
- layout: ardux_thepaintbrush | |
hand: right | |
size: std | |
fwext: hex | |
- layout: faunchpad | |
hand: left | |
size: std | |
fwext: hex | |
- layout: faunchpad | |
hand: right | |
size: std | |
fwext: hex | |
- layout: ai03_soyuz | |
hand: left | |
size: std | |
fwext: hex | |
- layout: ai03_soyuz | |
hand: right | |
size: std | |
fwext: hex | |
- layout: geekboards_macropad_v2 | |
hand: left | |
size: std | |
fwext: bin | |
- layout: geekboards_macropad_v2 | |
hand: right | |
size: std | |
fwext: bin | |
- layout: crkbd_rev1 | |
hand: left | |
size: big | |
fwext: hex | |
- layout: crkbd_rev1 | |
hand: right | |
size: big | |
fwext: hex | |
- layout: gboards_gergo | |
hand: left | |
size: big | |
fwext: hex | |
- layout: gboards_gergo | |
hand: right | |
size: big | |
fwext: hex | |
- layout: ferris_sweep | |
hand: left | |
size: big | |
fwext: hex | |
- layout: ferris_sweep | |
hand: right | |
size: big | |
fwext: hex | |
- layout: draculad | |
hand: left | |
size: big | |
fwext: hex | |
- layout: draculad | |
hand: right | |
size: big | |
fwext: hex | |
# - layout: boardsource_microdox | |
# hand: left | |
# size: big | |
# fwext: hex | |
# - layout: boardsource_microdox | |
# hand: right | |
# size: big | |
# fwext: hex | |
- layout: splitkb_kyria_rev2 | |
hand: right | |
size: big | |
fwext: hex | |
- layout: splitkb_kyria_rev2 | |
hand: left | |
size: big | |
fwext: hex | |
- layout: crkbd_rev1 | |
hand: left | |
size: 40p | |
fwext: hex | |
- layout: crkbd_rev1 | |
hand: right | |
size: 40p | |
fwext: hex | |
- layout: ferris_sweep | |
hand: left | |
size: 40p | |
fwext: hex | |
- layout: ferris_sweep | |
hand: right | |
size: 40p | |
fwext: hex | |
- layout: draculad | |
hand: left | |
size: 40p | |
fwext: hex | |
- layout: draculad | |
hand: right | |
size: 40p | |
fwext: hex | |
# - layout: boardsource_microdox | |
# hand: left | |
# size: 40p | |
# fwext: hex | |
# - layout: boardsource_microdox | |
# hand: right | |
# size: 40p | |
# fwext: hex | |
- layout: splitkb_kyria_rev2 | |
hand: right | |
size: 40p | |
fwext: hex | |
- layout: splitkb_kyria_rev2 | |
hand: left | |
size: 40p | |
fwext: hex | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cache - QMK Source | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-qmk_firmware | |
with: | |
path: /qmk_firmware | |
key: ${{ env.cache-name }}-${{ matrix.layout }}-${{ matrix.size }}-${{ matrix.hand }} | |
- name: Update QMK Sources | |
run: | | |
if [ -d /qmk_firmware/.git ]; | |
then | |
cd /qmk_firmware; | |
git pull; | |
else | |
git clone --branch 0.18.5 https://github.com/qmk/qmk_firmware.git /qmk_firmware/; | |
fi | |
if [ ! -d /qmk_firmware/keyboards/ardux ]; | |
then | |
ln -s "${GITHUB_WORKSPACE}/keyboards/ardux" /qmk_firmware/keyboards/ardux; | |
echo "Created keyboards/ardux symlink"; | |
fi | |
if [ ! -d /qmk_firmware/keyboards/faunchpad ]; | |
then | |
ln -s "${GITHUB_WORKSPACE}/keyboards/faunchpad" /qmk_firmware/keyboards/faunchpad; | |
echo "Created keyboards/faunchpad symlink"; | |
fi | |
if [ ! -d /qmk_firmware/users/ardux ]; | |
then | |
ln -s "${GITHUB_WORKSPACE}/users/ardux" /qmk_firmware/users/ardux; | |
echo "Created users/ardux symlink"; | |
fi | |
qmk setup -y; | |
- name: QMK Clean | |
run: qmk clean | |
- name: QMK Build | |
run: | | |
cd /qmk_firmware/users/ardux | |
qmk compile -e ALLOW_WARNINGS=yes -e ARDUX_SIZE=${{ matrix.size }} -e ARDUX_HAND=${{ matrix.hand }} layout/${{ matrix.layout }}.json | |
- name: Debug - ls build artifact folder | |
run: ls /qmk_firmware/.build | |
- name: Prep artifacts | |
run: cp /qmk_firmware/.build/${{ matrix.layout }}_ardux.${{ matrix.fwext }} /qmk_firmware/.build/ardux-${{ matrix.layout }}-${{ matrix.size }}-${{ matrix.hand }}.${{ matrix.fwext }} | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "ardux-${{ matrix.layout }}-${{ matrix.size }}-${{ matrix.hand }}.${{ matrix.fwext }}" | |
path: "/qmk_firmware/.build/ardux-${{ matrix.layout }}-${{ matrix.size }}-${{ matrix.hand }}.${{ matrix.fwext }}" | |
if-no-files-found: error | |
retention-days: 14 | |
release: | |
runs-on: ubuntu-latest | |
name: Create Release | |
needs: build | |
if: ${{ !github.event.pull_request.head.repo.fork }} | |
steps: | |
- name: Get current date/time | |
id: date | |
run: echo "date=$(date +'%Y%m%d-%H%M')" >>$GITHUB_OUTPUT | |
- name: Generate release text | |
id: release_text | |
run: > | |
echo "release_text=$(echo '<b>Precompiled firmware files for ARDUX</b><br><br> | |
Download a firmware file by expanding "Assets", right clicking, and choosing "Save File As" or "Save Link As". | |
<br>${{ github.event.inputs.releaseBody }} | |
<br>Released on ${{ steps.date.outputs.date }}. | |
<br><br>${{ steps.docker_build.outputs.commits }}')" >>$GITHUB_OUTPUT | |
- name: Download build artifacts for release | |
uses: actions/download-artifact@v4 | |
with: | |
path: release | |
- name: List files to include in release | |
if: always() | |
run: ls -R release/ | |
- name: Create firmware files directory for individual board assets | |
if: always() | |
run: mkdir fwfiles | |
- name: cp all firmware files for release to one output dir | |
if: always() | |
run: cd release && for folder in ./*; do echo $folder; cp ${folder}/*.* ../fwfiles/; done && cd .. | |
- name: Create release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "fwfiles/*" | |
allowUpdates: false | |
artifactErrorsFailBuild: true | |
commit: main | |
tag: ${{ steps.date.outputs.date }} | |
body: ${{ steps.release_text.outputs.release_text }} | |
name: ${{ steps.date.outputs.date }} | |
token: ${{ secrets.GITHUB_TOKEN }} |