Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
ReFil committed Aug 15, 2023
2 parents 50e6cb2 + c957348 commit 79c8ce4
Show file tree
Hide file tree
Showing 1,151 changed files with 35,831 additions and 20,242 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/zmkfirmware/zmk-dev-arm:3.0
FROM docker.io/zmkfirmware/zmk-dev-arm:3.2

COPY .bashrc tmp
RUN mv /tmp/.bashrc ~/.bashrc
24 changes: 13 additions & 11 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<!-- If you're adding a board/shield please fill out this check-list, otherwise you can delete it -->

## Board/Shield Check-list
- [ ] This board/shield is tested working on real hardware
- [ ] Definitions follow the general style of other shields/boards upstream ([Reference](https://zmk.dev/docs/development/new-shield))
- [ ] `.zmk.yml` metadata file added
- [ ] Proper Copyright + License headers added to applicable files (Generally, we stick to "The ZMK Contributors" for copyrights to help avoid churn when files get edited)
- [ ] General consistent formatting of DeviceTree files
- [ ] Keymaps do not use deprecated key defines (Check using the [upgrader tool](https://zmk.dev/docs/codes/keymap-upgrader))
- [ ] `&pro_micro` used in favor of `&pro_micro_d/a` if applicable
- [ ] If split, no name added for the right/peripheral half
- [ ] Kconfig.defconfig file correctly wraps *all* configuration in conditional on the shield symbol
- [ ] `.conf` file has optional extra features commented out
- [ ] Keyboard/PCB is part of a shipped group buy or is generally available in stock to purchase (OSH/personal projects without general availability should create a zmk-config repo instead)

- [ ] This board/shield is tested working on real hardware
- [ ] Definitions follow the general style of other shields/boards upstream ([Reference](https://zmk.dev/docs/development/new-shield))
- [ ] `.zmk.yml` metadata file added
- [ ] Proper Copyright + License headers added to applicable files (Generally, we stick to "The ZMK Contributors" for copyrights to help avoid churn when files get edited)
- [ ] General consistent formatting of DeviceTree files
- [ ] Keymaps do not use deprecated key defines (Check using the [upgrader tool](https://zmk.dev/docs/codes/keymap-upgrader))
- [ ] `&pro_micro` used in favor of `&pro_micro_d/a` if applicable
- [ ] If split, no name added for the right/peripheral half
- [ ] Kconfig.defconfig file correctly wraps _all_ configuration in conditional on the shield symbol
- [ ] `.conf` file has optional extra features commented out
- [ ] Keyboard/PCB is part of a shipped group buy or is generally available in stock to purchase (OSH/personal projects without general availability should create a zmk-config repo instead)
75 changes: 31 additions & 44 deletions .github/workflows/build-user-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ on:
default: "bin"
required: false
type: string
artifact_name:
description: 'Artifact output file name'
default: 'firmware'
archive_name:
description: "Archive output file name"
default: "firmware"
required: false
type: string

Expand All @@ -29,21 +29,18 @@ jobs:
runs-on: ubuntu-latest
name: Fetch Build Keyboards
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
build_matrix: ${{ env.build_matrix }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install yaml2json
run: python3 -m pip install remarshal

- name: Fetch Build Matrix
id: set-matrix
run: |
set -x
matrix=$(yaml2json ${{ inputs.build_matrix_path }} | jq -c .)
yaml2json ${{ inputs.build_matrix_path }}
echo "::set-output name=matrix::${matrix}"
echo "build_matrix=$(yaml2json '${{ inputs.build_matrix_path }}' | jq -c .)" >> $GITHUB_ENV
yaml2json "${{ inputs.build_matrix_path }}" | jq
build:
runs-on: ubuntu-latest
Expand All @@ -53,79 +50,69 @@ jobs:
name: Build
strategy:
fail-fast: false
matrix: ${{fromJson(needs.matrix.outputs.matrix)}}
matrix: ${{ fromJson(needs.matrix.outputs.build_matrix) }}
steps:
- name: Prepare variables
id: variables
shell: sh -x {0}
env:
shield: ${{ matrix.shield }}
run: |
set -x
if [ -n "${{ matrix.shield }}" ]
then
EXTRA_CMAKE_ARGS="-DSHIELD=\"${{ matrix.shield }}\""
ARTIFACT_NAME="${{ matrix.shield }}-${{ matrix.board }}-zmk"
DISPLAY_NAME="${{ matrix.shield }} - ${{ matrix.board }}"
else
EXTRA_CMAKE_ARGS=
DISPLAY_NAME="${{ matrix.board }}"
ARTIFACT_NAME="${{ matrix.board }}-zmk"
fi
echo ::set-output name=extra-cmake-args::${EXTRA_CMAKE_ARGS}
echo ::set-output name=artifact-name::${ARTIFACT_NAME}
echo ::set-output name=display-name::${DISPLAY_NAME}
echo ::set-output name=zephyr-version::${ZEPHYR_VERSION}
echo "zephyr_version=${ZEPHYR_VERSION}" >> $GITHUB_ENV
echo "extra_cmake_args=${shield:+-DSHIELD=\"$shield\"}" >> $GITHUB_ENV
echo "display_name=${shield:+$shield - }${{ matrix.board }}" >> $GITHUB_ENV
echo "artifact_name=${shield:+$shield-}${{ matrix.board }}-zmk" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Cache west modules
uses: actions/[email protected].2
uses: actions/[email protected].11
continue-on-error: true
env:
cache-name: cache-zephyr-${{ steps.variables.outputs.zephyr-version }}-modules
cache_name: cache-zephyr-${{ env.zephyr_version }}-modules
with:
path: |
modules/
tools/
zephyr/
bootloader/
zmk/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/west.yml', '**/build.yaml') }}
key: ${{ runner.os }}-build-${{ env.cache_name }}-${{ hashFiles('**/west.yml', '**/build.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-${{ env.cache_name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: West Init
run: west init -l ${{ inputs.config_path }}
run: west init -l "${{ inputs.config_path }}"

- name: West Update
run: west update

- name: West Zephyr export
run: west zephyr-export

- name: West Build (${{ steps.variables.outputs.display-name }})
run: |
set -x
west build -s zmk/app -b ${{ matrix.board }} -- -DZMK_CONFIG=${GITHUB_WORKSPACE}/${{ inputs.config_path }} ${{ steps.variables.outputs.extra-cmake-args }} ${{ matrix.cmake-args }}
- name: West Build (${{ env.display_name }})
shell: sh -x {0}
run: west build -s zmk/app -b "${{ matrix.board }}" -- -DZMK_CONFIG="${GITHUB_WORKSPACE}/${{ inputs.config_path }}" ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }}

- name: ${{ steps.variables.outputs.display-name }} Kconfig file
- name: ${{ env.display_name }} Kconfig file
run: grep -v -e "^#" -e "^$" build/zephyr/.config | sort

- name: Rename artifacts
shell: sh -x {0}
run: |
set -x
mkdir build/artifacts
if [ -f build/zephyr/zmk.uf2 ]
then
cp build/zephyr/zmk.uf2 "build/artifacts/${{ steps.variables.outputs.artifact-name }}.uf2"
cp build/zephyr/zmk.uf2 "build/artifacts/${{ env.artifact_name }}.uf2"
elif [ -f build/zephyr/zmk.${{ inputs.fallback_binary }} ]
then
cp build/zephyr/zmk.${{ inputs.fallback_binary }} "build/artifacts/${{ steps.variables.outputs.artifact-name }}.${{ inputs.fallback_binary }}"
cp "build/zephyr/zmk.${{ inputs.fallback_binary }}" "build/artifacts/${{ env.artifact_name }}.${{ inputs.fallback_binary }}"
fi
- name: Archive (${{ steps.variables.outputs.display-name }})
uses: actions/upload-artifact@v2
- name: Archive (${{ env.display_name }})
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.artifact_name }}
name: ${{ inputs.archive_name }}
path: build/artifacts
42 changes: 21 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ on:
- ".github/workflows/build.yml"
- "app/**"
schedule:
- cron: '22 4 * * *'
- cron: "22 4 * * *"

jobs:
build:
if: ${{ always() }}
runs-on: ubuntu-latest
container:
image: docker.io/zmkfirmware/zmk-build-arm:3.0
image: docker.io/zmkfirmware/zmk-build-arm:3.2
needs: compile-matrix
strategy:
matrix:
include: ${{ fromJSON(needs.compile-matrix.outputs.include-list) }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Cache west modules
uses: actions/[email protected]
env:
Expand All @@ -51,7 +51,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '14.x'
node-version: "14.x"
- name: Install @actions/artifact
run: npm install @actions/artifact
- name: Build and upload artifacts
Expand All @@ -64,7 +64,7 @@ jobs:
const artifactClient = artifact.create();
const execSync = require('child_process').execSync;
const buildShieldArgs = JSON.parse(`${{ matrix.shieldArgs }}`);
let error = false;
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
const coreCoverage = `${{ needs.core-coverage.outputs.core-include }}` || "[]";
const boardChanges = `${{ needs.board-changes.outputs.boards-include }}` || "[]";
const nightly = `${{ needs.nightly.outputs.nightly-include }}` || "[]";
const combined = [
...JSON.parse(coreCoverage),
...JSON.parse(boardChanges),
Expand All @@ -131,7 +131,7 @@ jobs:
for (const configuration of combinedUnique) {
if (!perBoard[configuration.board])
perBoard[configuration.board] = [];
perBoard[configuration.board].push({
shield: configuration.shield,
'cmake-args': configuration['cmake-args'],
Expand All @@ -148,14 +148,14 @@ jobs:
runs-on: ubuntu-latest
needs: get-changed-files
outputs:
core-include: ${{ steps.core-list.outputs.result }}
core-include: ${{ steps.core-list.outputs.result }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '14.x'
node-version: "14.x"
- name: Install js-yaml
run: npm install js-yaml
- uses: actions/github-script@v4
Expand All @@ -166,7 +166,7 @@ jobs:
const yaml = require('js-yaml');
const coreCoverage = yaml.load(fs.readFileSync('app/core-coverage.yml', 'utf8'));
let include = coreCoverage.board.flatMap(board =>
coreCoverage.shield.map(shield => ({ board, shield }))
);
Expand All @@ -180,11 +180,11 @@ jobs:
boards-include: ${{ steps.boards-list.outputs.result }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '14.x'
node-version: "14.x"
- name: Install js-yaml
run: npm install js-yaml
- uses: actions/github-script@v4
Expand Down Expand Up @@ -234,7 +234,7 @@ jobs:
};
}
} else if (hm.exposes) {
return hm.exposes.flatMap(i =>
return hm.exposes.flatMap(i =>
metadata.interconnects[i].shields.flatMap(s => boardAndShield(hm, s))
);
} else {
Expand All @@ -243,7 +243,7 @@ jobs:
break;
case "shield":
if (hm.features && hm.features.includes("keys")) {
return hm.requires.flatMap(i =>
return hm.requires.flatMap(i =>
metadata.interconnects[i].boards.flatMap(b => boardAndShield(b, hm))
);
} else {
Expand All @@ -269,7 +269,7 @@ jobs:
with:
script: |
const metadata = JSON.parse(`${{ needs.get-grouped-hardware.outputs.organized-metadata }}`);
let includeOnboard = metadata.onboard.flatMap(b => {
if (b.siblings) {
return b.siblings.map(board => ({
Expand Down Expand Up @@ -307,11 +307,11 @@ jobs:
organized-metadata: ${{ steps.organize-metadata.outputs.result }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '14.x'
node-version: "14.x"
- name: Install js-yaml
run: npm install js-yaml
- name: Aggregate Metadata
Expand All @@ -329,7 +329,7 @@ jobs:
yaml.loadAll(fs.readFileSync(f, "utf8"))
);
return JSON.stringify(aggregated).replace(/\\/g,"\\\\");
return JSON.stringify(aggregated).replace(/\\/g,"\\\\").replace(/`/g,"\\`");
result-encoding: string

- name: Organize Metadata
Expand Down Expand Up @@ -376,7 +376,7 @@ jobs:
},
{ onboard: [], interconnects: {} });
return JSON.stringify(grouped).replace(/\\/g,"\\\\");
return JSON.stringify(grouped).replace(/\\/g,"\\\\").replace(/`/g,"\\`");
result-encoding: string
get-changed-files:
if: ${{ github.event_name != 'schedule' }}
Expand All @@ -389,7 +389,7 @@ jobs:
- uses: Ana06/[email protected]
id: changed-files
with:
format: 'json'
format: "json"
- uses: actions/github-script@v4
id: board-changes
with:
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/clang-format-lint.yml

This file was deleted.

Loading

0 comments on commit 79c8ce4

Please sign in to comment.