mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-13 03:11:33 +00:00
Workflow update.
This commit is contained in:
parent
926ad82367
commit
a750b85aa1
29
.github/workflows/qmk_userspace_build.yml
vendored
29
.github/workflows/qmk_userspace_build.yml
vendored
@ -30,21 +30,28 @@ jobs:
|
|||||||
path: userspace
|
path: userspace
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
# This doesn't use actions/checkout as we want to allow qmk_firmware as a submodule
|
- name: Check qmk_firmware exists
|
||||||
|
id: check_files
|
||||||
|
uses: andstor/file-existence-action@v2
|
||||||
|
with:
|
||||||
|
files: userspace/qmk_firmware
|
||||||
|
|
||||||
- name: Checkout QMK Firmware
|
- name: Checkout QMK Firmware
|
||||||
run: |
|
uses: actions/checkout@v3
|
||||||
if [ ! -d qmk_firmware ]; then
|
if: steps.check_files.outputs.files_exists == 'false'
|
||||||
git clone -b ${{ inputs.qmk_ref || 'master' }} \
|
with:
|
||||||
--depth=1000 --recurse-submodules --shallow-submodules \
|
path: userspace/qmk_firmware
|
||||||
https://github.com/${{ inputs.qmk_repo || 'qmk/qmk_firmware' }}.git
|
repository: ${{ inputs.qmk_repo || 'qmk/qmk_firmware' }}
|
||||||
fi
|
ref: ${{ inputs.qmk_ref || 'master' }}
|
||||||
|
submodules: recursive
|
||||||
|
fetch-depth: 1000 # This line should be removed once userspace support exists in QMK Firmware
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
## Delete this section once userspace exists upstream ##
|
## Delete this section once userspace exists upstream ##
|
||||||
########################################################
|
########################################################
|
||||||
- name: Patch QMK Firmware with userspace support
|
- name: Patch QMK Firmware with userspace support
|
||||||
run: |
|
run: |
|
||||||
cd qmk_firmware
|
cd userspace/qmk_firmware
|
||||||
git config --global user.email "nonexistent@email-address.invalid"
|
git config --global user.email "nonexistent@email-address.invalid"
|
||||||
git config --global user.name "QMK GitHub Actions User"
|
git config --global user.name "QMK GitHub Actions User"
|
||||||
git remote add qmk https://github.com/qmk/qmk_firmware.git
|
git remote add qmk https://github.com/qmk/qmk_firmware.git
|
||||||
@ -55,19 +62,19 @@ jobs:
|
|||||||
- name: Install QMK CLI
|
- name: Install QMK CLI
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install --upgrade qmk
|
python3 -m pip install --upgrade qmk
|
||||||
python3 -m pip install -r qmk_firmware/requirements.txt
|
python3 -m pip install -r userspace/qmk_firmware/requirements.txt
|
||||||
|
|
||||||
- name: Configure QMK CLI
|
- name: Configure QMK CLI
|
||||||
run: |
|
run: |
|
||||||
qmk config mass_compile.parallel=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null)
|
qmk config mass_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.qmk_home=$GITHUB_WORKSPACE/userspace/qmk_firmware
|
||||||
qmk config user.overlay_dir=$GITHUB_WORKSPACE/userspace
|
qmk config user.overlay_dir=$GITHUB_WORKSPACE/userspace
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
qmk mass-compile -e DUMP_CI_METADATA=yes -km ${{ github.repository_owner }} || touch .failed
|
qmk mass-compile -e DUMP_CI_METADATA=yes -km ${{ github.repository_owner }} || touch .failed
|
||||||
# Generate the step summary markdown
|
# Generate the step summary markdown
|
||||||
./qmk_firmware/util/ci/generate_failure_markdown.sh > $GITHUB_STEP_SUMMARY || true
|
./userspace/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 to a maximum of 1MB to deal with GitHub workflow limit
|
||||||
truncate --size='<960K' $GITHUB_STEP_SUMMARY || true
|
truncate --size='<960K' $GITHUB_STEP_SUMMARY || true
|
||||||
# Exit with failure if the compilation stage failed
|
# Exit with failure if the compilation stage failed
|
||||||
|
Loading…
Reference in New Issue
Block a user