1
0

Compare commits

..

12 Commits

Author SHA1 Message Date
Joel Challis
2bd8e43256 Enhance checks for invalid keyboard build targets (#26122)
Co-authored-by: フィルターペーパー <76888457+filterpaper@users.noreply.github.com>
2026-04-05 15:38:40 +10:00
Joel Challis
933cb8cc35 Update CI workflow to dynamically set keymaps (#26120) 2026-04-05 15:37:41 +10:00
Joel Challis
1426eedfc1 Fix cache list command in CI workflow 2026-04-02 08:23:41 +01:00
Joel Challis
e4b998ccb0 Only attempt cache deletion if exists (#26124) 2026-04-02 16:00:00 +11:00
Joel Challis
b5af7a3390 Enable ccache within CI (#26121) 2026-04-01 19:41:19 +11:00
Joel Challis
ed80e21858 Resolve 'using serial compilation of 2 LTRANS jobs' warning (#26113) 2026-03-30 15:25:29 +11:00
Joel Challis
9d24bc8a33 Fix userspace detection in Makefile (#26117) 2026-03-30 11:24:32 +08:00
QMK Bot
c7fde3d8cc [CI] Format code according to conventions (#26108)
Format code according to conventions
2026-03-27 03:56:53 +00:00
Sebastian Morgenstern
0fdb5df94d Added new pttbutton keyboard (#25952) 2026-03-27 03:15:28 +00:00
Joel Challis
bd500ae092 Detect PRs bypassing DD changes (#26094) 2026-03-20 06:27:49 +11:00
Peter Cock
fec01edaa4 Explain how to use STORE_SETUPS and PRINT_SETUPS (#26070)
* Explain how to use STORE_SETUPS and PRINT_SETUPS

I found the instructions a little terse, but managed.

This also adds a note about PRINT_SETUPS reporting random numbers if STORE_SETUPS hasn't been used.

* Remove line breaks

Existing docs seem to use a mix of hard line breaks at sentence
ends, or 80 chars-ish, versus no line breaks in paragraphs.

* Suggestion during review

Co-authored-by: フィルターペーパー <76888457+filterpaper@users.noreply.github.com>

---------

Co-authored-by: フィルターペーパー <76888457+filterpaper@users.noreply.github.com>
2026-03-19 11:40:49 +08:00
Peter Cock
7619e991cf QMK avoids raw line breaks within paragraphs in Markdown (#26080)
* QMK avoids raw line breaks within paragraphs in Markdown

Mentioned in passing during a few of my recent documentation pull requests, eg #26070.

* Suggestion during review

Co-authored-by: フィルターペーパー <76888457+filterpaper@users.noreply.github.com>

---------

Co-authored-by: フィルターペーパー <76888457+filterpaper@users.noreply.github.com>
2026-03-19 10:16:35 +08:00
14 changed files with 207 additions and 37 deletions

View File

@@ -32,6 +32,7 @@ jobs:
container: ghcr.io/qmk/qmk_cli
outputs:
keymaps: ${{ steps.generate_slice_length.outputs.keymaps }}
slice_length: ${{ steps.generate_slice_length.outputs.slice_length }}
steps:
@@ -47,12 +48,20 @@ jobs:
- name: Determine concurrency
id: generate_slice_length
shell: 'bash {0}'
run: |
target_count=$( {
qmk find -km default 2>/dev/null
qmk find -km xap 2>/dev/null
} | sort | uniq | wc -l)
targets=()
target_count=0
for target in "default" "xap"; do
count=$(qmk find -km $target 2>/dev/null | wc -l)
if [ $count -gt 0 ]; then
target_count=$(($target_count + $count))
targets+=($target)
fi
done
keymaps=$(jq -c -n '$ARGS.positional' --args "${targets[@]}")
slice_length=$((target_count / ($CONCURRENT_JOBS - 1))) # Err on the side of caution
echo "keymaps=$keymaps" >> $GITHUB_OUTPUT
echo "slice_length=$slice_length" >> $GITHUB_OUTPUT
build_targets:
@@ -61,7 +70,7 @@ jobs:
strategy:
fail-fast: false
matrix:
keymap: [default, xap]
keymap: ${{ fromJson(needs.determine_concurrency.outputs.keymaps) }}
uses: ./.github/workflows/ci_build_major_branch_keymap.yml
with:
branch: ${{ inputs.branch || github.ref_name }}

View File

@@ -38,17 +38,18 @@ jobs:
run: pip3 install -r requirements-dev.txt
- name: Generate build targets
shell: 'bash {0}'
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
qmk find -km ${{ inputs.keymap }} 2>/dev/null | sort | uniq | shuf --random-source=<(openssl enc -aes-256-ctr -pass pass:qmk -nosalt </dev/zero 2>/dev/null) | 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
printf "\"group-%02d\":{" $counter
echo -n '"targets":"'
echo $target | tr ' ' '\n' | sort | uniq | xargs echo -n
echo -n '"}'
@@ -72,6 +73,9 @@ jobs:
container: ghcr.io/qmk/qmk_cli
continue-on-error: true
env:
CCACHE_CONFIGPATH: ~/.cache
strategy:
matrix:
target: ${{ fromJson(needs.generate_targets.outputs.targets) }}
@@ -83,6 +87,8 @@ jobs:
- name: Checkout QMK Firmware
uses: actions/checkout@v6
with:
submodules: recursive
- name: Install dependencies
run: pip3 install -r requirements-dev.txt
@@ -93,24 +99,47 @@ jobs:
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: Restore Cache
id: cache
uses: actions/cache/restore@v5
with:
path: ${{ env.CCACHE_CONFIGPATH }}
key: compile-${{ inputs.keymap }}-${{ matrix.target }}
- 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 ))
targets=$(jq -r '.["${{ matrix.target }}"].targets' targets.json | tr ' ' '\n' | sort)
if [ -z "${targets}" ]; then
echo "Zero build targets detected"
exit 0
fi
qmk mass-compile -t -j $NCPUS -e DUMP_CI_METADATA=yes $targets || touch .failed
qmk mass-compile -t -j $(nproc) -e DUMP_CI_METADATA=yes -e USE_CCACHE=yes $targets || touch .failed
- name: Dump ccache stats
run: |
ccache -s
# Delete the old cache on hit to emulate a cache update. See https://github.com/actions/cache/issues/342.
- name: Delete old cache
env:
GH_TOKEN: ${{ github.token }}
if: steps.cache.outputs.cache-hit
run: |
count=$(gh cache list --ref ${{ github.ref }} --key ${{ steps.cache.outputs.cache-primary-key }} --json id | jq length)
if [ $count -gt 0 ]; then
gh cache delete --ref ${{ github.ref }} ${{ steps.cache.outputs.cache-primary-key }}
fi
- name: Save Cache
uses: actions/cache/save@v5
with:
path: ${{ env.CCACHE_CONFIGPATH }}
key: compile-${{ inputs.keymap }}-${{ matrix.target }}
- name: Upload binaries
uses: actions/upload-artifact@v7

View File

@@ -89,23 +89,7 @@ jobs:
if: always()
shell: 'bash {0}'
run: |
exit_code=0
for file in $(find keyboards/ -name rules.mk | grep -v /keymaps/ | grep -v /common/ | grep -v /lib/); do
dir=$(dirname $file)
$(find $dir -name keyboard.json -exec false {} +)
if [[ $? == 0 ]]; then
echo "$dir::Legacy target detected"
((++exit_code))
fi
done
if [[ $exit_code -gt 255 ]]; then
exit 255
fi
exit $exit_code
qmk ci-validate-keyboard-targets
- name: Verify keyboard aliases
if: always()

View File

@@ -8,6 +8,9 @@ on:
paths:
- 'data/constants/**'
- 'lib/python/**'
- 'quantum/rgblight/rgblight_breathe_table.h'
- 'quantum/keycodes.h'
- 'quantum/keymap_extras/**'
jobs:
regen:

View File

@@ -38,14 +38,16 @@ $(info QMK Firmware $(QMK_VERSION))
endif
endif
# Try to determine userspace from qmk config, if set.
ifeq ($(QMK_USERSPACE),)
QMK_USERSPACE = $(shell qmk config -ro user.overlay_dir | cut -d= -f2 | sed -e 's@^None$$@@g')
endif
# Determine which qmk cli to use
QMK_BIN := qmk
# Try to determine userspace from qmk config, if set. Handle direct query on qmk_cli>=1.1.7
# falling back to legacy method of only supporting user.overlay_dir config
export override QMK_USERSPACE := $(shell \
$(QMK_BIN) env | grep -q QMK_USERSPACE \
&& $(QMK_BIN) env QMK_USERSPACE \
|| $(QMK_BIN) config -ro user.overlay_dir | cut -d= -f2 | sed -e 's@^None$$@@g')
# avoid 'Entering|Leaving directory' messages
MAKEFLAGS += --no-print-directory

View File

@@ -58,7 +58,7 @@ endif
#---------------- C Compiler Options ----------------
ifeq ($(strip $(LTO_ENABLE)), yes)
CDEFS += -flto
CDEFS += -flto=auto
CDEFS += -DLTO_ENABLE
endif

View File

@@ -14,6 +14,10 @@ Example:
This page covers my super cool feature. You can use this feature to make coffee, squeeze fresh oj, and have an egg mcmuffin and hashbrowns delivered from your local macca's by drone.
```
# Paragraphs
Do not use hard line breaks within the raw Markdown for each paragraph. These are optional in Markdown, and have no effect on the rendered output. This means each raw paragraph will be a single long line in your editor (best viewed with line wrapping enabled).
# Headings
Your page should generally have multiple "H1" headings. Only H1 and H2 headings will included in the Table of Contents, so plan them out appropriately. Excess width should be avoided in H1 and H2 headings to prevent the Table of Contents from getting too wide.

View File

@@ -142,8 +142,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
```
Then please open an issue on Github with this information and tell what OS was not detected correctly and if you have any intermediate devices between keyboard and your computer.
Add both `STORE_SETUPS` and `PRINT_SETUPS` to your keyboard's keymap. Connect the keyboard to the device where the OS was not recognised, and press the `STORE_SETUPS` key to capture and store the fingerprint. On your development computer, run one of the suggested [console debugging tools](/faq_debug#debugging-tools), connect the keyboard, and press the `PRINT_SETUPS` key. The console should display multiple lines of data from the most recent `STORE_SETUPS` run.
Open an issue on GitHub and paste the console output into the issue. Also tell us which OS (including the version, if possible) was not detected correctly and whether any intermediate devices, such as a USB hub, were used between the keyboard and the target device.
::: tip
If `STORE_SETUPS` has not been used previously, `PRINT_SETUPS` will report whatever values are already present in the controller's EEPROM. These may appear as random numbers.
:::
## Credits

View File

@@ -0,0 +1,28 @@
{
"manufacturer": "Sebastian Morgenstern",
"keyboard_name": "pttbutton",
"maintainer": "morningstar1",
"bootloader": "stm32-dfu",
"diode_direction": "COL2ROW",
"features": {
"extrakey": true
},
"matrix_pins": {
"cols": ["B0"],
"rows": ["A0"]
},
"processor": "STM32F042",
"url": "https://github.com/morningstar1/pttbutton",
"usb": {
"device_version": "1.0.0",
"vid": "0x736D",
"pid": "0xAFFE"
},
"layouts": {
"LAYOUT": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0}
]
}
}
}

View File

@@ -0,0 +1,10 @@
// Copyright 2026 SEbastian Morgenstern
// SPDX-License-Identifier: GPL-2.0-or-later
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_F14
)
};

View File

@@ -0,0 +1,42 @@
/* Copyright 2026 Sebastian Morgenstern
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "hal.h"
void board_init(void) {
// Remap PA11->PA9 and PA12->PA10 for USB
SYSCFG->CFGR1 |= SYSCFG_CFGR1_PA11_PA12_RMP;
}
void keyboard_pre_init_kb(void) {
// Immediately set the LED pin as an output and set it ON
gpio_set_pin_output(A15);
gpio_write_pin_high(A15);
keyboard_pre_init_user();
}
void keyboard_post_init_kb(void) {
// Blink the LED so we know everything is running OK
// Finish with LED OFF
gpio_write_pin_low(A15);
wait_ms(100);
gpio_write_pin_high(A15);
wait_ms(100);
gpio_write_pin_low(A15);
keyboard_post_init_user();
}

View File

@@ -0,0 +1,25 @@
# pttbutton
![pttbutton](https://github.com/morningstar1/PTTButton/blob/main/image/PTTButton.png?raw=true)
A simple one button keyboard with a USB Hub. Primary intention is to use it as a Push To Talk (PTT) button.
* Keyboard Maintainer: [Sebastian Morgenstern](https://github.com/morningstar1)
* Hardware Supported: [PTTButton V1.0](https://github.com/morningstar1/PTTButton)
* Hardware Availability: please contact me <sebastian.morgenstern@gmail.com>
Make example for this keyboard (after setting up your build environment):
make morningstar1/pttbutton:default
Flashing example for this keyboard:
make morningstar1/pttbutton:default:flash
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
## Bootloader
Enter the bootloader in one way:
* **Physical reset button**: Briefly press the small button on the PCB

View File

@@ -56,6 +56,7 @@ safe_commands = [
subcommands = [
'qmk.cli.ci.validate_aliases',
'qmk.cli.ci.validate_keyboard_targets',
'qmk.cli.bux',
'qmk.cli.c2json',
'qmk.cli.cd',

View File

@@ -0,0 +1,28 @@
"""Validates the list of keyboard targets.
"""
from milc import cli
from pathlib import Path
@cli.subcommand('Validates the list of keyboard targets.', hidden=True)
def ci_validate_keyboard_targets(cli):
errors = set()
for rules_mk in Path('keyboards').glob('**/rules.mk'):
if any({'keymaps', 'common', 'lib'} & set(rules_mk.parts)):
continue
folder = rules_mk.parent
if not any(folder.glob('**/keyboard.json')):
errors.add(folder)
for keymap in Path('keyboards').glob('**/keymaps/'):
folder = keymap.parent
if not any(folder.glob('**/keyboard.json')):
errors.add(folder)
for error in errors:
print(f"{error}::Legacy target detected")
exit(min(len(errors), 255))