Skip to content

Commit

Permalink
Merge branch 'qmk:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
omikronik authored Aug 18, 2024
2 parents 35bf74f + 1355eb4 commit c6aeb99
Show file tree
Hide file tree
Showing 267 changed files with 8,603 additions and 2,904 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
blank_issues_enabled: false
contact_links:
- name: QMK Discord
url: https://discord.gg/Uq7gcHh
url: https://discord.gg/qmk
about: Ask questions, discuss issues and features. Chill.
- name: OLKB Subreddit
url: https://www.reddit.com/r/olkb
Expand Down
82 changes: 46 additions & 36 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,56 @@
core:
- quantum/**/*
- tmk_core/**/*
- drivers/**/*
- tests/**/*
- util/**/*
- platforms/**/*
- builddefs/**/*
- Makefile
- '*.mk'
- changed-files:
- any-glob-to-any-file:
- quantum/**
- tmk_core/**
- drivers/**
- tests/**
- util/**
- platforms/**
- builddefs/*.mk
- Makefile
- '*.mk'
dependencies:
- any:
- 'lib/**/*'
- '!lib/python/**/*'
- all:
- changed-files:
- any-glob-to-any-file: lib/**
- all-globs-to-all-files: '!lib/python/**'
keyboard:
- any:
- 'keyboards/**/*'
- '!keyboards/**/keymaps/**/*'
- all:
- changed-files:
- any-glob-to-any-file: keyboards/**
- all-globs-to-all-files: '!keyboards/**/keymaps/**'
keymap:
- users/**/*
- layouts/**/*
- keyboards/**/keymaps/**/*
- changed-files:
- any-glob-to-any-file:
- users/**
- layouts/**
- keyboards/**/keymaps/**
via:
- keyboards/**/keymaps/via/*
- changed-files:
- any-glob-to-any-file:
- keyboards/**/keymaps/via/*
cli:
- requirements.txt
- lib/python/**/*
- changed-files:
- any-glob-to-any-file:
- requirements.txt
- lib/python/**
python:
- '**/*.py'
- changed-files:
- any-glob-to-any-file:
- '**/*.py'
documentation:
- docs/**/*
translation:
- docs/fr-fr/**/*
- docs/es/**/*
- docs/ja/**/*
- docs/he-il/**/*
- docs/pt-br/**/*
- docs/zh-cn/**/*
- docs/de/**/*
- docs/ru-ru/**/*
- changed-files:
- any-glob-to-any-file:
- docs/**
- builddefs/docsgen/**
CI:
- .github/**/*
- changed-files:
- any-glob-to-any-file:
- .github/**
dd:
- data/constants/**/*
- data/mappings/**/*
- data/schemas/**/*
- changed-files:
- any-glob-to-any-file:
- data/constants/**
- data/mappings/**
- data/schemas/**
6 changes: 3 additions & 3 deletions .github/workflows/auto_approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
if: github.repository == 'qmk/qmk_firmware'

steps:
- uses: mheap/automatic-approve-action@v1
- uses: zvecr/automatic-approve-action@safe_files
with:
token: ${{ secrets.QMK_BOT_TOKEN }}
workflows: "format.yml,lint.yml,unit_test.yml"
dangerous_files: "lib/python/,Makefile,paths.mk,builddefs/"
workflows: "labeler.yml,lint.yml,docs.yml"
safe_files: "keyboards/,docs/"
34 changes: 25 additions & 9 deletions .github/workflows/ci_build_major_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ jobs:
run: |
target_count=$( {
qmk find -km default 2>/dev/null
qmk find -km via 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 as we're splitting default and via
slice_length=$((target_count / ($CONCURRENT_JOBS - 1))) # Err on the side of caution
echo "slice_length=$slice_length" >> $GITHUB_OUTPUT
build_targets:
Expand All @@ -63,7 +63,8 @@ jobs:
strategy:
fail-fast: false
matrix:
keymap: [default, via]
keymap: [default]
# keymap: [default, xap]
uses: ./.github/workflows/ci_build_major_branch_keymap.yml
with:
branch: ${{ inputs.branch || github.ref_name }}
Expand All @@ -77,44 +78,59 @@ jobs:
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: firmwares
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
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: firmwares
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
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: firmwares
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: firmwares/.failed
files: ./.failed

- name: Fail build if needed
if: steps.check_failure_marker.outputs.files_exists == 'true'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_build_major_branch_keymap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ jobs:
targets-${{ inputs.keymap }}
- name: 'CI Discord Notification'
if: always()
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 }} --keymap ${{ inputs.keymap }} --url ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
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 }}
15 changes: 5 additions & 10 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
name: "Pull Request Labeler"

permissions:
contents: read
pull-requests: write

on:
pull_request_target:
types: [opened, synchronize, reopened, ready_for_review, locked]
- pull_request_target

jobs:
triage:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: '.github/labeler.yml'
- uses: actions/labeler@v5
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
*.la
*.stackdump
*.sym
index.html
firmware_list.json

# QMK-specific
api_data/v1
Expand Down
13 changes: 8 additions & 5 deletions builddefs/build_keyboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@ ifeq ($(strip $(DUMP_CI_METADATA)),yes)
endif

# Force expansion
TARGET := $(TARGET)
override TARGET := $(TARGET)

ifneq ($(FORCE_LAYOUT),)
TARGET := $(TARGET)_$(FORCE_LAYOUT)
override TARGET := $(TARGET)_$(FORCE_LAYOUT)
endif
ifneq ($(CONVERT_TO),)
override TARGET := $(TARGET)_$(CONVERT_TO)
endif

# Object files and generated keymap directory
Expand All @@ -58,9 +61,6 @@ ifdef SKIP_GIT
VERSION_H_FLAGS += --skip-git
endif

# Generate the board's version.h file.
$(shell $(QMK_BIN) generate-version-h $(VERSION_H_FLAGS) -q -o $(INTERMEDIATE_OUTPUT)/src/version.h)

# Determine which subfolders exist.
KEYBOARD_FOLDER_PATH_1 := $(KEYBOARD)
KEYBOARD_FOLDER_PATH_2 := $(patsubst %/,%,$(dir $(KEYBOARD_FOLDER_PATH_1)))
Expand Down Expand Up @@ -218,6 +218,9 @@ endif

include $(BUILDDEFS_PATH)/converters.mk

# Generate the board's version.h file.
$(shell $(QMK_BIN) generate-version-h $(VERSION_H_FLAGS) -q -o $(INTERMEDIATE_OUTPUT)/src/version.h)

MCU_ORIG := $(MCU)
include $(wildcard $(PLATFORM_PATH)/*/mcu_selection.mk)

Expand Down
3 changes: 0 additions & 3 deletions builddefs/converters.mk
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ ifneq ($(CONVERT_TO),)

PLATFORM_KEY = $(shell echo $(CONVERTER) | cut -d "/" -f2)

# force setting as value can be from environment
override TARGET := $(TARGET)_$(CONVERT_TO)

# Configure any defaults
OPT_DEFS += -DCONVERT_TO_$(shell echo $(CONVERT_TO) | tr '[:lower:]' '[:upper:]')
OPT_DEFS += -DCONVERTER_TARGET=\"$(CONVERT_TO)\"
Expand Down
23 changes: 17 additions & 6 deletions data/schemas/definitions.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@
"type": "object",
"additionalProperties": {"type": "boolean"}
},
"build_target": {
"oneOf": [
{"$ref": "#/keyboard_keymap_tuple"},
{"$ref": "#/json_file_path"}
]
},
"filename": {
"type": "string",
"minLength": 1,
Expand Down Expand Up @@ -53,6 +47,19 @@
{"$ref": "#/keyboard"},
{"$ref": "#/filename"}
],
"minItems": 2,
"maxItems": 2,
"unevaluatedItems": false
},
"keyboard_keymap_env": {
"type": "array",
"prefixItems": [
{"$ref": "#/keyboard"},
{"$ref": "#/filename"},
{"$ref": "#/kvp_object"}
],
"minItems": 3,
"maxItems": 3,
"unevaluatedItems": false
},
"keycode": {
Expand Down Expand Up @@ -87,6 +94,10 @@
"maxLength": 7,
"pattern": "^[A-Z][A-Zs_0-9]*$"
},
"kvp_object": {
"type": "object",
"additionalProperties": {"type": "string"}
},
"layout_macro": {
"oneOf": [
{
Expand Down
10 changes: 9 additions & 1 deletion data/schemas/user_repo_v1.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
"$id": "qmk.user_repo.v1",
"title": "User Repository Information",
"type": "object",
"definitions": {
"build_target": {
"oneOf": [
{"$ref": "qmk.definitions.v1#/keyboard_keymap_tuple"},
{"$ref": "qmk.definitions.v1#/json_file_path"}
]
},
},
"required": [
"userspace_version",
"build_targets"
Expand All @@ -15,7 +23,7 @@
"build_targets": {
"type": "array",
"items": {
"$ref": "qmk.definitions.v1#/build_target"
"$ref": "#/definitions/build_target"
}
}
}
Expand Down
31 changes: 31 additions & 0 deletions data/schemas/user_repo_v1_1.jsonschema
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema#",
"$id": "qmk.user_repo.v1_1",
"title": "User Repository Information",
"type": "object",
"definitions": {
"build_target": {
"oneOf": [
{"$ref": "qmk.definitions.v1#/keyboard_keymap_tuple"},
{"$ref": "qmk.definitions.v1#/keyboard_keymap_env"},
{"$ref": "qmk.definitions.v1#/json_file_path"}
]
},
},
"required": [
"userspace_version",
"build_targets"
],
"properties": {
"userspace_version": {
"type": "string",
"enum": ["1.1"]
},
"build_targets": {
"type": "array",
"items": {
"$ref": "#/definitions/build_target"
}
}
}
}
2 changes: 1 addition & 1 deletion docs/breaking_changes_instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ Commenting on your pull request and being responsive to questions, comments, and

### Ask for Help

Having your submission flagged may have caught you off guard. If you find yourself intimidated or overwhelmed, let us know. Comment on your pull request, or [reach out to the QMK team on Discord](https://discord.gg/Uq7gcHh).
Having your submission flagged may have caught you off guard. If you find yourself intimidated or overwhelmed, let us know. Comment on your pull request, or [reach out to the QMK team on Discord](https://discord.gg/qmk).
Loading

0 comments on commit c6aeb99

Please sign in to comment.