Skip to content

Commit

Permalink
Merge branch 'vial-kb:vial' into vial
Browse files Browse the repository at this point in the history
  • Loading branch information
JanLunge authored Aug 17, 2023
2 parents 5f90a99 + ca3a3d8 commit 24acb66
Show file tree
Hide file tree
Showing 27,390 changed files with 846,115 additions and 648,384 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 4 additions & 0 deletions .clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CompileFlags:
Add: [-Wno-unknown-attributes, -Wno-maybe-uninitialized, -Wno-unknown-warning-option]
Remove: [-W*, -mcall-prologues]
Compiler: clang
36 changes: 0 additions & 36 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

8 changes: 0 additions & 8 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

14 changes: 0 additions & 14 deletions .github/ISSUE_TEMPLATE/other_issues.md

This file was deleted.

11 changes: 0 additions & 11 deletions .github/ISSUE_TEMPLATE/zzz_blank.md

This file was deleted.

9 changes: 0 additions & 9 deletions .github/dependabot.yml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/labeler.yml

This file was deleted.

103 changes: 90 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,102 @@
name: CI
on: [ pull_request, push, workflow_dispatch ]

on:
push:
workflow_dispatch:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

env:
REGEX_ANSI_COLOR: 's/\x1b\[[0-9;]*[mGKHF]//g'
REGEX_MAKE_OUTPUT: '/^g*make\[1]: \(Enter\|Leav\)ing directory ''/d'

permissions: {}

jobs:
build:
check-uid:
name: Check Vial UIDs
runs-on: ubuntu-latest

container: qmkfm/qmk_cli

steps:
- uses: actions/checkout@v2
- name: (actions) Checkout Vial repo
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false

- name: Verify Vial UID is unique
- name: Verify Vial UID is unique per-keyboard
run: python3 util/ci_vial_verify_uid.py

- name: Compile Vial keyboards
build-default:
name: Build default keymaps for Vial
runs-on: ubuntu-latest
container: ghcr.io/qmk/qmk_cli
env:
KEYMAP: default

steps:
- name: (actions) Checkout Vial repo
uses: actions/checkout@v3
with:
persist-credentials: false
submodules: recursive

- name: Build
id: build
run: |
git config --global --add safe.directory $(pwd)
if ! qmk mass-compile -j $(nproc) $(qmk find -km vial | sed "s/:vial$/:${KEYMAP}/");
then
echo "::error::$(ls -1 .build/failed.log.* | wc -l) keymaps failed to build. See logs and/or job summary for details."
exit 1
fi
- name: Dump failure logs
if: ${{ failure() && steps.build.conclusion == 'failure' }}
run: |
make git-submodule
python3 util/ci_compile_vial_keyboards.py
echo '### Failure logs' | tee -a "${GITHUB_STEP_SUMMARY}"
cd .build || exit 1
for log in failed.log.*; do
pretty_logname="$(echo "${log}" | sed "s/^failed\.log\.[0-9]\+\.// ; s/\.${KEYMAP}$//")"
printf '\n::group::%s\n%s\n::endgroup::\n' "${pretty_logname}" "$(sed "${REGEX_MAKE_OUTPUT}" < "${log}")"
printf '\n<details>\n<summary>%s</summary>\n\n```\n%s\n```\n\n</details>\n' \
"${pretty_logname}" "$(sed "${REGEX_MAKE_OUTPUT} ; ${REGEX_ANSI_COLOR}" < "${log}")" >> "${GITHUB_STEP_SUMMARY}"
done
build-vial:
name: Build Vial keymaps
runs-on: ubuntu-latest
container: ghcr.io/qmk/qmk_cli
env:
KEYMAP: vial

steps:
- name: (actions) Checkout Vial repo
uses: actions/checkout@v3
with:
persist-credentials: false
submodules: recursive

- name: Build
id: build
run: |
git config --global --add safe.directory $(pwd)
if ! qmk mass-compile -km "${KEYMAP}" -j $(nproc);
then
echo "::error::$(ls -1 .build/failed.log.* | wc -l) keymaps failed to build. See logs and/or job summary for details."
exit 1
fi
- name: Dump failure logs
if: ${{ failure() && steps.build.conclusion == 'failure' }}
run: |
echo '### Failure logs' | tee -a "${GITHUB_STEP_SUMMARY}"
cd .build || exit 1
for log in failed.log.*; do
pretty_logname="$(echo "${log}" | sed "s/^failed\.log\.[0-9]\+\.// ; s/\.${KEYMAP}$//")"
printf '\n::group::%s\n%s\n::endgroup::\n' "${pretty_logname}" "$(sed "${REGEX_MAKE_OUTPUT}" < "${log}")"
printf '\n<details>\n<summary>%s</summary>\n\n```\n%s\n```\n\n</details>\n' \
"${pretty_logname}" "$(sed "${REGEX_MAKE_OUTPUT} ; ${REGEX_ANSI_COLOR}" < "${log}")" >> "${GITHUB_STEP_SUMMARY}"
done
74 changes: 74 additions & 0 deletions .github/workflows/ci_builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: CI Builds

permissions:
contents: read

on:
push:
branches: [master, develop]
workflow_dispatch:
inputs:
branch:
type: choice
description: 'Branch to build'
options: [master, develop]

concurrency: ci_build-${{ github.event.inputs.branch || github.ref_name }}

jobs:
ci_builds:
if: github.repository == 'qmk/qmk_firmware'
name: "CI Build"
runs-on: self-hosted
timeout-minutes: 1380

strategy:
fail-fast: false
matrix:
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: ${{ github.event.inputs.branch || github.ref }}

- 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-${{ github.event.inputs.branch || github.ref_name }}-${{ matrix.keymap }}
if-no-files-found: ignore
path: |
*.bin
*.hex
*.uf2
.build/failed.*
- name: 'CI Discord Notification'
if: always()
working-directory: util/ci/
env:
DISCORD_WEBHOOK: ${{ secrets.CI_DISCORD_WEBHOOK }}
run: |
python3 -m pip install -r requirements.txt
python3 ./discord-results.py --branch ${{ github.event.inputs.branch || github.ref_name }} --keymap ${{ matrix.keymap }} --url ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
36 changes: 36 additions & 0 deletions .github/workflows/regen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: PR Regenerate Files

permissions:
contents: read

on:
pull_request:
paths:
- 'data/constants/**'
- 'lib/python/**'

jobs:
regen:
runs-on: ubuntu-latest

container: ghcr.io/qmk/qmk_cli

steps:
- name: Disable safe.directory check
run : git config --global --add safe.directory '*'

- uses: actions/checkout@v3

- name: Run qmk generators
run: |
util/regen.sh
git diff
- name: Fail when regeneration required
run: |
git diff
for file in $(git diff --name-only); do
echo "File '${file}' Requires Regeneration"
echo "::error file=${file}::Requires Regeneration"
done
test -z "$(git diff --name-only)"
Loading

0 comments on commit 24acb66

Please sign in to comment.