Skip to content

Use scalable vector Qube layer title #49

Use scalable vector Qube layer title

Use scalable vector Qube layer title #49

Workflow file for this run

name: Build Ergohaven RMK Firmware
on:
push:
branches: ["**"]
pull_request:
workflow_dispatch:
jobs:
build:
name: Build ${{ matrix.keyboard }} firmware
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
keyboard: [k03, k04, k04_micro, imperial44, op36, velvet, velvet_ui]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install ARM toolchain
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi clang libclang-dev
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: thumbv7em-none-eabihf
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ matrix.keyboard }}-${{ hashFiles('keyboards/${{ matrix.keyboard }}/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-${{ matrix.keyboard }}-
${{ runner.os }}-cargo-
- name: Install flip-link
run: cargo install flip-link --locked
- name: Download uf2conv script
run: |
for i in 1 2 3 4 5; do
curl -fL --retry 3 --retry-delay 5 \
https://raw.githubusercontent.com/microsoft/uf2/master/utils/uf2conv.py \
-o uf2conv.py && break || sleep 10
done
for i in 1 2 3; do
curl -fL --retry 3 --retry-delay 5 \
https://raw.githubusercontent.com/microsoft/uf2/master/utils/uf2families.json \
-o uf2families.json && break || sleep 10
done
python3 -c "import ast; ast.parse(open('uf2conv.py').read())" || { echo "uf2conv.py invalid"; exit 1; }
chmod +x uf2conv.py
- name: Build Central
working-directory: keyboards/${{ matrix.keyboard }}
env:
BINDGEN_EXTRA_CLANG_ARGS: "--sysroot=/usr/lib/arm-none-eabi --target=arm-none-eabi -I/usr/lib/arm-none-eabi/include -I/usr/lib/gcc/arm-none-eabi/13.2.1/include"
RUST_MIN_STACK: "16777216"
run: cargo build --release --bin central
- name: Build Peripheral
working-directory: keyboards/${{ matrix.keyboard }}
env:
BINDGEN_EXTRA_CLANG_ARGS: "--sysroot=/usr/lib/arm-none-eabi --target=arm-none-eabi -I/usr/lib/arm-none-eabi/include -I/usr/lib/gcc/arm-none-eabi/13.2.1/include"
RUST_MIN_STACK: "16777216"
run: cargo build --release --bin peripheral
- name: Convert to UF2
working-directory: keyboards/${{ matrix.keyboard }}
run: |
arm-none-eabi-objcopy -O binary \
target/thumbv7em-none-eabihf/release/central left.bin
python3 ../../uf2conv.py left.bin \
--base 0x26000 --family 0xADA52840 \
--output ${{ matrix.keyboard }}_left.uf2
arm-none-eabi-objcopy -O binary \
target/thumbv7em-none-eabihf/release/peripheral right.bin
python3 ../../uf2conv.py right.bin \
--base 0x26000 --family 0xADA52840 \
--output ${{ matrix.keyboard }}_right.uf2
- name: Upload firmware
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.keyboard }}
path: |
keyboards/${{ matrix.keyboard }}/${{ matrix.keyboard }}_left.uf2
keyboards/${{ matrix.keyboard }}/${{ matrix.keyboard }}_right.uf2
retention-days: 30
build-trackball:
name: Build ${{ matrix.keyboard }} firmware
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- keyboard: trackball_v30
output_name: trackball_mini_v3.0
- keyboard: trackball_v31
output_name: trackball_mini_v3.1
- keyboard: trackball_royale
output_name: trackball_royale
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install ARM toolchain
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi clang libclang-dev
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: thumbv7em-none-eabihf
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ matrix.keyboard }}-${{ hashFiles('keyboards/${{ matrix.keyboard }}/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-${{ matrix.keyboard }}-
- name: Install flip-link
run: cargo install flip-link --locked
- name: Download uf2conv script
run: |
curl -fL https://raw.githubusercontent.com/microsoft/uf2/master/utils/uf2conv.py -o uf2conv.py
curl -fL https://raw.githubusercontent.com/microsoft/uf2/master/utils/uf2families.json -o uf2families.json
- name: Build keyboard
working-directory: keyboards/${{ matrix.keyboard }}
env:
BINDGEN_EXTRA_CLANG_ARGS: "--sysroot=/usr/lib/arm-none-eabi --target=arm-none-eabi -I/usr/lib/arm-none-eabi/include -I/usr/lib/gcc/arm-none-eabi/13.2.1/include"
RUST_MIN_STACK: "16777216"
run: cargo build --release --bin keyboard
- name: Convert to UF2
working-directory: keyboards/${{ matrix.keyboard }}
run: |
arm-none-eabi-objcopy -O binary \
target/thumbv7em-none-eabihf/release/keyboard keyboard.bin
python3 ../../uf2conv.py keyboard.bin \
--base 0x26000 --family 0xADA52840 \
--output ${{ matrix.output_name }}.uf2
- name: Upload firmware
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.output_name }}
path: keyboards/${{ matrix.keyboard }}/${{ matrix.output_name }}.uf2
retention-days: 30
build-qube:
name: Build ${{ matrix.keyboard }} Qube firmware
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
keyboard: [op36_qube, k04_qube]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install ARM toolchain
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi clang libclang-dev
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: thumbv7em-none-eabihf
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ matrix.keyboard }}-${{ hashFiles('keyboards/${{ matrix.keyboard }}/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-${{ matrix.keyboard }}-
${{ runner.os }}-cargo-
- name: Install flip-link
run: cargo install flip-link --locked
- name: Download uf2conv script
run: |
for i in 1 2 3 4 5; do
curl -fL --retry 3 --retry-delay 5 \
https://raw.githubusercontent.com/microsoft/uf2/master/utils/uf2conv.py \
-o uf2conv.py && break || sleep 10
done
for i in 1 2 3; do
curl -fL --retry 3 --retry-delay 5 \
https://raw.githubusercontent.com/microsoft/uf2/master/utils/uf2families.json \
-o uf2families.json && break || sleep 10
done
python3 -c "import ast; ast.parse(open('uf2conv.py').read())" || { echo "uf2conv.py invalid"; exit 1; }
chmod +x uf2conv.py
- name: Build Qube dongle
working-directory: keyboards/${{ matrix.keyboard }}
env:
BINDGEN_EXTRA_CLANG_ARGS: "--sysroot=/usr/lib/arm-none-eabi --target=arm-none-eabi -I/usr/lib/arm-none-eabi/include -I/usr/lib/gcc/arm-none-eabi/13.2.1/include"
CARGO_TARGET_DIR: target/qube
RUST_MIN_STACK: "16777216"
run: cargo build --release --bin qube --features qube
- name: Build left half
working-directory: keyboards/${{ matrix.keyboard }}
env:
BINDGEN_EXTRA_CLANG_ARGS: "--sysroot=/usr/lib/arm-none-eabi --target=arm-none-eabi -I/usr/lib/arm-none-eabi/include -I/usr/lib/gcc/arm-none-eabi/13.2.1/include"
CARGO_TARGET_DIR: target/halves
RUST_MIN_STACK: "16777216"
run: cargo build --release --bin left
- name: Build right half
working-directory: keyboards/${{ matrix.keyboard }}
env:
BINDGEN_EXTRA_CLANG_ARGS: "--sysroot=/usr/lib/arm-none-eabi --target=arm-none-eabi -I/usr/lib/arm-none-eabi/include -I/usr/lib/gcc/arm-none-eabi/13.2.1/include"
CARGO_TARGET_DIR: target/halves
RUST_MIN_STACK: "16777216"
run: cargo build --release --bin right
- name: Convert to UF2
working-directory: keyboards/${{ matrix.keyboard }}
run: |
arm-none-eabi-objcopy -O binary \
target/qube/thumbv7em-none-eabihf/release/qube qube.bin
python3 ../../uf2conv.py qube.bin \
--base 0x1000 --family 0xADA52840 \
--output ${{ matrix.keyboard }}_dongle.uf2
arm-none-eabi-objcopy -O binary \
target/halves/thumbv7em-none-eabihf/release/left left.bin
python3 ../../uf2conv.py left.bin \
--base 0x26000 --family 0xADA52840 \
--output ${{ matrix.keyboard }}_left.uf2
arm-none-eabi-objcopy -O binary \
target/halves/thumbv7em-none-eabihf/release/right right.bin
python3 ../../uf2conv.py right.bin \
--base 0x26000 --family 0xADA52840 \
--output ${{ matrix.keyboard }}_right.uf2
- name: Upload firmware
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.keyboard }}
path: |
keyboards/${{ matrix.keyboard }}/${{ matrix.keyboard }}_dongle.uf2
keyboards/${{ matrix.keyboard }}/${{ matrix.keyboard }}_left.uf2
keyboards/${{ matrix.keyboard }}/${{ matrix.keyboard }}_right.uf2
retention-days: 30
build-settings-reset:
name: Build settings_reset firmware
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install ARM toolchain
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: thumbv7em-none-eabihf
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-settings-reset-${{ hashFiles('tools/settings_reset/Cargo.lock') }}
- name: Download uf2conv script
run: |
curl -fL https://raw.githubusercontent.com/microsoft/uf2/master/utils/uf2conv.py -o $GITHUB_WORKSPACE/uf2conv.py
curl -fL https://raw.githubusercontent.com/microsoft/uf2/master/utils/uf2families.json -o $GITHUB_WORKSPACE/uf2families.json
- name: Build Settings Reset
working-directory: tools/settings_reset
run: cargo build --release
- name: Convert to UF2
working-directory: tools/settings_reset
run: |
arm-none-eabi-objcopy -O binary \
target/thumbv7em-none-eabihf/release/settings-reset settings_reset.bin
python3 $GITHUB_WORKSPACE/uf2conv.py settings_reset.bin \
--base 0x26000 --family 0xADA52840 \
--output settings_reset.uf2
- name: Upload firmware
uses: actions/upload-artifact@v4
with:
name: settings_reset
path: tools/settings_reset/settings_reset.uf2
retention-days: 30