-
Notifications
You must be signed in to change notification settings - Fork 0
Add GitHub Actions CI workflow to build both firmwares and publish artifacts #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,62 @@ | ||
| name: Build Firmware | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| pull_request: | ||
| branches: [ main ] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build-teensy-firmware: | ||
| name: Build Teensy 4.1 Firmware | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install ARM GCC toolchain | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi | ||
|
|
||
| - name: Build firmware | ||
| run: make firmware.hex TOOLCHAIN=/usr/bin | ||
|
|
||
| - name: Upload firmware artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: firmware-hex | ||
| path: firmware.hex | ||
|
|
||
| build-bridge-firmware: | ||
| name: Build UART Bridge Firmware (RP2350) | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install build dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y cmake gcc g++ gcc-arm-none-eabi libnewlib-arm-none-eabi | ||
|
|
||
| - name: Clone Pico SDK | ||
| run: | | ||
| git clone --branch 2.2.0 --depth 1 https://github.com/raspberrypi/pico-sdk $HOME/pico-sdk | ||
| cd $HOME/pico-sdk && git submodule update --init --recursive --depth 1 | ||
|
|
||
| - name: Build bridge firmware | ||
| run: | | ||
| mkdir -p uart_bridge/build | ||
| cd uart_bridge/build | ||
| cmake .. -DPICO_SDK_PATH=$HOME/pico-sdk | ||
| make -j$(nproc) | ||
|
|
||
| - name: Upload bridge firmware artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: uart-bridge-uf2 | ||
| path: uart_bridge/build/uart_bridge.uf2 | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
ubuntu-latestcan 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.