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