Skip to content

Commit f3a231f

Browse files
Add ESP32-S3 bt2usb UF2 to CI build and release workflow
Add build-esp32 job using espressif/idf:v6.0 Docker image to build bt2usb_esp32s3 and generate .uf2 in parallel with RP2040 matrix builds. ESP32 artifact flows through the same collect and release pipeline.
1 parent a21e8a6 commit f3a231f

File tree

1 file changed

+49
-3
lines changed

1 file changed

+49
-3
lines changed

.github/workflows/build.yml

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,49 @@ jobs:
9292
path: releases/*.uf2
9393
if-no-files-found: error
9494

95+
# Build ESP32-S3 bt2usb (separate job — needs ESP-IDF toolchain)
96+
build-esp32:
97+
runs-on: ubuntu-latest
98+
steps:
99+
- name: Checkout code with submodules
100+
uses: actions/checkout@v4
101+
with:
102+
token: ${{ secrets.JOYBOT_PAT || secrets.GITHUB_TOKEN }}
103+
submodules: recursive
104+
fetch-depth: 0
105+
106+
- name: Get commit hash
107+
id: commit
108+
run: echo "hash=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT
109+
110+
- name: Build bt2usb_esp32s3
111+
run: |
112+
docker run --rm \
113+
-v ${{ github.workspace }}:/workspace \
114+
-w /workspace/esp \
115+
espressif/idf:v6.0 \
116+
bash -c "SDKCONFIG_DEFAULTS=sdkconfig.defaults idf.py build"
117+
118+
sudo chown -R $(id -u):$(id -g) esp/build/
119+
120+
- name: Generate UF2
121+
run: |
122+
mkdir -p releases
123+
python3 esp/tools/uf2conv.py esp/build/joypad_bt2usb.bin \
124+
--base 0 --family 0xc47e5767 \
125+
--output releases/joypad_${{ steps.commit.outputs.hash }}_bt2usb_esp32s3.uf2 \
126+
--convert
127+
128+
- name: Upload firmware
129+
uses: actions/upload-artifact@v4
130+
with:
131+
name: firmware-bt2usb_esp32s3
132+
path: releases/*.uf2
133+
if-no-files-found: error
134+
95135
# Collect all artifacts and create combined release package
96136
collect:
97-
needs: build
137+
needs: [build, build-esp32]
98138
runs-on: ubuntu-latest
99139
steps:
100140
- name: Download all firmware artifacts
@@ -114,7 +154,7 @@ jobs:
114154
mv artifacts/*.uf2 releases/
115155
116156
# Known board suffixes (order matters - check longer suffixes first)
117-
BOARDS="pico2_w pico_w rp2040zero rp2350usba kb2040 feather pico macropad"
157+
BOARDS="esp32s3 pico2_w pico_w rp2040zero rp2350usba kb2040 feather pico macropad"
118158
119159
for file in releases/joypad_*.uf2; do
120160
if [ -f "$file" ]; then
@@ -381,13 +421,19 @@ jobs:
381421
body: |
382422
📋 **See [CHANGELOG.md](https://github.com/joypad-ai/joypad-os/blob/main/CHANGELOG.md) for full release notes.**
383423
384-
## Installation
424+
## Installation (RP2040)
385425
386426
1. Disconnect adapter from console and all USB devices
387427
2. Hold BOOT button while connecting USB-C to computer
388428
- For usb2gc: just connect USB-C (no BOOT button needed)
389429
3. Drag & drop the `.uf2` file to the `RPI-RP2` drive
390430
4. Drive will auto-eject when complete
431+
432+
## Installation (ESP32-S3)
433+
434+
1. Double-tap reset to enter TinyUF2 mode (USB drive appears)
435+
2. Drag & drop the `bt2usb_esp32s3.uf2` file to the drive
436+
3. See [ESP32 docs](https://github.com/joypad-ai/joypad-os/blob/main/docs/ESP32.md) for first-time TinyUF2 setup
391437
files: |
392438
releases/*
393439
draft: false

0 commit comments

Comments
 (0)