Nightly Build #1474
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Nightly Build | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
push: | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: 'Log level' | |
required: true | |
default: 'warning' | |
tags: | |
description: 'Manual trigger' | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
container: qmkfm/qmk_cli | |
steps: | |
- name: Checkout build repo | |
uses: actions/checkout@v2 | |
- name: Checkout qmk_firmware | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
repository: qmk/qmk_firmware | |
path: qmk_firmware | |
- name: obtain all tags | |
uses: actions/checkout@v2 | |
with: | |
repository: qmk/qmk_firmware | |
path: qmk_firmware | |
fetch-depth: 0 | |
- name: Remove ".noci" | |
run: | | |
find . -name ".noci" -type f -delete | |
- name: Build | |
working-directory: qmk_firmware | |
#env: | |
# MAKEFLAGS: '-j3 --output-sync' | |
run: | | |
git clean -xfd | |
make git-submodule | |
qmk mass-compile -j3 -km via || true | |
cat .build/failed* > failures.log || true | |
- name: 'Upload binaries' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Artifacts | |
path: | | |
qmk_firmware/failures.log | |
- name: Sort output | |
shell: bash | |
run: | | |
for file in qmk_firmware/*.hex qmk_firmware/*.bin qmk_firmware/*.uf2; do | |
DIR=$(echo $(basename "$file")|cut -d'_' -f1) | |
mkdir -p "$DIR" | |
mv "$file" "$DIR/" | |
done | |
echo "Build on `date -u`" > README.md | |
- name: Update Readme | |
shell: bash "{0}" | |
run: | | |
echo -e "# VIA enabled QMK compiled HEX and BIN files\n\nThis has been compiled on $(git -C $PWD/qmk_firmware describe --abbrev=0 --tags)" > README.md | |
- name: Add safe directory | |
run: git config --global --add safe.directory /__w/QMK-VIA-Hex/QMK-VIA-Hex | |
- name: Commit | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Nightly Build | |
push_options: --force |