Auto-build default and base vide mode variant (#30) #18
This file contains 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
name: Build gbinterceptor firmware | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
- name: Setup arm-none-eabi-gcc | |
uses: carlosperate/arm-none-eabi-gcc-action@v1 | |
- name: Setup ninja | |
uses: seanmiddleditch/gha-setup-ninja@master | |
- name: Clone pico-sdk dependency (pinned versions of pico-sdk and tinyusb) | |
run: | | |
git clone https://github.com/raspberrypi/pico-sdk --recurse-submodules | |
cd pico-sdk && sudo git checkout tags/2.0.0 && cd .. | |
cd pico-sdk/lib/tinyusb && sudo git checkout 0.16.0 && cd ../../.. | |
- name: Build firmware | |
run: | | |
arm-none-eabi-gcc --version | |
cd ./firmware | |
mkdir build && cd build | |
cmake .. -G Ninja -DPICO_SDK_PATH=../../pico-sdk | |
ninja | |
- name: 'Upload artifacts' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: firmware | |
path: | | |
./firmware/build/gb_interceptor.* | |
retention-days: 30 | |
- name: Build base video mode firmware | |
run: | | |
cd ./firmware/build | |
rm -rf -- ..?* .[!.]* * | |
cmake .. -G Ninja -DBASE_VIDEO_MODE=1 -DPICO_SDK_PATH=../../pico-sdk | |
ninja | |
- name: 'Upload base video mode artifacts' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: firmware_base_video_mode | |
path: | | |
./firmware/build/gb_interceptor.* | |
retention-days: 30 |