60 lines
1.6 KiB
YAML
60 lines
1.6 KiB
YAML
name: CI Builds
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '0 0,12 * * *'
|
|
|
|
jobs:
|
|
ci_builds:
|
|
name: "CI Build"
|
|
runs-on: self-hosted
|
|
timeout-minutes: 1380
|
|
|
|
if: github.repository == 'qmk/qmk_firmware'
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
branch: [master, develop]
|
|
keymap: [default, via]
|
|
|
|
container: ghcr.io/qmk/qmk_cli
|
|
|
|
steps:
|
|
- name: Disable safe.directory check
|
|
run : git config --global --add safe.directory '*'
|
|
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
ref: ${{ matrix.branch }}
|
|
|
|
- name: Install dependencies
|
|
run: pip3 install -r requirements.txt
|
|
|
|
- name: Run `qmk mass-compile` (keymap ${{ matrix.keymap }})
|
|
run: |
|
|
export NCPUS=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null)
|
|
qmk mass-compile -t -j $NCPUS -km ${{ matrix.keymap }} -e DUMP_CI_METADATA=yes || touch .failed
|
|
# Generate the step summary markdown
|
|
./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 artifacts'
|
|
uses: actions/upload-artifact@v3
|
|
if: always()
|
|
with:
|
|
name: artifacts-${{ matrix.branch }}-${{ matrix.keymap }}
|
|
if-no-files-found: ignore
|
|
path: |
|
|
*.bin
|
|
*.hex
|
|
*.uf2
|
|
.build/failed.*
|