Add GitHub Actions CI workflow to build both firmwares and publish artifacts#2
Conversation
Co-authored-by: ramseymcgrath <2006510+ramseymcgrath@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions workflow to build and publish the project’s Teensy and RP2350 firmware artifacts on pushes and PRs targeting main.
Changes:
- Introduces a CI job that installs
gcc-arm-none-eabiand builds/uploadsfirmware.hexviamake. - Introduces a CI job that installs CMake + ARM toolchain, fetches Pico SDK, builds/uploads
uart_bridge.uf2. - Sets workflow-level least-privilege token permissions (
contents: read).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| runs-on: ubuntu-latest | ||
|
|
There was a problem hiding this comment.
Using ubuntu-latest can introduce CI breakage when GitHub updates the runner image. If you want stable/reproducible firmware builds, consider pinning to a specific Ubuntu version (e.g., 24.04) and updating intentionally.
.github/workflows/build.yml
Outdated
| - name: Clone Pico SDK | ||
| run: | | ||
| git clone --branch 2.1.0 --depth 1 https://github.com/raspberrypi/pico-sdk $HOME/pico-sdk | ||
| cd $HOME/pico-sdk && git submodule update --init |
There was a problem hiding this comment.
git submodule update --init may fetch full submodule history and won’t pull nested submodules if any are added upstream. Consider adding --recursive (and optionally --depth 1) to make the SDK checkout more robust and faster.
| cd $HOME/pico-sdk && git submodule update --init | |
| cd $HOME/pico-sdk && git submodule update --init --recursive --depth 1 |
…module init Co-authored-by: ramseymcgrath <2006510+ramseymcgrath@users.noreply.github.com>
No CI existed to build the Teensy 4.1 or RP2350 bridge firmware. Adds a workflow that builds both targets on every push/PR to
mainand exposes the outputs as downloadable artifacts.Workflow jobs (run in parallel)
build-teensy-firmware— installsgcc-arm-none-eabi+libnewlib-arm-none-eabifrom apt, invokesmake firmware.hex TOOLCHAIN=/usr/bin(overrides the hardcoded local macOS toolchain path), uploadsfirmware.hexas artifactfirmware-hexbuild-bridge-firmware— installs cmake +gcc-arm-none-eabi, clones Pico SDK 2.2.0 with submodules (matching the version expected byuart_bridge/CMakeLists.txt), runs cmake + make inuart_bridge/build/, uploadsuart_bridge.uf2as artifactuart-bridge-uf2. Submodules are initialized with--recursive --depth 1to ensure nested submodules are fetched correctly and efficiently.Security
Workflow-level
permissions: contents: readenforces least-privilege GITHUB_TOKEN.🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.