2023-03-09 22:36:20 +00:00
|
|
|
name: CI Builds
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
on:
|
2023-03-29 01:51:39 +00:00
|
|
|
workflow_dispatch:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 0,12 * * *'
|
2023-03-09 22:36:20 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
ci_builds:
|
2023-03-12 01:55:26 +00:00
|
|
|
name: "CI Build"
|
2023-03-09 22:36:20 +00:00
|
|
|
runs-on: self-hosted
|
2023-03-12 01:18:49 +00:00
|
|
|
timeout-minutes: 1380
|
2023-03-09 22:36:20 +00:00
|
|
|
|
|
|
|
if: github.repository == 'qmk/qmk_firmware'
|
|
|
|
|
|
|
|
strategy:
|
2023-03-29 01:51:39 +00:00
|
|
|
fail-fast: false
|
2023-03-09 22:36:20 +00:00
|
|
|
matrix:
|
2023-03-29 01:51:39 +00:00
|
|
|
branch: [master, develop]
|
2023-03-14 21:31:10 +00:00
|
|
|
keymap: [default, via]
|
2023-03-09 22:36:20 +00:00
|
|
|
|
|
|
|
container: qmkfm/qmk_cli
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Disable safe.directory check
|
|
|
|
run : git config --global --add safe.directory '*'
|
|
|
|
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
2023-03-29 01:51:39 +00:00
|
|
|
ref: ${{ matrix.branch }}
|
2023-03-09 22:36:20 +00:00
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: pip3 install -r requirements.txt
|
|
|
|
|
2023-03-18 15:58:51 +00:00
|
|
|
- name: Run `qmk mass-compile` (keymap ${{ matrix.keymap }})
|
2023-03-29 01:51:39 +00:00
|
|
|
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 }}
|
2023-03-14 21:31:10 +00:00
|
|
|
|
2023-03-29 01:51:39 +00:00
|
|
|
- name: 'Upload artifacts'
|
2023-03-14 21:31:10 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2023-03-29 01:51:39 +00:00
|
|
|
if: always()
|
2023-03-14 21:31:10 +00:00
|
|
|
with:
|
2023-03-29 01:51:39 +00:00
|
|
|
name: artifacts-${{ matrix.branch }}-${{ matrix.keymap }}
|
2023-03-14 21:31:10 +00:00
|
|
|
if-no-files-found: ignore
|
|
|
|
path: |
|
|
|
|
*.bin
|
|
|
|
*.hex
|
|
|
|
*.uf2
|
2023-03-29 01:51:39 +00:00
|
|
|
.build/failed.*
|