-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
this also makes a bunch of fixes to the existing templates. this workflow should hopefully make maintaining templates easier.
- Loading branch information
Showing
13 changed files
with
233 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[values] | ||
keyboard-name = "TestKeyboard" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Build all templates | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
paths: | ||
- "*-template/**" | ||
- ".github/workflows/build.yml" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
template: ["rumcake-basic-template", "rumcake-split-template"] | ||
|
||
name: Build template | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install cargo-binutils and cargo-generate | ||
run: cargo install cargo-binutils cargo-generate | ||
|
||
- name: Generate template | ||
run: cargo generate --path . ./${{ matrix.template }} --name ci-template-test --template-values-file="./.github/values/template-values.toml" | ||
|
||
- name: Build binary | ||
run: ./build.sh | ||
working-directory: ./ci-template-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Note: `cargo build` isn't actually needed to generate a binary, but | ||
# `cargo objcopy` doesn't show errors if they happen during the build process, | ||
# so we use `cargo build` anyways to see them. Should be fine as long as | ||
# incremental compilation is enabled. | ||
|
||
# Generate bin files | ||
cargo build --release && | ||
cargo objcopy --release -- -O binary firmware.bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[toolchain] | ||
channel = "nightly-2023-12-05" | ||
components = [ "rust-src", "rustfmt", "llvm-tools-preview" ] | ||
targets = [ "thumbv6m-none-eabi" ] | ||
targets = [ "thumbv7em-none-eabihf" ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
{ | ||
"name": "{{ keyboard-name }}", | ||
"vendorId": "0x0000", | ||
"productId": "0x0000", | ||
"lighting": "qmk_rgblight", | ||
"matrix": { | ||
"rows": 10, | ||
"cols": 8 | ||
}, | ||
"layouts": { | ||
"keymap": [ | ||
[ | ||
{ | ||
"c": "#777777" | ||
}, | ||
"0,0", | ||
{ | ||
"c": "#cccccc" | ||
}, | ||
"1,0", | ||
"0,1", | ||
"1,1", | ||
"0,2", | ||
"1,2", | ||
"0,3", | ||
"1,3", | ||
"0,4", | ||
"1,4", | ||
"0,5", | ||
"1,5", | ||
"0,6", | ||
{ | ||
"c": "#777777", | ||
"w": 2 | ||
}, | ||
"0,7", | ||
"2,7" | ||
], | ||
[ | ||
{ | ||
"c": "#aaaaaa", | ||
"w": 1.5 | ||
}, | ||
"2,0", | ||
{ | ||
"c": "#cccccc" | ||
}, | ||
"3,0", | ||
"2,1", | ||
"3,1", | ||
"2,2", | ||
"3,2", | ||
"2,3", | ||
"3,3", | ||
"2,4", | ||
"3,4", | ||
"2,5", | ||
"3,5", | ||
"2,6", | ||
{ | ||
"w": 1.5 | ||
}, | ||
"3,6", | ||
{ | ||
"c": "#777777" | ||
}, | ||
"4,7" | ||
], | ||
[ | ||
{ | ||
"c": "#aaaaaa", | ||
"w": 1.75 | ||
}, | ||
"4,0", | ||
{ | ||
"c": "#cccccc" | ||
}, | ||
"5,0", | ||
"4,1", | ||
"5,1", | ||
"4,2", | ||
"5,2", | ||
"4,3", | ||
"5,3", | ||
"4,4", | ||
"5,4", | ||
"4,5", | ||
"5,5", | ||
{ | ||
"c": "#777777", | ||
"w": 2.25 | ||
}, | ||
"5,6", | ||
"6,7" | ||
], | ||
[ | ||
{ | ||
"c": "#aaaaaa", | ||
"w": 2.25 | ||
}, | ||
"6,0", | ||
{ | ||
"c": "#cccccc" | ||
}, | ||
"6,1", | ||
"7,1", | ||
"6,2", | ||
"7,2", | ||
"6,3", | ||
"7,3", | ||
"6,4", | ||
"7,4", | ||
"6,5", | ||
"7,5", | ||
{ | ||
"c": "#777777" | ||
}, | ||
"6,6", | ||
{ | ||
"c": "#aaaaaa", | ||
"w": 1.75 | ||
}, | ||
"7,6", | ||
{ | ||
"c": "#777777" | ||
}, | ||
"8,7" | ||
], | ||
[ | ||
{ | ||
"x": 1.5, | ||
"c": "#aaaaaa", | ||
"w": 1.25 | ||
}, | ||
"8,0", | ||
{ | ||
"w": 1.25 | ||
}, | ||
"8,1", | ||
{ | ||
"c": "#cccccc", | ||
"w": 6.25 | ||
}, | ||
"8,3", | ||
{ | ||
"c": "#aaaaaa", | ||
"w": 1.25 | ||
}, | ||
"8,5", | ||
{ | ||
"c": "#777777" | ||
}, | ||
"9,5", | ||
"8,6", | ||
"9,6" | ||
] | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Note: `cargo build` isn't actually needed to generate a binary, but | ||
# `cargo objcopy` doesn't show errors if they happen during the build process, | ||
# so we use `cargo build` anyways to see them. Should be fine as long as | ||
# incremental compilation is enabled. | ||
|
||
# Generate bin files | ||
cargo objcopy --bin left --features "rumcake/split-central rumcake/bluetooth rumcake/usb" --release -- -O binary left.bin | ||
cargo objcopy --bin right --features "rumcake/split-peripheral" --release -- -O binary right.bin | ||
cargo build --bin left --features "rumcake/split-central rumcake/bluetooth rumcake/usb" --release && | ||
cargo objcopy --quiet --bin left --features "rumcake/split-central rumcake/bluetooth rumcake/usb" --release -- -O binary left.bin | ||
|
||
cargo build --quiet --bin right --features "rumcake/split-peripheral" --release && | ||
cargo objcopy --quiet --bin right --features "rumcake/split-peripheral" --release -- -O binary right.bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[toolchain] | ||
channel = "nightly-2023-12-05" | ||
components = [ "rust-src", "rustfmt", "llvm-tools-preview" ] | ||
targets = [ "thumbv6m-none-eabi" ] | ||
targets = [ "thumbv7em-none-eabihf" ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters