Compare commits

..

8 Commits

Author SHA1 Message Date
Zach White e293bf243d refactor doctor.py into a directory 2021-06-21 22:48:20 -07:00
Zach White 286acfe7fd move all our file formatters to the format dir 2021-06-21 22:24:34 -07:00
Zach White 6d20b28354 make our schema validation more compact and flexible 2021-06-21 12:30:26 -07:00
Zach White 846da06380 cleanup 2021-06-21 09:58:11 -07:00
Zach White 243fc17e41 make flake8 happy 2021-06-20 12:27:51 -07:00
Zach White f394f23ac6 fix formatting after vscode broke it 2021-06-20 11:57:37 -07:00
Zach White 0ca53fa307 optimize our jsonschema using refs 2021-06-20 11:52:57 -07:00
Zach White 8c361d6c41 fix some broken info.json files 2021-06-20 11:52:57 -07:00
37143 changed files with 1167853 additions and 1429801 deletions
-4
View File
@@ -5,9 +5,6 @@ AlignConsecutiveAssignments: 'true'
AlignConsecutiveDeclarations: 'true' AlignConsecutiveDeclarations: 'true'
AlignOperands: 'true' AlignOperands: 'true'
AllowAllParametersOfDeclarationOnNextLine: 'false' AllowAllParametersOfDeclarationOnNextLine: 'false'
AllowShortCaseLabelsOnASingleLine: 'false'
AllowShortFunctionsOnASingleLine: Empty
AllowShortLoopsOnASingleLine: 'false'
AlwaysBreakAfterDefinitionReturnType: None AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: 'false' AlwaysBreakBeforeMultilineStrings: 'false'
@@ -23,7 +20,6 @@ SortIncludes: 'false'
SpaceBeforeAssignmentOperators: 'true' SpaceBeforeAssignmentOperators: 'true'
SpaceBeforeParens: ControlStatements SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: 'false' SpaceInEmptyParentheses: 'false'
SpacesBeforeTrailingComments: 1
TabWidth: '4' TabWidth: '4'
UseTab: Never UseTab: Never
-4
View File
@@ -1,4 +0,0 @@
CompileFlags:
Add: [-Wno-unknown-attributes, -Wno-maybe-uninitialized, -Wno-unknown-warning-option]
Remove: [-W*, -mmcu=*, -mcpu=*, -mfpu=*, -mfloat-abi=*, -mno-unaligned-access, -mno-thumb-interwork, -mcall-prologues]
Compiler: clang
+24 -25
View File
@@ -4,40 +4,39 @@
root = true root = true
[*] [*]
end_of_line = lf
indent_style = space indent_style = space
indent_size = 4 indent_size = 4
# We recommend you to keep these unchanged
charset = utf-8 charset = utf-8
trim_trailing_whitespace = true trim_trailing_whitespace = true
insert_final_newline = true insert_final_newline = true
# To match GitHub Actions formatting
[*.{yaml,yml}]
indent_size = 2
[*.md] [*.md]
trim_trailing_whitespace = false trim_trailing_whitespace = false
indent_size = 4
[{Makefile,*.mk}] [{qmk,*.py}]
charset = utf-8
max_line_length = 200
# Make these match what we have in .gitattributes
[*.mk]
end_of_line = lf
indent_style = tab indent_style = tab
# Don't override anything in `lib/`... [Makefile]
[lib/**]
indent_style = unset
indent_size = unset
tab_width = unset
end_of_line = unset
charset = unset
spelling_language = unset
trim_trailing_whitespace = unset
insert_final_newline = unset
# ...except QMK's `lib/python`.
[{*.py,lib/python/**.py}]
end_of_line = lf end_of_line = lf
indent_style = space indent_style = tab
indent_size = 4
charset = utf-8 [*.sh]
trim_trailing_whitespace = true end_of_line = lf
insert_final_newline = true
max_line_length = 200 # The gitattributes file will handle the line endings conversion properly according to the operating system settings for other files
# We don't have gitattributes properly for these
# So if the user have for example core.autocrlf set to true
# the line endings would be wrong.
[lib/**]
end_of_line = unset
+56 -57
View File
@@ -2,70 +2,69 @@
* text=auto * text=auto
# sources # sources
*.c text eol=lf *.c text
*.cc text eol=lf *.cc text
*.cxx text eol=lf *.cxx text
*.cpp text eol=lf *.cpp text
*.c++ text eol=lf *.c++ text
*.hpp text eol=lf *.hpp text
*.h text eol=lf *.h text
*.h++ text eol=lf *.h++ text
*.hh text eol=lf *.hh text
*.bat text eol=crlf *.bat text
*.cmd text eol=crlf *.coffee text
*.coffee text eol=lf *.css text
*.css text eol=lf *.htm text
*.htm text eol=lf *.html text
*.html text eol=lf *.inc text
*.inc text eol=lf *.ini text
*.ini text eol=crlf *.js text
*.js text eol=lf *.jsx text
*.jsx text eol=lf *.json text
*.json text eol=lf *.less text
*.less text eol=lf *.php text
*.php text eol=lf *.pl text
*.pl text eol=lf *.py text
*.py text eol=lf *.rb text
*.rb text eol=lf *.sass text
*.sass text eol=lf *.scm text
*.scm text eol=lf *.scss text
*.scss text eol=lf *.sh text
*.sh text eol=lf *.sql text
*.sql text eol=lf *.styl text
*.styl text eol=lf *.ts text
*.ts text eol=lf *.xml text
*.xml text eol=lf *.xhtml text
*.xhtml text eol=lf
# make files (need to always use lf for compatibility with Windows 10 bash) # make files (need to always use lf for compatibility with Windows 10 bash)
Makefile eol=lf Makefile eol=lf
*.mk eol=lf *.mk eol=lf
# make files (need to always use lf for compatibility with Windows 10 bash) # make files (need to always use lf for compatibility with Windows 10 bash)
*.sh eol=lf *.sh eol=lf
# documentation # documentation
*.markdown text eol=lf *.markdown text
*.md text eol=lf *.md text
*.mdwn text eol=lf *.mdwn text
*.mdown text eol=lf *.mdown text
*.mkd text eol=lf *.mkd text
*.mkdn text eol=lf *.mkdn text
*.mdtxt text eol=lf *.mdtxt text
*.mdtext text eol=lf *.mdtext text
*.txt text eol=lf *.txt text
AUTHORS text eol=lf AUTHORS text
CHANGELOG text eol=lf CHANGELOG text
CHANGES text eol=lf CHANGES text
CONTRIBUTING text eol=lf CONTRIBUTING text
COPYING text eol=lf COPYING text
INSTALL text eol=lf INSTALL text
license text eol=lf license text
LICENSE text eol=lf LICENSE text
NEWS text eol=lf NEWS text
readme text eol=lf readme text
*README* text eol=lf *README* text
TODO text eol=lf TODO text
GRAPHICS GRAPHICS
*.ai binary *.ai binary
@@ -83,7 +82,7 @@ GRAPHICS
*.png binary *.png binary
*.psb binary *.psb binary
*.psd binary *.psd binary
*.svg text eol=lf *.svg text
*.svgz binary *.svgz binary
*.tif binary *.tif binary
*.tiff binary *.tiff binary
+37
View File
@@ -0,0 +1,37 @@
---
name: Bug report
about: Create a report to help us improve QMK Firmware.
title: "[Bug] "
labels: bug, help wanted
assignees: ''
---
<!-- Provide a general summary of the bug in the title above. -->
<!--- This template is entirely optional and can be removed, but is here to help both you and us. -->
<!--- Anything on lines wrapped in comments like these will not show up in the final text. -->
## Describe the Bug
<!-- A clear and concise description of what the bug is. -->
## System Information
- Keyboard:
- Revision (if applicable):
- Operating system:
- AVR GCC version:
<!-- Run `avr-gcc --version` to find this out. -->
- ARM GCC version:
<!-- Run `arm-none-eabi-gcc --version` to find this out. -->
- QMK Firmware version:
<!-- Run `git describe --abbrev=0 --tags` to find this out. -->
- Any keyboard related software installed?
- [ ] AutoHotKey
- [ ] Karabiner
- [ ] Other:
## Additional Context
<!-- Add any other relevant information about the problem here. -->
-41
View File
@@ -1,41 +0,0 @@
name: Bug report
description: Create a report to help us improve QMK Firmware.
title: "[Bug] "
labels: ["bug", "help wanted"]
body:
- type: markdown
attributes:
value: |
Provide a general summary of the bug in the title above.
- type: textarea
attributes:
label: Describe the Bug
description: A clear and concise description of what the bug is.
- type: input
attributes:
label: Keyboard Used
description: The name of the keyboard from the `make` or `qmk compile`/`qmk flash` commands, eg. `planck/rev6`.
- type: input
attributes:
label: Link to product page (if applicable)
- type: input
attributes:
label: Operating System
- type: textarea
attributes:
label: qmk doctor Output
description: Output from running the `qmk doctor` command.
render: text
- type: checkboxes
attributes:
label: Is AutoHotKey / Karabiner installed
options:
- label: AutoHotKey (Windows)
- label: Karabiner (macOS)
- type: input
attributes:
label: Other keyboard-related software installed
- type: textarea
attributes:
label: Additional Context
description: Add any other relevant information about the problem here.
+1 -1
View File
@@ -1,7 +1,7 @@
blank_issues_enabled: false blank_issues_enabled: false
contact_links: contact_links:
- name: QMK Discord - name: QMK Discord
url: https://discord.gg/qmk url: https://discord.gg/Uq7gcHh
about: Ask questions, discuss issues and features. Chill. about: Ask questions, discuss issues and features. Chill.
- name: OLKB Subreddit - name: OLKB Subreddit
url: https://www.reddit.com/r/olkb url: https://www.reddit.com/r/olkb
+24
View File
@@ -0,0 +1,24 @@
---
name: Feature request
about: Suggest a new feature or changes to existing features.
title: "[Feature Request] "
labels: enhancement, help wanted
assignees: ''
---
<!--- Provide a general summary of the changes you want in the title above. -->
<!--- This template is entirely optional and can be removed, but is here to help both you and us. -->
<!--- Anything on lines wrapped in comments like these will not show up in the final text. -->
## Feature Request Type
- [ ] Core functionality
- [ ] Add-on hardware support (eg. audio, RGB, OLED screen, etc.)
- [ ] Alteration (enhancement/optimization) of existing feature(s)
- [ ] New behavior
## Description
<!-- A few sentences describing what it is that you'd like to see in QMK. Additional information (such as links to spec sheets, licensing info, other related issues or PRs, etc) would be helpful. -->
@@ -1,24 +0,0 @@
name: Feature request
description: Suggest a new feature or changes to existing features.
title: "[Feature Request] "
labels: ["enhancement", "help wanted"]
body:
- type: markdown
attributes:
value: |
Provide a general summary of the changes you want in the title above.
Please refrain from asking maintainers to add support for specific keyboards -- it is unlikely they will have hardware available, and will not be able to help.
Your best bet is to take the initiative, add support, then submit a PR yourself.
- type: checkboxes
attributes:
label: Feature Request Type
options:
- label: Core functionality
- label: Add-on hardware support (eg. audio, RGB, OLED screen, etc.)
- label: Alteration (enhancement/optimization) of existing feature(s)
- label: New behavior
- type: textarea
attributes:
label: Description
description: A few sentences describing what it is that you'd like to see in QMK. Additional information (such as links to spec sheets, licensing info, other related issues or PRs, etc) would be helpful.
+14
View File
@@ -0,0 +1,14 @@
---
name: Other issues
about: Anything else that doesn't fall into the above categories.
title: ''
labels: help wanted, question
assignees: ''
---
<!--- Provide a general summary of the changes you want in the title above. -->
<!--- Anything on lines wrapped in comments like these will not show up in the final text. -->
<!-- Please check https://docs.qmk.fm/#/support for additional resources first. If that doesn't answer your question, choose the bug report template instead, as that may be more appropriate. -->
-19
View File
@@ -1,19 +0,0 @@
name: Other issues
description: Anything else that doesn't fall into the above categories.
labels: ["help wanted", "question"]
body:
- type: markdown
attributes:
value: |
Provide a general summary of the changes you want in the title above.
- type: markdown
attributes:
value: |
Please check [https://docs.qmk.fm/#/support](https://docs.qmk.fm/#/support) for additional resources first. If that doesn't answer your question, choose the bug report template instead, as that may be more appropriate.
Please refrain from asking maintainers to add support for specific keyboards -- it is unlikely they will have hardware available, and will not be able to help.
Your best bet is to take the initiative, add support, then submit a PR yourself.
- type: textarea
attributes:
label: Issue Description
description: Describe your issue in as much detail as possible.
+2 -1
View File
@@ -1,5 +1,6 @@
<!--- Provide a general summary of your changes in the title above. --> <!--- Provide a general summary of your changes in the title above. -->
<!--- This template is entirely optional and can be removed, but is here to help both you and us. -->
<!--- Anything on lines wrapped in comments like these will not show up in the final text. --> <!--- Anything on lines wrapped in comments like these will not show up in the final text. -->
## Description ## Description
@@ -14,7 +15,7 @@
- [ ] New feature - [ ] New feature
- [ ] Enhancement/optimization - [ ] Enhancement/optimization
- [ ] Keyboard (addition or update) - [ ] Keyboard (addition or update)
- [ ] Keymap/layout (addition or update) - [ ] Keymap/layout/userspace (addition or update)
- [ ] Documentation - [ ] Documentation
## Issues Fixed or Closed by This PR ## Issues Fixed or Closed by This PR
-9
View File
@@ -1,9 +0,0 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
labels: CI
reviewers:
- "qmk/collaborators"
schedule:
interval: "daily"
+33 -47
View File
@@ -1,56 +1,42 @@
core: core:
- changed-files: - quantum/**/*
- any-glob-to-any-file: - tmk_core/**/*
- quantum/** - drivers/**/*
- tmk_core/** - tests/**/*
- drivers/** - util/**/*
- tests/** - platforms/**/*
- util/** - Makefile
- platforms/** - '*.mk'
- builddefs/*.mk
- Makefile
- '*.mk'
dependencies: dependencies:
- changed-files: - any:
- all-globs-to-any-file: - 'lib/**/*'
- lib/** - '!lib/python/**/*'
- '!lib/python/**'
keyboard: keyboard:
- changed-files: - any:
- all-globs-to-any-file: - 'keyboards/**/*'
- keyboards/** - '!keyboards/**/keymaps/**/*'
- '!keyboards/**/keymaps/**'
keymap: keymap:
- changed-files: - users/**/*
- any-glob-to-any-file: - layouts/**/*
- users/** - keyboards/**/keymaps/**/*
- layouts/**
- keyboards/**/keymaps/**
via: via:
- changed-files: - keyboards/**/keymaps/via/*
- any-glob-to-any-file:
- keyboards/**/keymaps/via/*
cli: cli:
- changed-files: - bin/qmk
- any-glob-to-any-file: - requirements.txt
- requirements.txt - lib/python/**/*
- lib/python/**
python: python:
- changed-files: - '**/*.py'
- any-glob-to-any-file:
- '**/*.py'
documentation: documentation:
- changed-files: - docs/**/*
- any-glob-to-any-file: translation:
- docs/** - docs/fr-fr/**/*
- builddefs/docsgen/** - docs/es/**/*
- docs/ja/**/*
- docs/he-il/**/*
- docs/pt-br/**/*
- docs/zh-cn/**/*
- docs/de/**/*
- docs/ru-ru/**/*
CI: CI:
- changed-files: - .github/**/*
- any-glob-to-any-file:
- .github/**
dd:
- changed-files:
- any-glob-to-any-file:
- data/constants/**
- data/mappings/**
- data/schemas/**
+58
View File
@@ -0,0 +1,58 @@
# Configuration for probot-stale - https://github.com/probot/stale
# General configuration
# Pull request specific configuration
pulls:
staleLabel: awaiting changes
# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 45
# Number of days of inactivity before a stale Issue or Pull Request is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 30
# Comment to post when marking as stale. Set to `false` to disable
markComment: >
Thank you for your contribution!
This pull request has been automatically marked as stale because it has not had
activity in the last 45 days. It will be closed in 30 days if no further activity occurs.
Please feel free to give a status update now, or re-open when it's ready.
For maintainers: Please label with `awaiting review`, `breaking_change`, `in progress`, or `on hold` to prevent
the issue from being re-flagged.
# Comment to post when closing a stale Issue or Pull Request.
closeComment: >
Thank you for your contribution!
This pull request has been automatically closed because it has not had activity in the last 30 days.
Please feel free to give a status update now, ping for review, or re-open when it's ready.
# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30
exemptLabels:
- awaiting review
- breaking_change
- in progress
- on hold
# Issue specific configuration
issues:
staleLabel: stale
limitPerRun: 10
daysUntilStale: 90
daysUntilClose: 30
markComment: >
This issue has been automatically marked as stale because it has not had activity in the
last 90 days. It will be closed in the next 30 days unless it is tagged properly or other activity
occurs.
For maintainers: Please label with `bug`, `in progress`, `on hold`, `discussion` or `to do` to prevent
the issue from being re-flagged.
closeComment: >
This issue has been automatically closed because it has not had activity in the last 30 days.
If this issue is still valid, re-open the issue and let us know.
exemptLabels:
- bug
- in progress
- on hold
- discussion
- to do
+6 -19
View File
@@ -1,50 +1,37 @@
name: Update API Data name: Update API Data
permissions:
contents: read
on: on:
push: push:
branches: branches:
- master - master
- develop
paths: paths:
- 'keyboards/**' - 'keyboards/**'
- 'layouts/community/**' - 'layouts/community/**'
- 'lib/python/**'
- 'data/**'
- '.github/workflows/api.yml'
workflow_dispatch:
jobs: jobs:
api_data: api_data:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: ghcr.io/qmk/qmk_cli container: qmkfm/base_container
# protect against those who work in their fork on 'important' branches # protect against those who develop with their fork on master
if: github.repository == 'qmk/qmk_firmware' if: github.repository == 'qmk/qmk_firmware'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v2
with: with:
fetch-depth: 1 fetch-depth: 1
persist-credentials: false persist-credentials: false
- name: Install dependencies
run: |
pip3 install -r requirements-dev.txt
- name: Generate API Data - name: Generate API Data
run: | run: qmk generate-api
qmk generate-api
- name: Upload API Data - name: Upload API Data
uses: jakejarvis/s3-sync-action@master uses: jakejarvis/s3-sync-action@master
with: with:
args: --acl public-read --follow-symlinks --delete args: --acl public-read --follow-symlinks --delete
env: env:
AWS_S3_BUCKET: ${{ github.ref == 'refs/heads/develop' && secrets['API_SPACE_DEVELOP'] || secrets['API_SPACE_MASTER'] }} AWS_S3_BUCKET: ${{ secrets.API_SPACE_MASTER }}
AWS_ACCESS_KEY_ID: ${{ secrets.SPACES_ACCESS_KEY }} AWS_ACCESS_KEY_ID: ${{ secrets.SPACES_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SPACES_SECRET_KEY }} AWS_SECRET_ACCESS_KEY: ${{ secrets.SPACES_SECRET_KEY }}
AWS_S3_ENDPOINT: https://nyc3.digitaloceanspaces.com AWS_S3_ENDPOINT: https://nyc3.digitaloceanspaces.com
SOURCE_DIR: '.build/api_data' SOURCE_DIR: 'api_data'
-20
View File
@@ -1,20 +0,0 @@
name: Automatic Approve
permissions: {}
on:
schedule:
- cron: "*/5 * * * *"
jobs:
automatic_approve:
runs-on: ubuntu-latest
if: github.repository == 'qmk/qmk_firmware'
steps:
- uses: zvecr/automatic-approve-action@safe_files
with:
token: ${{ secrets.QMK_BOT_TOKEN }}
workflows: "labeler.yml,lint.yml,docs.yml"
safe_files: "keyboards/,docs/"
+33
View File
@@ -0,0 +1,33 @@
name: Essential files modified
on:
push:
branches:
- master
paths:
- quantum/**/*
- tmk_core/**/*
- drivers/**/*
- tests/**/*
- util/**/*
- platforms/**/*
- Makefile
- '*.mk'
jobs:
tag:
runs-on: ubuntu-latest
# protect against those who develop with their fork on master
if: github.repository == 'qmk/qmk_firmware'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Bump version and push tag
uses: anothrNick/github-tag-action@1.26.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BUMP: 'patch'
-38
View File
@@ -1,38 +0,0 @@
name: Essential files modified
permissions:
contents: write
on:
workflow_dispatch:
push:
branches:
- master
paths:
- builddefs/**/*
- drivers/**/*
- platforms/**/*
- quantum/**/*
- tests/**/*
- tmk_core/**/*
- util/**/*
- Makefile
- '*.mk'
jobs:
tag:
runs-on: ubuntu-latest
# protect against those who develop with their fork on master
if: github.repository == 'qmk/qmk_firmware'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Bump version and push tag
uses: anothrNick/github-tag-action@1.66.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BUMP: 'patch'
-139
View File
@@ -1,139 +0,0 @@
name: CI Build Major Branch
permissions:
contents: read
actions: write
on:
push:
branches: [master, develop]
workflow_dispatch:
inputs:
branch:
type: choice
description: "Branch to build"
options: [master, develop]
env:
# https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#usage-limits
# We've decreased it from 20 to 15 to allow for other GHA to run unimpeded
CONCURRENT_JOBS: 15
# Ensure we only have one build running at a time, cancelling any active builds if a new commit is pushed to the respective branch
concurrency:
group: ci_build-${{ github.event.inputs.branch || github.ref_name }}
cancel-in-progress: true
jobs:
determine_concurrency:
name: "Determine concurrency"
if: github.repository == 'qmk/qmk_firmware'
runs-on: ubuntu-latest
container: ghcr.io/qmk/qmk_cli
outputs:
slice_length: ${{ steps.generate_slice_length.outputs.slice_length }}
steps:
- name: Install prerequisites
run: |
apt-get update
apt-get install -y jq
- name: Disable safe.directory check
run: |
git config --global --add safe.directory '*'
- name: Checkout QMK Firmware
uses: actions/checkout@v4
- name: Determine concurrency
id: generate_slice_length
run: |
target_count=$( {
qmk find -km default 2>/dev/null
# qmk find -km xap 2>/dev/null
} | sort | uniq | wc -l)
slice_length=$((target_count / ($CONCURRENT_JOBS - 1))) # Err on the side of caution
echo "slice_length=$slice_length" >> $GITHUB_OUTPUT
build_targets:
name: "Compile keymap ${{ matrix.keymap }}"
needs: determine_concurrency
strategy:
fail-fast: false
matrix:
keymap: [default]
# keymap: [default, xap]
uses: ./.github/workflows/ci_build_major_branch_keymap.yml
with:
branch: ${{ inputs.branch || github.ref_name }}
keymap: ${{ matrix.keymap }}
slice_length: ${{ needs.determine_concurrency.outputs.slice_length }}
secrets: inherit
rollup_tasks:
name: "Consolidation"
needs: build_targets
runs-on: ubuntu-latest
steps:
- name: Disable safe.directory check
run: |
git config --global --add safe.directory '*'
- name: Checkout QMK Firmware
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download firmwares
uses: actions/download-artifact@v4
with:
pattern: firmware-*
path: .
merge-multiple: true
- name: Generate index page
run: |
python3 -m pip install -r ./util/ci/requirements.txt
./util/ci/index_generator.py > index.html
./util/ci/firmware_list_generator.py > firmware_list.json
- name: Upload to https://ci.qmk.fm/${{ inputs.branch || github.ref_name }}/${{ github.sha }}
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete --exclude '*' --include 'index.html' --include 'firmware_list.json' --include '*.hex' --include '*.bin' --include '*.uf2'
env:
AWS_S3_BUCKET: ${{ vars.CI_QMK_FM_SPACES_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.CI_QMK_FM_SPACES_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_QMK_FM_SPACES_SECRET }}
AWS_REGION: ${{ vars.CI_QMK_FM_SPACES_REGION }}
AWS_S3_ENDPOINT: ${{ vars.CI_QMK_FM_SPACES_ENDPOINT }}
SOURCE_DIR: .
DEST_DIR: ${{ inputs.branch || github.ref_name }}/${{ github.sha }}
- name: Upload to https://ci.qmk.fm/${{ inputs.branch || github.ref_name }}/latest
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete --exclude '*' --include 'index.html' --include 'firmware_list.json' --include '*.hex' --include '*.bin' --include '*.uf2'
env:
AWS_S3_BUCKET: ${{ vars.CI_QMK_FM_SPACES_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.CI_QMK_FM_SPACES_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_QMK_FM_SPACES_SECRET }}
AWS_REGION: ${{ vars.CI_QMK_FM_SPACES_REGION }}
AWS_S3_ENDPOINT: ${{ vars.CI_QMK_FM_SPACES_ENDPOINT }}
SOURCE_DIR: .
DEST_DIR: ${{ inputs.branch || github.ref_name }}/latest
- name: Check if failure marker file exists
id: check_failure_marker
uses: andstor/file-existence-action@v3
with:
files: ./.failed
- name: Fail build if needed
if: steps.check_failure_marker.outputs.files_exists == 'true'
run: |
# Exit with failure if the compilation stage failed
exit 1
@@ -1,181 +0,0 @@
name: CI Build Major Branch Keymap
permissions:
contents: read
actions: write
on:
workflow_call:
inputs:
branch:
type: string
required: true
keymap:
type: string
required: true
slice_length:
type: string
required: true
jobs:
generate_targets:
name: "Generate targets (${{ inputs.keymap }})"
runs-on: ubuntu-latest
container: ghcr.io/qmk/qmk_cli
outputs:
targets: ${{ steps.generate_targets.outputs.targets }}
steps:
- name: Install prerequisites
run: |
apt-get update
apt-get install -y jq
- name: Disable safe.directory check
run: |
git config --global --add safe.directory '*'
- name: Checkout QMK Firmware
uses: actions/checkout@v4
- name: Generate build targets
id: generate_targets
run: |
{ # Intentionally use `shuf` here so that we share manufacturers across all build groups -- some have a lot of ARM-based boards which inherently take longer
counter=0
echo -n '{'
qmk find -km ${{ inputs.keymap }} 2>/dev/null | sort | uniq | shuf | xargs -L${{ inputs.slice_length }} | while IFS=$'\n' read target ; do
if [ $counter -gt 0 ]; then
echo -n ','
fi
counter=$((counter+1))
printf "\"group %02d\":{" $counter
echo -n '"targets":"'
echo $target | tr ' ' '\n' | sort | uniq | xargs echo -n
echo -n '"}'
done
echo -n '}'
} | sed -e 's@\n@@g' > targets.json
# Output the target keys as a variable
echo "targets=$(jq -c 'keys' targets.json)" >> $GITHUB_OUTPUT
- name: Upload targets json
uses: actions/upload-artifact@v4
with:
name: targets-${{ inputs.keymap }}
path: targets.json
build_targets:
name: "Compile ${{ matrix.target }} (${{ inputs.keymap }})"
needs: generate_targets
runs-on: ubuntu-latest
container: ghcr.io/qmk/qmk_cli
continue-on-error: true
strategy:
matrix:
target: ${{ fromJson(needs.generate_targets.outputs.targets) }}
steps:
- name: Install prerequisites
run: |
apt-get update
apt-get install -y jq
- name: Disable safe.directory check
run: |
git config --global --add safe.directory '*'
- name: Checkout QMK Firmware
uses: actions/checkout@v4
- name: Get target definitions
uses: actions/download-artifact@v4
with:
name: targets-${{ inputs.keymap }}
path: .
- name: Deploy submodules
run: |
qmk git-submodule -f
- name: Dump targets
run: |
jq -r '.["${{ matrix.target }}"].targets' targets.json | tr ' ' '\n' | sort
- name: Build targets
continue-on-error: true
run: |
export NCPUS=$(( $(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null) -1 ))
qmk mass-compile -t -j $NCPUS -e DUMP_CI_METADATA=yes $(jq -r '.["${{ matrix.target }}"].targets' targets.json) || touch .failed
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: firmware-${{ inputs.keymap }}-${{ matrix.target }}
if-no-files-found: ignore
path: |
*.bin
*.hex
*.uf2
.build/failed.*
.failed
- name: Fail build if any group failed
run: |
# Exit with failure if the compilation stage failed
[ ! -f .failed ] || exit 1
repack_firmware:
if: always()
name: "Repack artifacts"
needs: build_targets
runs-on: ubuntu-latest
steps:
- name: Checkout QMK Firmware
uses: actions/checkout@v4
- name: Download firmwares
uses: actions/download-artifact@v4
with:
pattern: firmware-${{ inputs.keymap }}-*
path: .
merge-multiple: true
- name: Upload all firmwares
uses: actions/upload-artifact@v4
with:
name: firmware-${{ inputs.keymap }}
if-no-files-found: ignore
path: |
*.bin
*.hex
*.uf2
.build/failed.*
.failed
- name: Generate output logs
run: |
# 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
- name: Delete temporary build artifacts
uses: geekyeggo/delete-artifact@v5
with:
name: |
firmware-${{ inputs.keymap }}-*
targets-${{ inputs.keymap }}
- name: 'CI Discord Notification'
if: always() && !cancelled()
working-directory: util/ci/
env:
DISCORD_WEBHOOK: ${{ secrets.CI_DISCORD_WEBHOOK }}
run: |
python3 -m pip install -r requirements.txt
python3 ./discord-results.py --branch ${{ inputs.branch || github.ref_name }} --sha $(git rev-parse HEAD) --keymap ${{ inputs.keymap }} --url ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
+5 -11
View File
@@ -1,16 +1,14 @@
name: CLI CI name: CLI CI
permissions:
contents: read
on: on:
push: push:
branches: branches:
- master - master
- develop - future
pull_request: pull_request:
paths: paths:
- 'lib/python/**' - 'lib/python/**'
- 'bin/qmk'
- 'requirements.txt' - 'requirements.txt'
- '.github/workflows/cli.yml' - '.github/workflows/cli.yml'
@@ -18,17 +16,13 @@ jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: ghcr.io/qmk/qmk_cli container: qmkfm/base_container
steps: steps:
- name: Disable safe.directory check - uses: actions/checkout@v2
run : git config --global --add safe.directory '*'
- uses: actions/checkout@v4
with: with:
submodules: recursive submodules: recursive
- name: Install dependencies - name: Install dependencies
run: pip3 install -r requirements-dev.txt run: pip3 install -r requirements-dev.txt
- name: Run tests - name: Run tests
run: qmk pytest run: bin/qmk pytest
+37
View File
@@ -0,0 +1,37 @@
name: Update Develop API Data
on:
push:
branches:
- develop
paths:
- 'keyboards/**'
- 'layouts/community/**'
jobs:
api_data:
runs-on: ubuntu-latest
container: qmkfm/base_container
# protect against those who work in their fork on develop
if: github.repository == 'qmk/qmk_firmware'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
persist-credentials: false
- name: Generate API Data
run: qmk generate-api
- name: Upload API Data
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.API_SPACE_DEVELOP }}
AWS_ACCESS_KEY_ID: ${{ secrets.SPACES_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SPACES_SECRET_KEY }}
AWS_S3_ENDPOINT: https://nyc3.digitaloceanspaces.com
SOURCE_DIR: 'api_data'
+9 -9
View File
@@ -1,13 +1,11 @@
name: Update develop after master merge name: Update develop after master merge
permissions:
contents: write
on: on:
push: push:
branches: branches:
- master - master
jobs: jobs:
develop_update: develop_update:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -15,21 +13,23 @@ jobs:
if: github.repository == 'qmk/qmk_firmware' if: github.repository == 'qmk/qmk_firmware'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v2
with: with:
token: ${{ secrets.QMK_BOT_TOKEN }}
fetch-depth: 0 fetch-depth: 0
- name: Disable automatic eol conversion
run: |
echo "* -text" > .git/info/attributes
- name: Checkout develop - name: Checkout develop
run: | run: |
git fetch origin master develop git fetch origin master develop
git checkout develop git checkout develop
- name: Check if branch locked
id: check_locked
uses: andstor/file-existence-action@v1
with:
files: ".locked"
- name: Update develop from master - name: Update develop from master
if: steps.check_locked.outputs.files_exists == 'false'
run: | run: |
git config --global user.name "QMK Bot" git config --global user.name "QMK Bot"
git config --global user.email "hello@qmk.fm" git config --global user.email "hello@qmk.fm"
+13 -35
View File
@@ -1,65 +1,43 @@
name: Generate Docs name: Generate Docs
permissions:
contents: write
on: on:
push: push:
branches: branches:
- master - master
paths: paths:
- 'builddefs/docsgen/**'
- 'tmk_core/**' - 'tmk_core/**'
- 'quantum/**' - 'quantum/**'
- 'platforms/**' - 'platforms/**'
- 'docs/**' - 'docs/**'
- '.github/workflows/docs.yml' - '.github/workflows/docs.yml'
pull_request:
paths:
- 'builddefs/docsgen/**'
- 'docs/**'
- '.github/workflows/docs.yml'
defaults:
run:
shell: bash
jobs: jobs:
generate: generate:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: ghcr.io/qmk/qmk_cli container: qmkfm/base_container
# protect against those who develop with their fork on master
if: github.repository == 'qmk/qmk_firmware'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v2
with: with:
fetch-depth: 1 fetch-depth: 1
- name: Install dependencies - name: Install dependencies
run: | run: |
apt-get update && apt-get install -y rsync doxygen apt-get update && apt-get install -y rsync nodejs npm doxygen
# install nvm npm install -g moxygen
touch $HOME/.bashrc
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
- name: Install node
run: |
source $HOME/.bashrc
nvm install 20
nvm use 20
corepack enable
- name: Build docs - name: Build docs
run: | run: |
source $HOME/.bashrc
nvm use 20
qmk --verbose generate-docs qmk --verbose generate-docs
- name: Deploy - name: Deploy
if: ${{ github.event_name == 'push' && github.repository == 'qmk/qmk_firmware' }} uses: JamesIves/github-pages-deploy-action@3.7.1
uses: JamesIves/github-pages-deploy-action@v4.6.8
with: with:
token: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages BASE_BRANCH: master
folder: .build/docs BRANCH: gh-pages
git-config-name: QMK Bot FOLDER: .build/docs
git-config-email: hello@qmk.fm GIT_CONFIG_EMAIL: hello@qmk.fm
@@ -1,43 +0,0 @@
name: Update feature branches after develop merge
permissions:
contents: write
on:
push:
branches:
- develop
jobs:
feature_branch_update:
runs-on: ubuntu-latest
if: github.repository == 'qmk/qmk_firmware'
strategy:
matrix:
branch:
- xap
- riot
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.QMK_BOT_TOKEN }}
fetch-depth: 0
- name: Disable automatic eol conversion
run: |
echo "* -text" > .git/info/attributes
- name: Checkout branch
run: |
git fetch origin develop ${{ matrix.branch }}
git checkout ${{ matrix.branch }}
- name: Update branch from develop
run: |
git config --global user.name "QMK Bot"
git config --global user.email "hello@qmk.fm"
git merge origin/develop
git push origin ${{ matrix.branch }}
+42
View File
@@ -0,0 +1,42 @@
name: PR Lint Format
on:
pull_request:
paths:
- 'drivers/**'
- 'lib/arm_atsam/**'
- 'lib/lib8tion/**'
- 'lib/python/**'
- 'platforms/**'
- 'quantum/**'
- 'tests/**'
- 'tmk_core/**'
jobs:
lint:
runs-on: ubuntu-latest
container: qmkfm/base_container
steps:
- uses: rlespinasse/github-slug-action@v3.x
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: trilom/file-changes-action@v1.2.4
id: file_changes
with:
output: ' '
fileOutput: ' '
- name: Run qmk cformat and qmk pyformat
shell: 'bash {0}'
run: |
qmk cformat --core-only -n $(< ~/files.txt)
cformat_exit=$?
qmk pyformat -n
pyformat_exit=$?
exit $((cformat_exit + pyformat_exit))
-57
View File
@@ -1,57 +0,0 @@
name: PR Lint Format
permissions:
contents: read
on:
pull_request:
paths:
- 'drivers/**'
- 'lib/arm_atsam/**'
- 'lib/lib8tion/**'
- 'lib/python/**'
- 'platforms/**'
- 'quantum/**'
- 'tests/**'
- 'tmk_core/**'
jobs:
lint:
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@v4
with:
fetch-depth: 0
- name: Install dependencies
run: |
pip3 install -r requirements-dev.txt
- name: Get changed files
id: file_changes
uses: tj-actions/changed-files@v45
with:
use_rest_api: true
- name: Run qmk formatters
shell: 'bash {0}'
run: |
echo '${{ steps.file_changes.outputs.added_files}}' '${{ steps.file_changes.outputs.modified_files}}' > ~/files_changed.txt
qmk format-c --core-only $(< ~/files_changed.txt) || true
qmk format-python $(< ~/files_changed.txt) || true
qmk format-text $(< ~/files_changed.txt) || true
- name: Fail when formatting required
run: |
git diff
for file in $(git diff --name-only); do
echo "File '${file}' Requires Formatting"
echo "::error file=${file}::Requires Formatting"
done
test -z "$(git diff --name-only)"
-59
View File
@@ -1,59 +0,0 @@
name: Lint Format
permissions:
contents: read
on:
push:
branches:
- master
- develop
jobs:
lint:
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@v4
with:
fetch-depth: 0
- name: Disable automatic eol conversion
run: |
echo "* -text" > .git/info/attributes
- name: Install dependencies
run: |
pip3 install -r requirements-dev.txt
- name: Run qmk formatters
shell: 'bash {0}'
run: |
qmk format-c -a
qmk format-python -a
qmk format-text -a
git diff
- uses: rlespinasse/github-slug-action@v3.x
- name: Become QMK Bot
run: |
git config user.name 'QMK Bot'
git config user.email 'hello@qmk.fm'
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
if: ${{ github.repository == 'qmk/qmk_firmware'}}
with:
token: ${{ secrets.QMK_BOT_TOKEN }}
delete-branch: true
branch: bugfix/format_${{ env.GITHUB_REF_SLUG }}
author: QMK Bot <hello@qmk.fm>
committer: QMK Bot <hello@qmk.fm>
commit-message: Format code according to conventions
title: '[CI] Format code according to conventions'
+6 -5
View File
@@ -1,13 +1,14 @@
name: "Pull Request Labeler" name: "Pull Request Labeler"
on: on:
- pull_request_target pull_request_target:
types: [opened, synchronize, reopened, ready_for_review, locked]
jobs: jobs:
triage: triage:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/labeler@v5 - uses: actions/labeler@main
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: '.github/labeler.yml'

Some files were not shown because too many files have changed in this diff Show More