Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

Commit

Permalink
Merge qmk_userspace
Browse files Browse the repository at this point in the history
  • Loading branch information
tzarc committed Jul 30, 2024
2 parents 0a85e22 + 0f10c50 commit 368f0cc
Show file tree
Hide file tree
Showing 15 changed files with 583 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
BasedOnStyle: Google
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: 'true'
AlignConsecutiveDeclarations: 'true'
AlignOperands: 'true'
AllowAllParametersOfDeclarationOnNextLine: 'false'
AllowShortCaseLabelsOnASingleLine: 'false'
AllowShortFunctionsOnASingleLine: Empty
AllowShortLoopsOnASingleLine: 'false'
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: 'false'
BinPackArguments: 'true'
BinPackParameters: 'true'
ColumnLimit: '1000'
IndentCaseLabels: 'true'
IndentPPDirectives: AfterHash
IndentWidth: '4'
MaxEmptyLinesToKeep: '1'
PointerAlignment: Right
SortIncludes: 'false'
SpaceBeforeAssignmentOperators: 'true'
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: 'false'
SpacesBeforeTrailingComments: 1
TabWidth: '4'
UseTab: Never

...
4 changes: 4 additions & 0 deletions .clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CompileFlags:
Add: [-Wno-unknown-attributes, -Wno-maybe-uninitialized, -Wno-unknown-warning-option]
Remove: [-W*, -mmcu=*, -mcpu=*, -mfpu=*, -mfloat-abi=*, -mno-unaligned-access, -mno-thumb-interwork, -mcall-prologues]
Compiler: clang
33 changes: 33 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
{
"name": "QMK CLI",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "ghcr.io/qmk/qmk_cli",
"customizations": {
"vscode": {
"extensions": [
"amodio.toggle-excluded-files",
"EditorConfig.EditorConfig",
"xaver.clang-format",
"llvm-vs-code-extensions.vscode-clangd",
"bierner.github-markdown-preview",
"donjayamanne.git-extension-pack",
"ms-vscode-remote.remote-containers"
]
}
},
"postCreateCommand": "${containerWorkspaceFolder}/.devcontainer/setup.sh ${containerWorkspaceFolder}"

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
23 changes: 23 additions & 0 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash

set -eEuo pipefail

wget https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py
python3 -m pip install qmk
rm get-pip.py

python3 -m pip install --upgrade milc

userspacePath="$1"

git config --global --add safe.directory "$userspacePath"
git submodule update --init --recursive

[ -d /workspaces/qmk_firmware ] || git clone https://github.com/qmk/qmk_firmware.git /workspaces/qmk_firmware
git config --global --add safe.directory /workspaces/qmk_firmware

qmk config user.qmk_home=/workspaces/qmk_firmware
qmk config user.overlay_dir="$userspacePath"

qmk git-submodule
32 changes: 32 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 4

# We recommend you to keep these unchanged
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
indent_size = 4

[{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

[Makefile]
end_of_line = lf
indent_style = tab

[*.sh]
end_of_line = lf
20 changes: 20 additions & 0 deletions .github/workflows/build_binaries.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build QMK firmware

on: [push, workflow_dispatch]

permissions:
contents: write

jobs:
build:
name: 'QMK Userspace Build'
uses: qmk/.github/.github/workflows/qmk_userspace_build.yml@main
with:
qmk_repo: qmk/qmk_firmware
qmk_ref: master

publish:
name: 'QMK Userspace Publish'
uses: qmk/.github/.github/workflows/qmk_userspace_publish.yml@main
if: always() && !cancelled()
needs: build
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Junk files
*.bak
*.swp
*~
.DS_Store
._*

# Firmware files
*.hex
*.bin
*.uf2
12 changes: 12 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Suggested extensions
{
"recommendations": [
"amodio.toggle-excluded-files",
"EditorConfig.EditorConfig",
"xaver.clang-format",
"llvm-vs-code-extensions.vscode-clangd",
"bierner.github-markdown-preview",
"donjayamanne.git-extension-pack",
"ms-vscode-remote.remote-containers"
]
}
Loading

0 comments on commit 368f0cc

Please sign in to comment.