Skip to content

Validate stock OpenRGB with Oryx on second HID interface #3

Validate stock OpenRGB with Oryx on second HID interface

Validate stock OpenRGB with Oryx on second HID interface #3

name: Build dual-HID Voyager
on:
workflow_dispatch:
push:
branches:
- main
paths:
- scripts/patch-dual-hid-v2.py
- .github/workflows/build-dual-hid-voyager.yml
permissions:
contents: read
jobs:
build-dual-hid-voyager:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
ref: main
fetch-depth: 1
- name: Initialize ZSA QMK firmware
run: |
git submodule update --init --remote --depth=1 --no-single-branch
cd qmk_firmware
git checkout -B firmware25 origin/firmware25
git submodule update --init --recursive
cd ..
- name: Install QMK-OpenRGB module
run: |
rm -rf qmk_firmware/modules/openrgb
git clone \
--depth 1 \
--branch module_revD \
https://gitlab.com/OpenRGBDevelopers/QMK-OpenRGB.git \
qmk_firmware/modules/openrgb
- name: Apply dual-HID patch
run: |
python3 scripts/patch-dual-hid-v2.py qmk_firmware
- name: Validate dual-HID source tree
run: |
# OpenRGB must remain on QMK's normal Raw HID path.
grep -q 'void raw_hid_receive(uint8_t \*data, uint8_t length)' qmk_firmware/modules/openrgb/openrgb.c
# Oryx must have its own interface, endpoints and receive handler.
grep -q 'ORYX_INTERFACE' qmk_firmware/tmk_core/protocol/usb_descriptor.h
grep -q 'USB_ENDPOINT_IN_ORYX' qmk_firmware/tmk_core/protocol/chibios/usb_endpoints.c
grep -q 'oryx_hid_task' qmk_firmware/tmk_core/protocol/chibios/usb_main.c
grep -q 'void oryx_hid_receive(uint8_t \*data, uint8_t length)' qmk_firmware/modules/zsa/oryx/oryx.c
# The layout must still enable the OpenRGB community module.
grep -q '"openrgb"' emVdK/keymap.json
- name: Build QMK Docker image
run: docker build -t qmk .
- name: Install layout into QMK tree
run: |
rm -rf qmk_firmware/keyboards/zsa/voyager/keymaps/emVdK
mkdir -p qmk_firmware/keyboards/zsa/voyager/keymaps
cp -r emVdK qmk_firmware/keyboards/zsa/voyager/keymaps/
- name: Build dual-HID Voyager firmware
run: |
docker run \
-v ./qmk_firmware:/root \
--rm \
qmk \
/bin/sh -c '
qmk setup zsa/qmk_firmware -b firmware25 -y
make zsa/voyager:emVdK
'
- name: Show built firmware
run: |
find qmk_firmware -maxdepth 1 -type f -name '*voyager*.bin' -ls
- name: Upload firmware
uses: actions/upload-artifact@v7
with:
name: voyager_emVdK_dual_hid
path: qmk_firmware/*voyager*.bin
if-no-files-found: error