feat: build pico & pico2 #24
Workflow file for this run
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 | |
on: | |
push: | |
paths: | |
- "src/**" | |
workflow_call: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: "deskhopl" | |
- uses: actions/checkout@v4 | |
name: Checkout pico-sdk | |
with: | |
repository: "raspberrypi/pico-sdk" | |
path: "pico-sdk" | |
ref: "refs/tags/2.0.0" | |
- uses: actions/checkout@v4 | |
name: Checkout tinyusb | |
with: | |
repository: "hathach/tinyusb" | |
path: "tinyusb" | |
ref: "refs/tags/0.17.0" | |
- uses: actions/checkout@v4 | |
name: Checkout pico-pio-usb | |
with: | |
repository: "sekigon-gonnoc/Pico-PIO-USB" | |
path: "pico-pio-usb" | |
ref: "refs/tags/0.6.1" | |
- name: Install tooling | |
run: | | |
sudo apt update | |
sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib | |
- name: Build | |
run: | | |
export PICO_PIO_USB_PATH="${PWD}/pico-pio-usb" | |
export PICO_SDK_PATH="${PWD}/pico-sdk" | |
export PICO_TINYUSB_PATH="${PWD}/tinyusb" | |
# create pico & pico2 build dirs | |
mkdir -p deskhopl/src/build-{pico,pico2} | |
# build pico first | |
pushd deskhopl/src/build-pico | |
cmake .. | |
make | |
popd | |
# build pico2 second | |
pushd deskhopl/src/build-pico2 | |
cmake -DDH_PICO_2=1 .. | |
make | |
# rename pico2 artificats | |
mv board_A.uf2 board_A_pico2.uf2 | |
mv board_B.uf2 board_B_pico2.uf2 | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: | | |
deskhopl/src/build-pico/*.uf2 | |
deskhopl/src/build-pico2/*.uf2 |