Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZMK Upstream Rebase (24.6-alpha) #31

Open
wants to merge 134 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
cdcf4eb
feat(boards): allow use of blackpill_f401cc
lesshonor Feb 10, 2024
40adb38
refactor(boards): remove superfluous conf settings
lesshonor Feb 10, 2024
c7fb418
fix(build): Used a fixed temp dir for caching.
petejohanson Feb 14, 2024
0f49fa9
fix(behavior): Proper init priority for ext_power.
ctranstrum Feb 15, 2024
604af2e
feat(docs): Add pointers for peripheral battery monitoring (#2177)
dennisorlando Feb 18, 2024
fda6a5f
fix(boards): Tweaks for Ferris rev0.2 for Zephyr.
petejohanson Feb 18, 2024
a9ae679
fix(display): Proper initial display of battery status
zhiayang Feb 20, 2024
c082f8d
fix(boards): Add ext power init delay for nrfMicro
ton-im Feb 20, 2024
ccf0380
refactor: remove redundant Kconfig defaults
lesshonor Feb 12, 2024
b44ec38
feat(boards): add encoder support to planck
Feb 9, 2024
104c73d
refactor: address transport switch enumeration warning
xudongzheng Nov 9, 2023
c007d60
feat(behaviors): hold while undecided
theol0403 May 23, 2023
8b20874
chore: remove label in test
theol0403 Dec 19, 2023
c9c620d
fix: inline initialise
theol0403 Feb 3, 2024
db7b197
fix(docs): Add underglow brightness min/max (#2180)
Feb 28, 2024
37af94e
feat(docs): Add warning to new shield docs how Kconfig treats whitspaces
huber-th Mar 4, 2024
08ab45f
feat(CONTRIBUTING.md): Add info regarding ESLint
huber-th Mar 4, 2024
2adaa00
fix(build): Properly board revision keymaps.
petejohanson Mar 8, 2024
610a806
feat: Add function to erase all settings
joelspadin Nov 26, 2023
1dfcfc7
feat(shields): Make settings_reset shield reset all settings
joelspadin Nov 26, 2023
14b06a3
docs: Update settings_reset documentation
joelspadin Feb 4, 2024
a77288f
fix: Update settings reset for Zephyr 3.5
joelspadin Feb 24, 2024
388ad71
feat(build): Explicit missing keymap node error
ReFil Mar 18, 2024
bddee70
refactor(docs): Remove outdated Windows battery advice and unnecessar…
caksoylar Feb 27, 2024
aa6cfe2
feat(docs): Document refreshing the HID descriptor
caksoylar Feb 27, 2024
325e207
feat(docs): Add pointers to HID descriptor refresh
caksoylar Feb 27, 2024
c6e0551
fix(hid): Fix typo in HID usage alias
nicenemo Mar 18, 2024
3a38979
refactor: replace tapping_term_ms with tapping-term-ms
lesshonor Jan 9, 2024
6f2e19f
refactor: replace quick_tap_ms with quick-tap-ms
lesshonor Jan 9, 2024
8929355
fix(keymap): Replace some keypad keycodes
TheTuxis Mar 18, 2024
341534a
feat(behaviors): lazy sticky keys
theol0403 May 29, 2023
94d9d83
refactor: extract duplicate logic
theol0403 Dec 18, 2023
af7e419
chore: remove label in test
theol0403 Dec 19, 2023
ce743f2
chore: fix whitespace
theol0403 Dec 30, 2023
736c5fb
feat(docs): Add a note on macOS v14.3 file copy error message
filterpaper Mar 7, 2024
8289431
fix(docs): Fix hold-tap info callout (#2211)
theol0403 Mar 18, 2024
1f7cd7a
feat(docs): Add troubleshooting section for empty_file error
filterpaper Mar 19, 2024
3a3eed2
fix: Add settings reset on start init priority.
petejohanson Mar 19, 2024
931a36f
feat(docs): Add a note on using BT with dual boot systems
caksoylar Feb 28, 2024
4435879
feat: Add ability to fetch battery voltage.
petejohanson Mar 15, 2024
f2d8b9b
feat(docs): Add Behavior overview page
huber-th Mar 20, 2024
c684cee
refactor(docs): Refer to overview page for behaviors
caksoylar Mar 25, 2024
94c3b9a
feat(build): Allow specifying snippets for a build.
petejohanson Mar 24, 2024
e806cd6
feat(gitignore): add clangd cache folder
huber-th Mar 27, 2024
58ccc59
fix(build): Modify function return type
huber-th Mar 27, 2024
adb3a13
feat: Add soft on/off support.
petejohanson Mar 16, 2023
738c3c0
feat(kscan): Add PM support to GPIO kscan drivers.
petejohanson Sep 13, 2023
b19df0c
feat(behaviors): Add soft off behavior.
petejohanson Sep 13, 2023
d3fffb9
feat(shields): Add soft-off to the nrf52840dk ZMK Uno
petejohanson Sep 16, 2023
860e53b
refactor: Promote new endpoints API
petejohanson Dec 7, 2023
0d4d4fb
feat(pm): Clear HID data before soft off.
petejohanson Dec 7, 2023
e78249e
fix(bt): Fix BT tests after soft off work.
petejohanson Dec 7, 2023
9696851
fix(docs): Apply suggestions from code review
petejohanson Dec 9, 2023
fceb035
refactor: Fixes for soft-off based on review.
petejohanson Dec 21, 2023
5ebe924
chore: Various soft-off review fixes
petejohanson Dec 29, 2023
933fdcd
refactor(pm): Remove scanned behavior trigger.
petejohanson Dec 30, 2023
e78b25a
feat(kscan): Direct kscan driver can use gpio-keys.
petejohanson Dec 31, 2023
a0ad1d4
refactor: Add kscan sideband behavior driver
petejohanson Dec 31, 2023
c314405
refactor(boards): Move ZMK Uno 1P3T slider to sideband
petejohanson Dec 31, 2023
09111f1
fix: Sleep after clearing endpoints to wait for send.
petejohanson Dec 31, 2023
4198fac
fix(pm): Fix deep sleep with sideband behaviors.
petejohanson Jan 3, 2024
5d960a7
fix: Cleanups of sideband and direct kscan from review.
petejohanson Jan 22, 2024
bd21f41
refactor: Fixes for review feedback.
petejohanson Jan 26, 2024
8d54e28
fix: Adjustments for Zephyr 3.5.
petejohanson Feb 19, 2024
cac999b
feat: Updated soft-off docs.
petejohanson Feb 20, 2024
bb94a7a
fix: Fixes for building soft off without deep sleep.
petejohanson Feb 20, 2024
fa9ea9e
fix(docs): Fix soft off waker prop name, headers.
petejohanson Mar 16, 2024
2df6dcd
feat(behaviors): More logging in soft off.
petejohanson Mar 16, 2024
d0e0ecb
refactor: Use kscan directly to wake when we can.
petejohanson Mar 25, 2024
41d8180
fix(pm): Use Zephyr created device slots.
petejohanson Mar 25, 2024
7e7110d
fix(pm): Fixes for dedicated on/off on peripherals.
petejohanson Mar 25, 2024
29c0cdb
fix(shields): Fix for direct use with ZMK Uno split.
petejohanson Mar 25, 2024
e66f068
fix(docs): Minor soft-off docs tweaks from review.
petejohanson Mar 28, 2024
f9bb18b
fix(docs): Add `&soft_off` to behaviors index.
petejohanson Mar 28, 2024
3491078
chore(deps): bump webpack-dev-middleware from 5.3.3 to 5.3.4 in /docs
dependabot[bot] Mar 23, 2024
25bb126
chore(deps): bump express from 4.18.2 to 4.19.2 in /docs
dependabot[bot] Mar 28, 2024
18b86b7
chore(deps): bump follow-redirects from 1.15.5 to 1.15.6 in /docs
dependabot[bot] Mar 28, 2024
d672b0c
chore(deps): bump react-toastify from 7.0.4 to 10.0.5 in /docs
dependabot[bot] Mar 28, 2024
fff1cbe
fix: Add wakeup-source; to kscan nodes for ZMK_SLEEP.
petejohanson Mar 29, 2024
4bef4e9
feat(boards): Support board revisions in setup scripts.
zhiayang Mar 30, 2024
e65a122
fix(docs): Correct property types for behavior bindings
caksoylar Mar 29, 2024
eb5a6fc
refactor(docs): Split DT props table for sensor rotate variants
caksoylar Mar 29, 2024
e7d6519
fix(docs): Fix and note GPIO flags for charlieplex config
tobiasarndt Mar 31, 2024
fe509c4
fix(kscan): Enable charlieplex interrupts for single compatible device
tobiasarndt Mar 31, 2024
7d5aa0c
feat(docs): Update section for devicetree_generated error
filterpaper Apr 4, 2024
849eca7
refactor(underglow): fix uninitialized variable warning
xudongzheng Feb 23, 2024
7a51a46
feat(docs): Add pointer to shields folder in new shield docs
caksoylar Feb 27, 2024
dfc6dc8
fix(docs): Make clear the matrix transform example is incomplete
caksoylar Feb 27, 2024
a9021de
fix(docs): Add wakeup-source to split new shield example
caksoylar Apr 9, 2024
e22bc76
fix(hid): Correct off-by-one buffer overflow with NKRO
khoek Apr 7, 2024
16e92cf
fix(behaviors): Add multiple soft-off instances properly.
petejohanson Apr 18, 2024
f4a070a
fix(boards): nrf boards missing SPI in pinctrl and dtsi, requiring us…
sadekbaroudi Apr 21, 2024
4d56685
fix(rgb): auto-off logic
elpekenin Apr 25, 2024
0d3a4b7
fix(underglow): Correctly set underglow state
jradtilbrook Apr 25, 2024
d1ad347
fix: shortening keymap_soft_off behavior node
GermanG Apr 29, 2024
af90882
fix: Initialize sideband kscan in APPLICATION.
petejohanson May 1, 2024
2423136
fix(boards): Fix pulls on ZMK uno toggle switch
ReFil May 3, 2024
4dfc45d
feat(docs): Document example toggle-mode implementation
ReFil May 3, 2024
7d1f84e
chore: fix typos in various places
HigherOrderLogic May 13, 2024
8f5c7bb
chore(deps): bump pre-commit/action from 3.0.0 to 3.0.1
dependabot[bot] Feb 26, 2024
f0b20c1
feat(boards): Add nRF52 high voltage DC/DC config
joelspadin Oct 13, 2023
2ee76be
fix(soft_off): central waits 100ms in split if hold_time enabled
GermanG May 13, 2024
2d96f46
fix(docs): Removing to-to typos (#2310)
Nick-Munnich May 26, 2024
308d6bc
feat(docs): Improve the toolchain setup page (#2272)
Nick-Munnich Jun 2, 2024
e56db30
refactor(docs): Split up troubleshooting page into a section
caksoylar Jun 10, 2024
7c09eb2
refactor(docs): Document and enforce header casing conventions
caksoylar Jun 10, 2024
a080b52
refactor: Remove static CDC ACM logging nodes.
petejohanson Jun 17, 2024
7be955f
fix(usb): Ensure USB init is last
petejohanson Jun 21, 2024
7cdf1e4
fix: Actually add the `zmk-usb-logging` snippet.
petejohanson Jun 24, 2024
03099b0
feat(behaviors): Add behavior metadata information.
petejohanson Mar 27, 2024
3e2c428
chore: Add rp2040/USB logging core coverage.
petejohanson Jun 24, 2024
0bea783
ci(build): amend changed-files invocation
lesshonor Mar 25, 2024
7c9477b
ci(build): improve security posture
lesshonor Mar 25, 2024
9c6d1af
ci(build): limit run scope
lesshonor Mar 25, 2024
4dce096
docs: improve settings_reset link
lesshonor Apr 7, 2024
10d03ca
fix: adding option to separate implicit mod release from key release
Timoyoungster Jun 14, 2024
29599e8
docs: hopefully more clear description of the new setting
Timoyoungster Jun 14, 2024
49f7275
fix: Add metadata to missed behaviors.
petejohanson Jun 25, 2024
b576d52
feat(core): Support adding subs to other listeners.
petejohanson Mar 27, 2024
f7c34c7
refactor(ble): Extract API to get active profile connection.
petejohanson Apr 5, 2024
483a493
feat(behaviors): Add local ID system for behaviors
petejohanson Apr 17, 2024
96e55c8
fix: BLE refactor mouse keys fix.
petejohanson Jun 28, 2024
f2ea1da
fix(boards): Suppress devicetree warning
ReFil Jun 30, 2024
f18974e
fix: Adjust hid indicator listeners for event refactor
petejohanson Jul 1, 2024
9ef2e8e
rgb_underglow: refresh more frequently for smoother RGB underglow
chrisandreae May 28, 2022
e71732c
RGB underglow status support
donaldsycamore Jul 13, 2022
6ce3a79
RGB underglow: dim or disable when battery low
donaldsycamore Sep 28, 2022
a9d4805
ext_power: add Kconfig for initial ext_power state
donaldsycamore Jan 21, 2023
ddad581
Include the serial number in the Bluetooth device name
chrisandreae Feb 15, 2023
476550b
Add build environment using Nix
chrisandreae Sep 18, 2021
28cc218
Github build action: build Glove80 combined firmware using Nix
chrisandreae Sep 18, 2022
a75d6aa
Docker container and lambda function for performing firmware builds
chrisandreae Oct 11, 2021
e4f167f
Configure Glove80 board definitions for custom features
moergo-sc Sep 19, 2021
3fc2867
lambda-compiler DTS validation: extend stub to define &underglow_indi…
chrisandreae Sep 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
# Docker on Windows.
.bashrc text eol=lf
*.sh text eol=lf
*.nix text eol=lf
110 changes: 110 additions & 0 deletions .github/workflows/build-container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: Build Compiler Service Container

on:
push:
tags:
- "*"
pull_request_target:
branches:
- main

jobs:
build:
# This job must never be run on a PR from outside the same repository
if: github.repository == 'moergo-sc/zmk' && (github.event.pull_request == null || github.event.pull_request.head.repo.full_name == github.repository)
runs-on: ubuntu-latest
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read
env:
ECR_REPOSITORY: zmk-builder-lambda
VERSIONS_BUCKET: glove80firmwarepipelines-compilerversionsbucket44-zubaquiyjdam
UPDATE_COMPILER_VERSIONS_FUNCTION: arn:aws:lambda:us-east-1:431227615537:function:Glove80FirmwarePipelineSt-UpdateCompilerVersions2A-CNxPOHb4VSuV
REVISION_TAG: ${{ github.event.pull_request && github.event.pull_request.head.sha || github.sha }}
PR_NUMBER: ${{ github.event.number }}
steps:
- uses: actions/checkout@v4
with:
repository: moergo-sc/zmk
ref: ${{ github.event.pull_request && github.event.pull_request.head.sha || github.sha }}
fetch-depth: 0
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::431227615537:role/GithubCompilerLambdaBuilder
aws-region: us-east-1
- name: Extract container name from branch name
shell: bash
run: |
if [ "$GITHUB_HEAD_REF" ]; then
branch_ref="$GITHUB_HEAD_REF"
type="pr"
tag="pr${PR_NUMBER}.${GITHUB_HEAD_REF}"
elif [[ "$GITHUB_REF" == refs/tags/* ]]; then
branch_ref="$GITHUB_REF"
type="tag"
tag="${GITHUB_REF#refs/tags/}"
else
echo "Not a pull request or release tag" >&2
exit 1
fi
# Replace / with . in container tag names
tag="${tag//\//.}"
echo "VERSION_BRANCH=${branch_ref}" >> $GITHUB_ENV
echo "VERSION_TYPE=${type}" >> $GITHUB_ENV
echo "VERSION_NAME=${tag}" >> $GITHUB_ENV
id: extract_name
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-22.05
- uses: cachix/cachix-action@v15
with:
name: moergo-glove80-zmk-dev
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Build lambda image
run: nix-build release.nix --arg revision "\"${REVISION_TAG}\"" -A lambdaImage -o lambdaImage
- name: Import OCI image into docker-daemon
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
run: nix shell -f nix/pinned-nixpkgs.nix skopeo -c skopeo --insecure-policy copy oci:lambdaImage docker-daemon:$REGISTRY/$ECR_REPOSITORY:$REVISION_TAG
- name: Push container image to Amazon ECR
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
run: docker push $REGISTRY/$ECR_REPOSITORY:$REVISION_TAG
- name: Create JSON metadata to represent the built container
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
shell: bash
run: |
digest="$(docker inspect --format='{{index .RepoDigests 0}}' $REGISTRY/$ECR_REPOSITORY:$REVISION_TAG)"
digest="${digest##*@}"
api_version="$(cat lambda/api_version.txt)"
timestamp="$(date -u +"%Y%m%d.%H%M%S")"

if [ "$VERSION_TYPE" = "pr" ]; then
release_name="$VERSION_NAME.$timestamp"
else
release_name="$VERSION_NAME"
fi

jq -n '$ARGS.named' \
--arg name "$release_name" \
--arg version_name "$VERSION_NAME" \
--arg revision "$REVISION_TAG" \
--arg release_time "$timestamp" \
--arg branch "$VERSION_BRANCH" \
--arg digest "$digest" \
--arg api_version "$api_version" \
> "/tmp/$VERSION_NAME.json"
- name: Upload image metadata file to versions bucket
run: aws s3 cp "/tmp/$VERSION_NAME.json" "s3://$VERSIONS_BUCKET/images/$VERSION_NAME.json"
- name: Notify the build pipeline that the compile containers have updated
run: >-
aws lambda invoke --function-name $UPDATE_COMPILER_VERSIONS_FUNCTION
--invocation-type Event
--cli-binary-format raw-in-base64-out
/dev/null
11 changes: 9 additions & 2 deletions .github/workflows/build-user-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,23 @@ jobs:
board: ${{ matrix.board }}
shield: ${{ matrix.shield }}
artifact_name: ${{ matrix.artifact-name }}
snippet: ${{ matrix.snippet }}
run: |
if [ -e zephyr/module.yml ]; then
export zmk_load_arg=" -DZMK_EXTRA_MODULES='${GITHUB_WORKSPACE}'"
export new_tmp_dir=$(mktemp -d)
new_tmp_dir="${TMPDIR:-/tmp}/zmk-config"
mkdir -p "${new_tmp_dir}"
echo "base_dir=${new_tmp_dir}" >> $GITHUB_ENV
else
echo "base_dir=${GITHUB_WORKSPACE}" >> $GITHUB_ENV
fi

if [ -n "${snippet}" ]; then
extra_west_args="-S \"${snippet}\""
fi

echo "zephyr_version=${ZEPHYR_VERSION}" >> $GITHUB_ENV
echo "extra_west_args=${extra_west_args}" >> $GITHUB_ENV
echo "extra_cmake_args=${shield:+-DSHIELD=\"$shield\"}${zmk_load_arg}" >> $GITHUB_ENV
echo "display_name=${shield:+$shield - }${board}" >> $GITHUB_ENV
echo "artifact_name=${artifact_name:-${shield:+$shield-}${board}-zmk}" >> $GITHUB_ENV
Expand Down Expand Up @@ -119,7 +126,7 @@ jobs:
- name: West Build (${{ env.display_name }})
working-directory: ${{ env.base_dir }}
shell: sh -x {0}
run: west build -s zmk/app -d "${{ env.build_dir }}" -b "${{ matrix.board }}" -- -DZMK_CONFIG=${{ env.base_dir }}/${{ inputs.config_path }} ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }}
run: west build -s zmk/app -d "${{ env.build_dir }}" -b "${{ matrix.board }}" ${{ env.extra_west_args }} -- -DZMK_CONFIG=${{ env.base_dir }}/${{ inputs.config_path }} ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }}

- name: ${{ env.display_name }} Kconfig file
run: |
Expand Down
31 changes: 24 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ on:
schedule:
- cron: "22 4 * * *"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name == 'schedule' }}
cancel-in-progress: true

permissions: {}

jobs:
build:
if: ${{ always() }}
if: ${{ false }}
runs-on: ubuntu-latest
container:
image: docker.io/zmkfirmware/zmk-build-arm:3.5
Expand All @@ -25,6 +31,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Cache west modules
uses: actions/cache@v4
env:
Expand Down Expand Up @@ -131,7 +139,7 @@ jobs:
throw new Error('Failed to build one or more configurations');
}
compile-matrix:
if: ${{ always() }}
if: ${{ false && !cancelled() }}
runs-on: ubuntu-latest
needs: [core-coverage, board-changes, nightly]
outputs:
Expand Down Expand Up @@ -171,14 +179,16 @@ jobs:
shieldArgs: JSON.stringify(shieldArgs),
}));
core-coverage:
if: ${{ needs.get-changed-files.outputs.core-changes == 'true' }}
if: ${{ false && needs.get-changed-files.outputs.core-changes == 'true' }}
runs-on: ubuntu-latest
needs: get-changed-files
outputs:
core-include: ${{ steps.core-list.outputs.result }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -200,7 +210,7 @@ jobs:

return [...include, ...coreCoverage.include];
board-changes:
if: ${{ needs.get-changed-files.outputs.board-changes == 'true' }}
if: ${{ false && needs.get-changed-files.outputs.board-changes == 'true' }}
runs-on: ubuntu-latest
needs: [get-grouped-hardware, get-changed-files]
outputs:
Expand Down Expand Up @@ -284,7 +294,7 @@ jobs:
});
}))).flat();
nightly:
if: ${{ github.event_name == 'schedule' }}
if: ${{ false && github.event_name == 'schedule' && github.repository_owner == 'zmkfirmware' }}
runs-on: ubuntu-latest
needs: get-grouped-hardware
outputs:
Expand Down Expand Up @@ -329,12 +339,15 @@ jobs:

return [...includeOnboard, ...includeInterconnect];
get-grouped-hardware:
if: ${{ false }}
runs-on: ubuntu-latest
outputs:
organized-metadata: ${{ steps.organize-metadata.outputs.result }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -406,14 +419,18 @@ jobs:
return JSON.stringify(grouped).replace(/\\/g,"\\\\").replace(/`/g,"\\`");
result-encoding: string
get-changed-files:
if: ${{ github.event_name != 'schedule' }}
if: ${{ false && github.event_name != 'schedule' }}
runs-on: ubuntu-latest
outputs:
changed-files: ${{ steps.changed-files.outputs.all_changed_files }}
board-changes: ${{ steps.board-changes.outputs.result }}
core-changes: ${{ steps.core-changes.outputs.result }}
steps:
- uses: tj-actions/changed-files@v42
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- uses: tj-actions/changed-files@v44
id: changed-files
with:
json: true
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/cleanup-container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Clean up PR Compiler Service Container

on:
pull_request:
types: [closed]
branches:
- main

jobs:
build:
if: github.repository == 'moergo-sc/zmk'
runs-on: ubuntu-latest
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read
env:
ECR_REPOSITORY: zmk-builder-lambda
VERSIONS_BUCKET: glove80firmwarepipelines-compilerversionsbucket44-zubaquiyjdam
UPDATE_COMPILER_VERSIONS_FUNCTION: arn:aws:lambda:us-east-1:431227615537:function:Glove80FirmwarePipelineSt-UpdateCompilerVersions2A-CNxPOHb4VSuV
PR_NUMBER: ${{ github.event.number }}
steps:
- name: Extract image tag name
shell: bash
run: |
tag="pr${PR_NUMBER}.${GITHUB_HEAD_REF}"
# Replace / with . in container tag names
tag="${tag//\//.}"
echo "VERSION_NAME=${tag}" >> $GITHUB_ENV
id: extract_name
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::431227615537:role/GithubCompilerLambdaBuilder
aws-region: us-east-1
- name: Delete the image metadata file from the versions s3 bucket
run: aws s3 rm s3://$VERSIONS_BUCKET/images/$VERSION_NAME.json
- name: Notify the build pipeline that the compile containers have updated
run: >-
aws lambda invoke --function-name $UPDATE_COMPILER_VERSIONS_FUNCTION
--invocation-type Event
--cli-binary-format raw-in-base64-out
/dev/null
62 changes: 62 additions & 0 deletions .github/workflows/nix-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build Glove80 Firmware

on:
push:
paths:
- ".github/workflows/nix-build.yml"
- "default.nix"
- "app/**"
- "nix/**"
branches:
- "**"
tags:
- "**"
pull_request:
paths:
- ".github/workflows/nix-build.yml"
- "default.nix"
- "app/**"
- "nix/**"

jobs:
build:
name: Build Glove80 Firmware
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-22.05
- uses: cachix/cachix-action@v15
with:
name: moergo-glove80-zmk-dev
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
skipPush: "${{ github.repository != 'moergo-sc/zmk' }}"
- name: Build Glove80 combined firmware
run: nix-build -A glove80_combined -o combined
- name: Copy result out of nix store
run: cp combined/glove80.uf2 glove80.uf2
- name: Upload result
uses: actions/upload-artifact@v4
with:
name: glove80.uf2
path: glove80.uf2
release:
name: Create Release for Tag
if: >-
github.repository == 'moergo-sc/zmk'
&& github.event_name == 'push'
&& contains(github.ref, 'refs/tags/v')
needs: build
runs-on: ubuntu-latest
steps:
- name: Download compiled firmware artifact
uses: actions/download-artifact@v4
with:
name: glove80.uf2
- name: Create Release for Tag
uses: ncipollo/release-action@v1
with:
artifacts: "glove80.uf2"
artifactErrorsFailBuild: true
generateReleaseNotes: true
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: 3.x
- uses: pre-commit/[email protected].0
- uses: pre-commit/[email protected].1
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@
/zephyr
/zmk-config
/build

# macOS
*.DS_Store

# Python
__pycache__
.python-version
.venv

# clangd
app/.cache/
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ documentation to areas not currently covered are greatly appreciated.
ZMK uses `prettier` to format documentation files. You can run prettier with `npm run prettier:format`.
You can setup git to run prettier automatically when you commit by installing the pre-commit hooks: `pip3 install pre-commit`, `pre-commit install`.

### Linting

This repository utilizes ESLint for code linting to ensure consistent code style and identify potential errors or bugs early in the development process.

You can run ESLint with `npm run lint` to verify your changes.

## Code Contributions

### Development Setup
Expand Down
Loading