Merge pull request #120 from SeongGino/Valkyrja #247
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
name: OpenFIRE Builds | |
on: | |
push: | |
pull_request: | |
jobs: | |
arduino-build: | |
name: ${{ matrix.name }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- name: Raspberry Pi Pico | |
fqbn: rpipico | |
pretty: rpipico | |
flags: freq=133,usbstack=tinyusb,flash=2097152_65536,opt=Optimize3 | |
- name: Raspberry Pi Pico W (USB) | |
fqbn: rpipicow | |
pretty: rpipicow-noBT | |
flags: freq=133,usbstack=tinyusb,flash=2097152_65536,opt=Optimize3,wificountry=worldwide,ipbtstack=ipv4only | |
extra_flags: -DPICO_CYW43_SUPPORTED=1 -DCYW43_PIN_WL_DYNAMIC=1 | |
# Disabled until issues surrounding interacting with cyw southbridge causing lockups is solved | |
#- name: Raspberry Pi Pico W (Bluetooth) | |
# fqbn: rpipicow | |
# pretty: rpipicow-btBETA | |
# flags: freq=133,usbstack=tinyusb,flash=2097152_65536,opt=Optimize3,ipbtstack=ipv4btcble,wificountry=worldwide | |
# extra_flags: -DPICO_CYW43_SUPPORTED=1 -DCYW43_PIN_WL_DYNAMIC=1 | |
- name: Raspberry Pi Pico 2 [ARM] | |
fqbn: rpipico2 | |
pretty: rpipico2 | |
flags: freq=133,usbstack=tinyusb,flash=4194304_65536,opt=Optimize3,arch=arm | |
- name: Raspberry Pi Pico 2W [ARM] (USB) | |
fqbn: rpipico2w | |
pretty: rpipico2w-noBT | |
flags: freq=133,usbstack=tinyusb,flash=4194304_65536,opt=Optimize3,wificountry=worldwide,ipbtstack=ipv4only,arch=arm | |
extra_flags: -DPICO_CYW43_SUPPORTED=1 -DCYW43_PIN_WL_DYNAMIC=1 | |
- name: Adafruit ItsyBitsy RP2040 | |
fqbn: adafruit_itsybitsy | |
pretty: adafruitItsy | |
flags: freq=133,usbstack=tinyusb,flash=8388608_65536,opt=Optimize3 | |
- name: Adafruit KB2040 | |
fqbn: adafruit_kb2040 | |
pretty: adafruitKB2040 | |
flags: freq=133,usbstack=tinyusb,flash=8388608_65536,opt=Optimize3 | |
- name: Arduino Nano RP2040 Connect | |
fqbn: arduino_nano_connect | |
pretty: arduinoNano | |
flags: freq=133,usbstack=tinyusb,flash=16777216_65536,opt=Optimize3 | |
- name: VCC-GND YD RP2040 | |
fqbn: vccgnd_yd_rp2040 | |
pretty: vccgndYD | |
flags: freq=133,usbstack=tinyusb,flash=2097152_1048576,opt=Optimize3 | |
- name: Waveshare RP2040 Zero | |
fqbn: waveshare_rp2040_zero | |
pretty: waveshareZero | |
flags: freq=133,usbstack=tinyusb,flash=2097152_65536,opt=Optimize3 | |
- name: Generic RP2350 | |
fqbn: generic_rp2350 | |
pretty: generic_rp2350 | |
flags: freq=133,usbstack=tinyusb,flash=2097152_1048576,opt=Optimize3,arch=arm | |
- name: Generic RP2040 | |
fqbn: generic | |
pretty: generic | |
flags: freq=133,usbstack=tinyusb,flash=2097152_1048576,opt=Optimize3 | |
steps: | |
- name: Checkout OpenFIRE-Firmware | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Arduino-cli | |
uses: arduino/setup-arduino-cli@v2 | |
# arduino nano uses this just to access LEDs, grr... | |
- name: Install Arduino Nano Connect library | |
if: ${{ matrix.fqbn == 'arduino_nano_connect' }} | |
run: arduino-cli lib install WiFiNINA | |
# use our fork with patched TUSB | |
# TODO: for now, select version manually (as our -tusb version is currently considered prior to upstream 4.5.4) | |
- name: Setting up Arduino-cli | |
run: arduino-cli core install rp2040:rp2040@4.5.4-tusb --additional-urls https://github.com/TeamOpenFIRE/arduino-pico/releases/download/global/package_rp2040_index.json | |
- name: Get short SHA | |
id: get-short-sha | |
run: echo "id=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Compile for ${{ matrix.name }} | |
run: > | |
arduino-cli compile -e | |
--fqbn rp2040:rp2040:${{matrix.fqbn}}:${{matrix.flags}} | |
OpenFIREmain | |
--libraries libraries | |
--build-property 'build.extra_flags= | |
-DGIT_HASH="${{steps.get-short-sha.outputs.id}}" | |
${{matrix.extra_flags}}' | |
- name: Rename build file | |
run: cp ${{github.workspace}}/OpenFIREmain/build/rp2040.rp2040.${{matrix.fqbn}}/OpenFIREmain.ino.uf2 OpenFIREfw.${{ matrix.pretty }}.uf2 | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
path: OpenFIREfw.${{ matrix.pretty }}.uf2 | |
name: OpenFIREfw - ${{ matrix.name }} | |
if-no-files-found: error | |