mirror of
https://github.com/qmk/qmk_userspace.git
synced 2025-05-05 15:14:17 -04:00
Adding custom github actions
- copied the official QMK build action and injected a step to copy the rollow keyboard definition to the qmk_firmware before the build - Added the rollow to the qmk.json
This commit is contained in:
parent
d78410eab8
commit
50c5aa16a3
3 changed files with 109 additions and 1 deletions
20
.github/workflows/build_nontree_binaries.yaml
vendored
Normal file
20
.github/workflows/build_nontree_binaries.yaml
vendored
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
name: Build Non-Tree QMK firmware
|
||||||
|
|
||||||
|
on: [push, workflow_dispatch]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: 'QMK Userspace Build'
|
||||||
|
uses: t4corun/.github/workflows/custom/qmk_userspace_build.yml
|
||||||
|
with:
|
||||||
|
qmk_repo: qmk/qmk_firmware
|
||||||
|
qmk_ref: master
|
||||||
|
|
||||||
|
publish:
|
||||||
|
name: 'QMK Userspace Publish'
|
||||||
|
uses: qmk/.github/.github/workflows/qmk_userspace_publish.yml@main
|
||||||
|
if: always() && !cancelled()
|
||||||
|
needs: build
|
87
.github/workflows/custom/qmk_userspace_build.yml
vendored
Normal file
87
.github/workflows/custom/qmk_userspace_build.yml
vendored
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
name: Build Non-Tree Keyboard Binaries
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
qmk_repo:
|
||||||
|
description: "qmk_firmware repo to build against"
|
||||||
|
default: "qmk/qmk_firmware"
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
qmk_ref:
|
||||||
|
description: "qmk_firmware branch to build against"
|
||||||
|
default: "master"
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build Userspace Firmware
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: qmkfm/base_container
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Userspace
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
token: ${{ github.token }}
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Check if qmk_firmware exists
|
||||||
|
id: check_files
|
||||||
|
uses: andstor/file-existence-action@v2
|
||||||
|
with:
|
||||||
|
files: qmk_firmware
|
||||||
|
|
||||||
|
- name: Checkout QMK Firmware
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
if: steps.check_files.outputs.files_exists == 'false'
|
||||||
|
with:
|
||||||
|
token: ${{ github.token }}
|
||||||
|
path: qmk_firmware
|
||||||
|
repository: ${{ inputs.qmk_repo || 'qmk/qmk_firmware' }}
|
||||||
|
ref: ${{ inputs.qmk_ref || 'master' }}
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Install QMK CLI
|
||||||
|
run: |
|
||||||
|
python3 -m pip install --upgrade qmk
|
||||||
|
python3 -m pip install -r qmk_firmware/requirements.txt
|
||||||
|
|
||||||
|
- name: Configure QMK CLI
|
||||||
|
run: |
|
||||||
|
qmk config userspace_compile.parallel=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null)
|
||||||
|
qmk config user.qmk_home=$GITHUB_WORKSPACE/qmk_firmware
|
||||||
|
qmk config user.overlay_dir=$GITHUB_WORKSPACE
|
||||||
|
|
||||||
|
- name: Validate userspace
|
||||||
|
run: |
|
||||||
|
qmk userspace-doctor
|
||||||
|
|
||||||
|
- name: Copy Non-Tree Keyboards to QMK Firmware
|
||||||
|
run: |
|
||||||
|
cp $GITHUB_WORKSPACE/keyboards/barbellboards $GITHUB_WORKSPACE/qmk_firmware/keyboards -R
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
qmk userspace-compile -e DUMP_CI_METADATA=yes || touch .failed
|
||||||
|
# Generate the step summary markdown
|
||||||
|
./qmk_firmware/util/ci/generate_failure_markdown.sh > $GITHUB_STEP_SUMMARY || true
|
||||||
|
# Truncate to a maximum of 1MB to deal with GitHub workflow limit
|
||||||
|
truncate --size='<960K' $GITHUB_STEP_SUMMARY || true
|
||||||
|
# Exit with failure if the compilation stage failed
|
||||||
|
[ ! -f .failed ] || exit 1
|
||||||
|
|
||||||
|
- name: Upload binaries
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
if: always() && !cancelled()
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
name: Firmware
|
||||||
|
path: |
|
||||||
|
*.bin
|
||||||
|
*.hex
|
||||||
|
*.uf2
|
3
qmk.json
3
qmk.json
|
@ -5,6 +5,7 @@
|
||||||
["crkbd/rev1", "t4corun"],
|
["crkbd/rev1", "t4corun"],
|
||||||
["bastardkb/charybdis/3x5/v2/splinky_3", "t4corun"],
|
["bastardkb/charybdis/3x5/v2/splinky_3", "t4corun"],
|
||||||
["planck/rev6", "t4corun"],
|
["planck/rev6", "t4corun"],
|
||||||
["bluebell/swoop", "t4corun"]
|
["bluebell/swoop", "t4corun"],
|
||||||
|
["barbellboards/rollow", "t4corun"]
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue