Compare commits

..

27 Commits

Author SHA1 Message Date
92005dee35 using data/mappings for processing 2023-04-07 16:25:51 -04:00
5dd8efc7c0 chibios compiling, layout keymaps 2023-04-06 16:22:14 -04:00
cc22d67b32 some chibios experiments 2023-04-05 18:27:47 -04:00
a1cb005981 storm commit, chibios exp 2023-04-05 12:59:16 -04:00
cfde338998 generate compile_commands.json and configure clangd 2023-04-04 23:39:52 -04:00
4d1ad14596 Merge branch 'cmake-experiments' of https://github.com/qmk/qmk_firmware into cmake-experiments 2023-04-04 20:55:17 -04:00
c34f0e4998 test out compile_flags.txt 2023-04-04 20:55:10 -04:00
94d76a4f9e fix case issues 2023-04-04 16:55:03 -04:00
fe59b4e5d6 load keyboard ui through vscode 2023-04-04 16:26:44 -04:00
7093a41c6c clean-up 2023-04-04 14:19:52 -04:00
c9ca9b9875 one target one target one target 2023-04-04 13:42:50 -04:00
060c15f32b fully compiling with qmk target 2023-04-04 12:46:29 -04:00
6a960cbf05 move to single lib 2023-04-04 12:29:01 -04:00
531c37b256 closer, tasks populating targets 2023-04-04 12:07:58 -04:00
6468360ff1 example tasks 2023-04-03 23:22:59 -04:00
40a3a431ef unknown state 2023-04-03 21:02:40 -04:00
4d999378d0 more absolute keyboard/keymap support 2023-04-03 13:43:40 -04:00
2ebad0d33f basic json validator supporting most used properties. converted some regex to cmake-compatible expressions 2023-04-03 13:19:45 -04:00
d5760d02a6 some relative/abs keymap folder stuff 2023-04-02 23:46:40 -04:00
9ae271c844 capitalization matters on linux 2023-04-02 22:40:34 -04:00
4aea69ba21 start arm stuff, better keyboard folder path management 2023-04-02 16:38:37 -04:00
2031d063b5 split up functions/scripts a bit. downloads avr-gcc 2023-04-02 11:20:49 -04:00
d32724c08f refix windows compiling 2023-04-01 23:39:13 -04:00
26756d05a2 look for make independently, osx compiling 2023-04-01 23:24:46 -04:00
b45dbcd4c1 fix linux compiling 2023-04-01 23:10:44 -04:00
6fe0cd47ca multi folder targets 2023-04-01 22:04:00 -04:00
ca8596e4a8 compiling basic AVR 2023-04-01 18:03:54 -04:00
35541 changed files with 1329369 additions and 1014209 deletions

View File

@ -1,4 +1,3 @@
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
Remove: -mcall-prologues
Add: -nostdinc

View File

@ -4,39 +4,39 @@
root = true
[*]
end_of_line = lf
indent_style = space
indent_size = 4
# We recommend you to keep these unchanged
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[{*.yaml,*.yml}] # To match GitHub Actions formatting
indent_size = 2
[*.md]
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
# Don't override anything in `lib/`...
[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}]
[Makefile]
end_of_line = lf
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 200
indent_style = tab
[*.sh]
end_of_line = lf
# 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

80
.github/labeler.yml vendored
View File

@ -1,56 +1,42 @@
core:
- changed-files:
- any-glob-to-any-file:
- quantum/**
- tmk_core/**
- drivers/**
- tests/**
- util/**
- platforms/**
- builddefs/*.mk
- Makefile
- '*.mk'
- quantum/**/*
- tmk_core/**/*
- drivers/**/*
- tests/**/*
- util/**/*
- platforms/**/*
- builddefs/**/*
- Makefile
- '*.mk'
dependencies:
- all:
- changed-files:
- any-glob-to-any-file: lib/**
- all-globs-to-all-files: '!lib/python/**'
- any:
- 'lib/**/*'
- '!lib/python/**/*'
keyboard:
- all:
- changed-files:
- any-glob-to-any-file: keyboards/**
- all-globs-to-all-files: '!keyboards/**/keymaps/**'
- any:
- 'keyboards/**/*'
- '!keyboards/**/keymaps/**/*'
keymap:
- changed-files:
- any-glob-to-any-file:
- users/**
- layouts/**
- keyboards/**/keymaps/**
- users/**/*
- layouts/**/*
- keyboards/**/keymaps/**/*
via:
- changed-files:
- any-glob-to-any-file:
- keyboards/**/keymaps/via/*
- keyboards/**/keymaps/via/*
cli:
- changed-files:
- any-glob-to-any-file:
- requirements.txt
- lib/python/**
- requirements.txt
- lib/python/**/*
python:
- changed-files:
- any-glob-to-any-file:
- '**/*.py'
- '**/*.py'
documentation:
- changed-files:
- any-glob-to-any-file:
- docs/**
- builddefs/docsgen/**
- docs/**/*
translation:
- docs/fr-fr/**/*
- docs/es/**/*
- docs/ja/**/*
- docs/he-il/**/*
- docs/pt-br/**/*
- docs/zh-cn/**/*
- docs/de/**/*
- docs/ru-ru/**/*
CI:
- changed-files:
- any-glob-to-any-file:
- .github/**
dd:
- changed-files:
- any-glob-to-any-file:
- data/constants/**
- data/mappings/**
- data/schemas/**
- .github/**/*

View File

@ -19,13 +19,13 @@ on:
jobs:
api_data:
runs-on: ubuntu-latest
container: ghcr.io/qmk/qmk_cli
container: qmkfm/qmk_cli
# protect against those who work in their fork on 'important' branches
if: github.repository == 'qmk/qmk_firmware'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
fetch-depth: 1
persist-credentials: false

View File

@ -13,8 +13,8 @@ jobs:
if: github.repository == 'qmk/qmk_firmware'
steps:
- uses: zvecr/automatic-approve-action@safe_files
- uses: mheap/automatic-approve-action@v1
with:
token: ${{ secrets.QMK_BOT_TOKEN }}
workflows: "labeler.yml,lint.yml,docs.yml"
safe_files: "keyboards/,docs/"
workflows: "format.yml,lint.yml,unit_test.yml"
dangerous_files: "lib/python/,Makefile,paths.mk,builddefs/"

View File

@ -4,7 +4,6 @@ permissions:
contents: write
on:
workflow_dispatch:
push:
branches:
- master
@ -27,12 +26,12 @@ jobs:
if: github.repository == 'qmk/qmk_firmware'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Bump version and push tag
uses: anothrNick/github-tag-action@1.66.0
uses: anothrNick/github-tag-action@1.61.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BUMP: 'patch'

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

View File

@ -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 }}

60
.github/workflows/ci_builds.yml vendored Normal file
View File

@ -0,0 +1,60 @@
name: CI Builds
permissions:
contents: read
on:
workflow_dispatch:
schedule:
- cron: '0 0,12 * * *'
jobs:
ci_builds:
name: "CI Build"
runs-on: self-hosted
timeout-minutes: 1380
if: github.repository == 'qmk/qmk_firmware'
strategy:
fail-fast: false
matrix:
branch: [master, develop]
keymap: [default, via]
container: qmkfm/qmk_cli
steps:
- name: Disable safe.directory check
run : git config --global --add safe.directory '*'
- uses: actions/checkout@v3
with:
submodules: recursive
ref: ${{ matrix.branch }}
- 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-${{ matrix.branch }}-${{ matrix.keymap }}
if-no-files-found: ignore
path: |
*.bin
*.hex
*.uf2
.build/failed.*

View File

@ -18,13 +18,13 @@ jobs:
test:
runs-on: ubuntu-latest
container: ghcr.io/qmk/qmk_cli
container: qmkfm/qmk_cli
steps:
- name: Disable safe.directory check
run : git config --global --add safe.directory '*'
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
submodules: recursive

View File

@ -15,7 +15,7 @@ jobs:
if: github.repository == 'qmk/qmk_firmware'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
token: ${{ secrets.QMK_BOT_TOKEN }}
fetch-depth: 0

View File

@ -8,58 +8,39 @@ on:
branches:
- master
paths:
- 'builddefs/docsgen/**'
- 'tmk_core/**'
- 'quantum/**'
- 'platforms/**'
- 'docs/**'
- '.github/workflows/docs.yml'
pull_request:
paths:
- 'builddefs/docsgen/**'
- 'docs/**'
- '.github/workflows/docs.yml'
defaults:
run:
shell: bash
jobs:
generate:
runs-on: ubuntu-latest
container: ghcr.io/qmk/qmk_cli
container: qmkfm/qmk_cli
# protect against those who develop with their fork on master
if: github.repository == 'qmk/qmk_firmware'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install dependencies
run: |
apt-get update && apt-get install -y rsync doxygen
# install nvm
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
apt-get update && apt-get install -y rsync nodejs npm doxygen
npm install -g moxygen
- name: Build docs
run: |
source $HOME/.bashrc
nvm use 20
qmk --verbose generate-docs
- name: Deploy
if: ${{ github.event_name == 'push' && github.repository == 'qmk/qmk_firmware' }}
uses: JamesIves/github-pages-deploy-action@v4.6.3
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: .build/docs
git-config-name: QMK Bot
git-config-email: hello@qmk.fm
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BASE_BRANCH: master
BRANCH: gh-pages
FOLDER: .build/docs
GIT_CONFIG_EMAIL: hello@qmk.fm

View File

@ -18,10 +18,9 @@ jobs:
matrix:
branch:
- xap
- riot
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
token: ${{ secrets.QMK_BOT_TOKEN }}
fetch-depth: 0

View File

@ -19,13 +19,13 @@ jobs:
lint:
runs-on: ubuntu-latest
container: ghcr.io/qmk/qmk_cli
container: qmkfm/qmk_cli
steps:
- name: Disable safe.directory check
run : git config --global --add safe.directory '*'
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
fetch-depth: 0
@ -35,9 +35,7 @@ jobs:
- name: Get changed files
id: file_changes
uses: tj-actions/changed-files@v44
with:
use_rest_api: true
uses: tj-actions/changed-files@v35
- name: Run qmk formatters
shell: 'bash {0}'

View File

@ -13,13 +13,13 @@ jobs:
lint:
runs-on: ubuntu-latest
container: ghcr.io/qmk/qmk_cli
container: qmkfm/qmk_cli
steps:
- name: Disable safe.directory check
run : git config --global --add safe.directory '*'
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
fetch-depth: 0
@ -47,7 +47,7 @@ jobs:
git config user.email 'hello@qmk.fm'
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v4
if: ${{ github.repository == 'qmk/qmk_firmware'}}
with:
token: ${{ secrets.QMK_BOT_TOKEN }}

View File

@ -1,13 +1,18 @@
name: "Pull Request Labeler"
permissions:
contents: read
pull-requests: write
on:
- pull_request_target
pull_request_target:
types: [opened, synchronize, reopened, ready_for_review, locked]
jobs:
triage:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
- uses: actions/labeler@main
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: '.github/labeler.yml'

View File

@ -12,13 +12,13 @@ jobs:
lint:
runs-on: ubuntu-latest
container: ghcr.io/qmk/qmk_cli
container: qmkfm/qmk_cli
steps:
- name: Disable safe.directory check
run : git config --global --add safe.directory '*'
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
fetch-depth: 0
@ -27,9 +27,7 @@ jobs:
- name: Get changed files
id: file_changes
uses: tj-actions/changed-files@v44
with:
use_rest_api: true
uses: tj-actions/changed-files@v35
- name: Print info
run: |
@ -38,7 +36,6 @@ jobs:
echo '${{ steps.file_changes.outputs.all_changed_files}}'
- name: Run qmk lint
if: always()
shell: 'bash {0}'
run: |
QMK_CHANGES=$(echo -e '${{ steps.file_changes.outputs.all_changed_files}}' | sed 's/ /\n/g')
@ -64,12 +61,10 @@ jobs:
qmk format-text ${{ steps.file_changes.outputs.all_changed_files}} || true
for file in ${{ steps.file_changes.outputs.all_changed_files}}; do
if [[ -f $file ]]; then
if ! git diff --quiet $file; then
echo "File '${file}' Requires Formatting"
echo "::error file=${file}::Requires Formatting"
exit_code=$(($exit_code + 1))
fi
if ! git diff --quiet $file; then
echo "File '${file}' Requires Formatting"
echo "::error file=${file}::Requires Formatting"
exit_code=$(($exit_code + 1))
fi
done
@ -77,11 +72,3 @@ jobs:
exit 255
fi
exit $exit_code
- name: Verify keyboard aliases
if: always()
shell: 'bash {0}'
run: |
git reset --hard
git clean -xfd
qmk ci-validate-aliases

View File

@ -13,13 +13,13 @@ jobs:
regen:
runs-on: ubuntu-latest
container: ghcr.io/qmk/qmk_cli
container: qmkfm/qmk_cli
steps:
- name: Disable safe.directory check
run : git config --global --add safe.directory '*'
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- name: Run qmk generators
run: |

View File

@ -13,13 +13,13 @@ jobs:
regen:
runs-on: ubuntu-latest
container: ghcr.io/qmk/qmk_cli
container: qmkfm/qmk_cli
steps:
- name: Disable safe.directory check
run : git config --global --add safe.directory '*'
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- name: Run qmk generators
run: |
@ -34,7 +34,7 @@ jobs:
git config user.email 'hello@qmk.fm'
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v4
if: ${{ github.repository == 'qmk/qmk_firmware'}}
with:
token: ${{ secrets.QMK_BOT_TOKEN }}

View File

@ -3,7 +3,6 @@ name: 'Close stale issues and PRs'
permissions:
issues: write
pull-requests: write
actions: write
on:
schedule:
@ -14,7 +13,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@main
- uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -23,13 +23,13 @@ jobs:
test:
runs-on: ubuntu-latest
container: ghcr.io/qmk/qmk_cli
container: qmkfm/qmk_cli
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependencies
run: pip3 install -r requirements-dev.txt
- name: Run tests
run: qmk test-c
run: make test:all

21
.gitignore vendored
View File

@ -18,15 +18,8 @@
*.lst
*.map
*.o
*.a
*.so
*.dylib
*.dll
*.la
*.stackdump
*.sym
index.html
firmware_list.json
# QMK-specific
api_data/v1
@ -37,10 +30,6 @@ quantum/version.h
*.qmk
*.uf2
# DD config at wrong location
/keyboards/**/keymaps/*/info.json
/keyboards/**/keymaps/*/keyboard.json
# Old-style QMK Makefiles
/keyboards/**/Makefile
@ -56,15 +45,19 @@ quantum/version.h
.idea/
.project
.settings/
.vagrant/
# ?
.dep
.history/
build/
cmake-build-debug
CMakeLists.txt
# CMakeLists.txt
*.pdf
# cmake toolchain downloads
/toolchains
# Let these ones be user specific, since we have so many different configurations
*.code-workspace
.stfolder
@ -103,7 +96,6 @@ secrets.tar
# Python things
__pycache__
.python-version
.venv
# Prerequisites for updating ChibiOS
/util/fmpp*
@ -116,6 +108,5 @@ compile_commands.json
.clangd/
.cache/
# VIA(L) files that don't belong in QMK repo
# VIA(L) json files that don't belong in QMK repo
via*.json
/keyboards/**/keymaps/vial/*

9
.vscode/cmake-kits.json vendored Normal file
View File

@ -0,0 +1,9 @@
[
{
"name": "AVR GCC",
"compilers": {
"CC": "C:\\QMK_MSYS\\mingw64\\bin\\avr-gcc.exe",
"CXX": "C:\\QMK_MSYS\\mingw64\\bin\\avr-g++.exe"
}
}
]

View File

@ -3,7 +3,7 @@
"recommendations": [
"EditorConfig.EditorConfig",
"xaver.clang-format",
"llvm-vs-code-extensions.vscode-clangd",
"ms-vscode.cpptools",
"bierner.github-markdown-preview",
"donjayamanne.git-extension-pack"
]

11
.vscode/settings.json vendored
View File

@ -5,8 +5,8 @@
// Configure glob patterns for excluding files and folders.
"files.exclude": {
"**/.build": true,
"**/*.hex": true,
"**/*.bin": true,
// "**/*.hex": true,
// "**/*.bin": true,
"**/*.uf2": true
},
"files.associations": {
@ -26,9 +26,6 @@
},
"python.formatting.provider": "yapf",
"[json]": {
"editor.formatOnSave": false
},
"clangd.arguments": [
"--header-insertion=never"
]
"editor.formatOnSave": false
}
}

114
.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,114 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Load Keyboard",
"dependsOrder": "sequence",
"dependsOn":[
"Only Load Keyboard",
"Configure CMake"
],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Only Load Keyboard",
"type": "shell",
"command": "cmake -D QMK_KEYBOARD_FOLDER=\"${input:all_keyboards}\" -D QMK_KEYMAP_FOLDER=\"${input:keyboard_keymap}\" -P ${workspaceFolder}/cmake/ConfigureKeyboard.cmake",
"problemMatcher": []
},
{
"label": "Configure CMake",
"type": "cmake",
"command": "configure"
},
{
"label": "Build",
"problemMatcher": [
{
"base": "$gcc",
"fileLocation": ["relative", "${workspaceFolder}/build"]
},
],
"options": {
"environment": {
"CLICOLOR_FORCE": "1"
}
},
"type": "cmake",
"command": "build",
"targets":[
"${input:keyboard_target}"
],
"group": {
"kind": "build",
"isDefault": true
},
},
// {
// "label": "Rebuild",
// "problemMatcher": [
// {
// "base": "$gcc",
// "fileLocation": ["relative", "${workspaceFolder}/build"]
// },
// ],
// "options": {
// "environment": {
// "CLICOLOR_FORCE": "1"
// }
// },
// "type": "cmake",
// "command": "cleanRebuild",
// "targets":[
// "${input:keyboard_target}"
// ],
// "group": {
// "kind": "build",
// "isDefault": true
// },
// }
],
"inputs": [
{
"id": "keyboard_target",
"type": "command",
"command": "shellCommand.execute",
"args": {
"command": "type build\\targets",
"description": "Target:",
"fieldSeparator": "|"
},
},
{
"id": "all_keyboards",
"type": "command",
"command": "shellCommand.execute",
"args": {
"command": "type build\\all_keyboards",
"description": "Keyboard:",
"default": ""
},
},
{
"id": "keymap",
"description": "Keymap:",
"type": "pickString",
"options":[
"default"
]
},
{
"id": "keyboard_keymap",
"type": "command",
"command": "shellCommand.execute",
"args": {
"command": "cmake -D QMK_KEYBOARD_FOLDER=\"${input:all_keyboards}\" -P ${workspaceFolder}/cmake/GetKeymaps.cmake && type build\\keyboard_keymaps",
"description": "Keymap:",
"default": ""
},
},
]
}

97
CMakeLists.txt Normal file
View File

@ -0,0 +1,97 @@
cmake_minimum_required(VERSION 3.20)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
include(UpdateSubmodule)
include(ResolveKeyboard)
include(ValidateJson)
include(ProcessKeyboard)
set(QMK_KEYBOARDS_FOLDER "${CMAKE_SOURCE_DIR}/keyboards")
function(_get_all_cmake_targets out_var current_dir)
get_property(targets DIRECTORY ${current_dir} PROPERTY BUILDSYSTEM_TARGETS)
get_property(subdirs DIRECTORY ${current_dir} PROPERTY SUBDIRECTORIES)
foreach(subdir ${subdirs})
_get_all_cmake_targets(subdir_targets ${subdir})
list(APPEND targets ${subdir_targets})
endforeach()
set(${out_var} ${targets} PARENT_SCOPE)
endfunction()
if(NOT DEFINED QMK_KEYBOARD)
# configure step - populate targets
project(qmk_firmware)
add_subdirectory(keyboards)
else()
# build step
if(NOT DEFINED QMK_KEYMAP_FOLDER)
set(QMK_KEYMAP_FOLDER "default")
endif()
resolve_keyboard(${QMK_KEYBOARD_FOLDER} QMK_KEYBOARD_FOLDER_ABS)
cmake_path(IS_PREFIX QMK_KEYBOARDS_FOLDER "${QMK_KEYBOARD_FOLDER_ABS}" IS_KEYBOARDS_FOLDER)
resolve_config_h(${QMK_KEYBOARD_FOLDER_ABS} QMK_KEYBOARD_CONFIG_H)
process_keyboard()
resolve_keyboard_h(${QMK_KEYBOARD_FOLDER_ABS} QMK_KEYBOARD_H)
resolve_keymap_c(${QMK_KEYBOARD_FOLDER_ABS} ${QMK_KEYMAP_FOLDER} QMK_KEYMAP_C)
message(STATUS "config.h: ${QMK_KEYBOARD_CONFIG_H}")
message(STATUS "keyboard.h: ${QMK_KEYBOARD_H}")
message(STATUS "keymap.c: ${QMK_KEYMAP_C}")
project(${QMK_KEYBOARD}
LANGUAGES C CXX ASM
HOMEPAGE_URL ${URL}
VERSION ${DEVICE_VER})
# add_compile_options(
# -include ${QMK_KEYBOARD_CONFIG_H}
# )
add_compile_definitions(
QMK_KEYBOARD_H="${QMK_KEYBOARD_H}"
KEYBOARD_${QMK_KEYBOARD}
KEYMAP_C="${QMK_KEYMAP_C}"
MATRIX_ROWS=8
MATRIX_COLS=6
)
if(DEFINED DIODE_DIRECTION)
add_compile_definitions(DIODE_DIRECTION=${DIODE_DIRECTION})
endif()
include_directories(${CMAKE_SOURCE_DIR})
# if(EXISTS ${QMK_KEYBOARD_FOLDER_ABS}/CMakeLists.txt)
# add_subdirectory(${QMK_KEYBOARD_FOLDER_ABS})
# else()
file(GLOB KEYBOARD_SRC "${QMK_KEYBOARD_FOLDER_ABS}/*.c")
list(REMOVE_ITEM KEYBOARD_SRC "${QMK_KEYMAP_C}")
add_qmk_executable(${TARGET_NAME} ${KEYBOARD_SRC})
# endif()
# add_library(qmk)
target_precompile_headers(qmk PUBLIC
${QMK_KEYBOARD_CONFIG_H}
)
resolve_keyboard_includes(${QMK_KEYBOARD_FOLDER_ABS})
add_subdirectory(quantum)
add_subdirectory(platforms)
add_subdirectory(tmk_core/protocol)
include(features/oled)
include(features/backlight)
include(features/eeprom)
include(features/matrix)
include(features/fnv)
endif()

6
Dockerfile Normal file
View File

@ -0,0 +1,6 @@
FROM qmkfm/qmk_cli
VOLUME /qmk_firmware
WORKDIR /qmk_firmware
CMD qmk compile -kb all -km default

View File

@ -21,7 +21,7 @@ DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "QMK Firmware"
PROJECT_NUMBER = https://github.com/qmk/qmk_firmware
PROJECT_BRIEF = "Keyboard controller firmware for Atmel AVR and ARM USB families"
OUTPUT_DIRECTORY = .build/docs/static/doxygen
OUTPUT_DIRECTORY = .build/doxygen
ALLOW_UNICODE_NAMES = NO
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
@ -40,8 +40,8 @@ ABBREVIATE_BRIEF = "The $name class" \
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO
QT_AUTOBRIEF = NO
@ -49,13 +49,13 @@ MULTILINE_CPP_IS_BRIEF = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 4
ALIASES =
TCL_SUBST =
ALIASES =
TCL_SUBST =
OPTIMIZE_OUTPUT_FOR_C = YES
OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
EXTENSION_MAPPING =
EXTENSION_MAPPING =
MARKDOWN_SUPPORT = YES
TOC_INCLUDE_HEADINGS = 2
AUTOLINK_SUPPORT = YES
@ -104,14 +104,14 @@ GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_FILES = YES
SHOW_NAMESPACES = YES
FILE_VERSION_FILTER =
LAYOUT_FILE =
CITE_BIB_FILES =
FILE_VERSION_FILTER =
LAYOUT_FILE =
CITE_BIB_FILES =
#---------------------------------------------------------------------------
# Configuration options related to warning and progress messages
@ -124,7 +124,7 @@ WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_AS_ERROR = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
WARN_LOGFILE =
#---------------------------------------------------------------------------
# Configuration options related to the input files
@ -143,19 +143,19 @@ FILE_PATTERNS = *.c \
*.hpp \
*.h++
RECURSIVE = YES
EXCLUDE =
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = */protocol/arm_atsam/*
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
FILTER_SOURCE_PATTERNS =
USE_MDFILE_AS_MAINPAGE =
FILTER_SOURCE_PATTERNS =
USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
# Configuration options related to source browsing
@ -177,7 +177,7 @@ VERBATIM_HEADERS = YES
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to disabled outputs
@ -207,18 +207,18 @@ ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED = __DOXYGEN__ PROGMEM
EXPAND_AS_DEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration options related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
EXTERNAL_PAGES = YES
@ -229,14 +229,14 @@ PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
MSCGEN_PATH =
DIA_PATH =
MSCGEN_PATH =
DIA_PATH =
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO
DOT_NUM_THREADS = 0
DOT_FONTNAME = Helvetica
DOT_FONTSIZE = 10
DOT_FONTPATH =
DOT_FONTPATH =
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
@ -251,13 +251,13 @@ GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
INTERACTIVE_SVG = NO
DOT_PATH =
DOTFILE_DIRS =
MSCFILE_DIRS =
DIAFILE_DIRS =
PLANTUML_JAR_PATH =
PLANTUML_CFG_FILE =
PLANTUML_INCLUDE_PATH =
DOT_PATH =
DOTFILE_DIRS =
MSCFILE_DIRS =
DIAFILE_DIRS =
PLANTUML_JAR_PATH =
PLANTUML_CFG_FILE =
PLANTUML_INCLUDE_PATH =
DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 0
DOT_TRANSPARENT = NO

View File

@ -38,11 +38,6 @@ $(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
@ -196,20 +191,9 @@ define PARSE_KEYBOARD
KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_4)/keymaps/*/.)))
KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_5)/keymaps/*/.)))
ifneq ($(QMK_USERSPACE),)
KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(QMK_USERSPACE)/keyboards/$$(KEYBOARD_FOLDER_PATH_1)/keymaps/*/.)))
KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(QMK_USERSPACE)/keyboards/$$(KEYBOARD_FOLDER_PATH_2)/keymaps/*/.)))
KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(QMK_USERSPACE)/keyboards/$$(KEYBOARD_FOLDER_PATH_3)/keymaps/*/.)))
KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(QMK_USERSPACE)/keyboards/$$(KEYBOARD_FOLDER_PATH_4)/keymaps/*/.)))
KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(QMK_USERSPACE)/keyboards/$$(KEYBOARD_FOLDER_PATH_5)/keymaps/*/.)))
endif
KEYBOARD_LAYOUTS := $(shell $(QMK_BIN) list-layouts --keyboard $1)
LAYOUT_KEYMAPS :=
$$(foreach LAYOUT,$$(KEYBOARD_LAYOUTS),$$(eval LAYOUT_KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/layouts/*/$$(LAYOUT)/*/.)))))
ifneq ($(QMK_USERSPACE),)
$$(foreach LAYOUT,$$(KEYBOARD_LAYOUTS),$$(eval LAYOUT_KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(QMK_USERSPACE)/layouts/$$(LAYOUT)/*/.)))))
endif
KEYMAPS := $$(sort $$(KEYMAPS) $$(LAYOUT_KEYMAPS))
@ -316,18 +300,17 @@ endef
define BUILD_TEST
TEST_PATH := $1
TEST_NAME := $$(notdir $$(TEST_PATH))
TEST_FULL_NAME := $$(subst /,_,$$(patsubst $$(ROOT_DIR)tests/%,%,$$(TEST_PATH)))
MAKE_TARGET := $2
COMMAND := $1
MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f $(BUILDDEFS_PATH)/build_test.mk $$(MAKE_TARGET)
MAKE_VARS := TEST=$$(TEST_NAME) TEST_OUTPUT=$$(TEST_FULL_NAME) TEST_PATH=$$(TEST_PATH) FULL_TESTS="$$(FULL_TESTS)"
MAKE_VARS := TEST=$$(TEST_NAME) TEST_PATH=$$(TEST_PATH) FULL_TESTS="$$(FULL_TESTS)"
MAKE_MSG := $$(MSG_MAKE_TEST)
$$(eval $$(call BUILD))
ifneq ($$(MAKE_TARGET),clean)
TEST_EXECUTABLE := $$(TEST_OUTPUT_DIR)/$$(TEST_FULL_NAME).elf
TESTS += $$(TEST_FULL_NAME)
TEST_EXECUTABLE := $$(TEST_OUTPUT_DIR)/$$(TEST_NAME).elf
TESTS += $$(TEST_NAME)
TEST_MSG := $$(MSG_TEST)
$$(TEST_FULL_NAME)_COMMAND := \
$$(TEST_NAME)_COMMAND := \
printf "$$(TEST_MSG)\n"; \
$$(TEST_EXECUTABLE); \
if [ $$$$? -gt 0 ]; \
@ -337,12 +320,6 @@ define BUILD_TEST
endif
endef
define LIST_TEST
include $(BUILDDEFS_PATH)/testlist.mk
FOUND_TESTS := $$(patsubst ./tests/%,%,$$(TEST_LIST))
$$(info $$(FOUND_TESTS))
endef
define PARSE_TEST
TESTS :=
TEST_NAME := $$(firstword $$(subst :, ,$$(RULE)))
@ -351,7 +328,7 @@ define PARSE_TEST
ifeq ($$(TEST_NAME),all)
MATCHED_TESTS := $$(TEST_LIST)
else
MATCHED_TESTS := $$(foreach TEST, $$(TEST_LIST),$$(if $$(findstring x$$(TEST_NAME)x, x$$(patsubst ./tests/%,%,$$(TEST)x)), $$(TEST),))
MATCHED_TESTS := $$(foreach TEST, $$(TEST_LIST),$$(if $$(findstring $$(TEST_NAME), $$(notdir $$(TEST))), $$(TEST),))
endif
$$(foreach TEST,$$(MATCHED_TESTS),$$(eval $$(call BUILD_TEST,$$(TEST),$$(TEST_TARGET))))
endef
@ -436,10 +413,6 @@ git-submodules: git-submodule
list-keyboards:
$(QMK_BIN) list-keyboards --no-resolve-defaults | tr '\n' ' '
.PHONY: list-tests
list-tests:
$(eval $(call LIST_TEST))
.PHONY: generate-keyboards-file
generate-keyboards-file:
$(QMK_BIN) list-keyboards --no-resolve-defaults
@ -450,33 +423,8 @@ clean:
rm -rf $(BUILD_DIR)
echo 'done.'
.PHONY: distclean distclean_qmk
distclean: distclean_qmk
distclean_qmk: clean
.PHONY: distclean
distclean: clean
echo -n 'Deleting *.bin, *.hex, and *.uf2 ... '
rm -f *.bin *.hex *.uf2
echo 'done.'
ifneq ($(QMK_USERSPACE),)
.PHONY: distclean_userspace
distclean: distclean_userspace
distclean_userspace: clean
echo -n 'Deleting userspace *.bin, *.hex, and *.uf2 ... '
rm -f $(QMK_USERSPACE)/*.bin $(QMK_USERSPACE)/*.hex $(QMK_USERSPACE)/*.uf2
echo 'done.'
endif
# Extra targets for formatting and/or pytest, running within the qmk/qmk_cli container to match GHA.
CONTAINER_PREAMBLE := export HOME="/tmp"; export PATH="/tmp/.local/bin:\$$PATH"; python3 -m pip install --upgrade pip; python3 -m pip install -r requirements-dev.txt
.PHONY: format-core
format-core:
RUNTIME=docker ./util/docker_cmd.sh bash -lic "$(CONTAINER_PREAMBLE); qmk format-c --core-only -a && qmk format-python -a"
.PHONY: pytest
pytest:
RUNTIME=docker ./util/docker_cmd.sh bash -lic "$(CONTAINER_PREAMBLE); qmk pytest"
.PHONY: format-and-pytest
format-and-pytest:
RUNTIME=docker ./util/docker_cmd.sh bash -lic "$(CONTAINER_PREAMBLE); qmk format-c --core-only -a && qmk format-python -a && qmk pytest"

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