mirror of
https://github.com/qmk/qmk_userspace.git
synced 2025-05-01 21:24:16 -04:00
Point my userspace at a clone of .github
- this is where I keep my custom build actions (nontree)
This commit is contained in:
parent
5c90a110ba
commit
68d921efe7
2 changed files with 2 additions and 116 deletions
5
.github/workflows/build_binaries.yaml
vendored
5
.github/workflows/build_binaries.yaml
vendored
|
@ -8,14 +8,13 @@ permissions:
|
|||
jobs:
|
||||
build:
|
||||
name: 'QMK Userspace Build'
|
||||
#uses: qmk/.github/.github/workflows/qmk_userspace_build.yml@main
|
||||
uses: ./.github/workflows/qmk_userspace_build.yml
|
||||
uses: t4corun/.github/.github/workflows/qmk_userspace_build.yml@nontree
|
||||
with:
|
||||
qmk_repo: qmk/qmk_firmware
|
||||
qmk_ref: master
|
||||
|
||||
publish:
|
||||
name: 'QMK Userspace Publish'
|
||||
uses: qmk/.github/.github/workflows/qmk_userspace_publish.yml@main
|
||||
uses: t4corun/.github/.github/workflows/qmk_userspace_publish.yml@nontree
|
||||
if: always() && !cancelled()
|
||||
needs: build
|
||||
|
|
113
.github/workflows/qmk_userspace_build.yml
vendored
113
.github/workflows/qmk_userspace_build.yml
vendored
|
@ -1,113 +0,0 @@
|
|||
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
|
||||
qmk_nontree_json:
|
||||
description: "json file containing non-tree keyboards"
|
||||
default: "qmk_nontree.json"
|
||||
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@v4
|
||||
with:
|
||||
token: ${{ github.token }}
|
||||
submodules: recursive
|
||||
|
||||
- name: Check if qmk_firmware exists
|
||||
id: check_files
|
||||
uses: andstor/file-existence-action@v3
|
||||
with:
|
||||
files: qmk_firmware
|
||||
|
||||
- name: Checkout QMK Firmware
|
||||
uses: actions/checkout@v4
|
||||
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: Check if non-tree keyboard json file exists
|
||||
id: check_json_files
|
||||
uses: andstor/file-existence-action@v3
|
||||
with:
|
||||
files: ${{ inputs.qmk_nontree_json }}
|
||||
|
||||
- name: Read Non-Tree Targets from JSON file
|
||||
if: steps.check_json_files.outputs.files_exists == 'true'
|
||||
run: |
|
||||
{
|
||||
echo 'COPY_TARGETS<<EOF'
|
||||
cat $GITHUB_WORKSPACE/${{ inputs.qmk_nontree_json }}
|
||||
echo
|
||||
echo 'EOF'
|
||||
} >> "$GITHUB_ENV"
|
||||
|
||||
- name: Copy Non-Tree Keyboard Definitions from Userspace to QMK Firmware
|
||||
if: steps.check_json_files.outputs.files_exists == 'true'
|
||||
run: |
|
||||
for target in ${{ join(fromJson(env.COPY_TARGETS).nontree_targets, ' ') }};
|
||||
do
|
||||
echo "Copying keyboard: $target"
|
||||
cp $GITHUB_WORKSPACE/keyboards/$target $GITHUB_WORKSPACE/qmk_firmware/keyboards -R
|
||||
done
|
||||
|
||||
- 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@v4
|
||||
if: always() && !cancelled()
|
||||
continue-on-error: true
|
||||
with:
|
||||
name: Firmware
|
||||
path: |
|
||||
*.bin
|
||||
*.hex
|
||||
*.uf2
|
Loading…
Add table
Add a link
Reference in a new issue