Workflow paths.

This commit is contained in:
Nick Brassel 2023-09-03 21:36:16 +10:00
parent a750b85aa1
commit c4b133ca79
No known key found for this signature in database

View File

@ -27,20 +27,19 @@ jobs:
- name: Checkout Userspace - name: Checkout Userspace
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
path: userspace
submodules: recursive submodules: recursive
- name: Check qmk_firmware exists - name: Check qmk_firmware exists
id: check_files id: check_files
uses: andstor/file-existence-action@v2 uses: andstor/file-existence-action@v2
with: with:
files: userspace/qmk_firmware files: qmk_firmware
- name: Checkout QMK Firmware - name: Checkout QMK Firmware
uses: actions/checkout@v3 uses: actions/checkout@v3
if: steps.check_files.outputs.files_exists == 'false' if: steps.check_files.outputs.files_exists == 'false'
with: with:
path: userspace/qmk_firmware path: qmk_firmware
repository: ${{ inputs.qmk_repo || 'qmk/qmk_firmware' }} repository: ${{ inputs.qmk_repo || 'qmk/qmk_firmware' }}
ref: ${{ inputs.qmk_ref || 'master' }} ref: ${{ inputs.qmk_ref || 'master' }}
submodules: recursive submodules: recursive
@ -51,7 +50,7 @@ jobs:
######################################################## ########################################################
- name: Patch QMK Firmware with userspace support - name: Patch QMK Firmware with userspace support
run: | run: |
cd userspace/qmk_firmware cd 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
@ -62,19 +61,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 userspace/qmk_firmware/requirements.txt python3 -m pip install -r 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/userspace/qmk_firmware qmk config user.qmk_home=$GITHUB_WORKSPACE/qmk_firmware
qmk config user.overlay_dir=$GITHUB_WORKSPACE/userspace qmk config user.overlay_dir=$GITHUB_WORKSPACE
- 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
./userspace/qmk_firmware/util/ci/generate_failure_markdown.sh > $GITHUB_STEP_SUMMARY || true ./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