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