Skip to content

Commit

Permalink
Build libpico in CI (earlephilhower#2596)
Browse files Browse the repository at this point in the history
* Build libpico in CI

* Use our arm-none-eabi-gcc, apply Pico-SDK patch

* Indentation fix, add comment
  • Loading branch information
maxgerhardt authored Nov 11, 2024
1 parent 5a42864 commit db4b167
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/build-libpico.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Run whenever it is manually triggered, a pull request or a push is done that modifes the libpico configuration

name: libpico Builder

on:
pull_request:
paths:
- tools/libpico/**
workflow_dispatch:
push:
paths:
- tools/libpico/**
jobs:
build-libpico:
name: Build libpico precompiled libraries
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: false
- name: Get submodules for pico-sdk
run: cd pico-sdk && git submodule update --init --recursive
- name: Install dependencies
run: |
sudo apt update
sudo apt install cmake make build-essential wget
# Automatically get correct toolchain
cd tools && python3 get.py && cd ..
# add to PATH
echo "$GITHUB_WORKSPACE/system/riscv32-unknown-elf/bin" >> "$GITHUB_PATH"
echo "$GITHUB_WORKSPACE/system/arm-none-eabi/bin" >> "$GITHUB_PATH"
# Needed until we switch to Pico-SDK 2.0.1.
- name: Patch Pico-SDK (Fix Assembly for newer GCC)
run: |
cd pico-sdk
wget https://patch-diff.githubusercontent.com/raw/raspberrypi/pico-sdk/pull/2000.patch
patch -p1 < 2000.patch
- name: Build libpico
run: |
cd tools/libpico
./make-libpico.sh
- uses: actions/upload-artifact@v4
with:
name: libpico
path: |
tools/libpico/build-rp2040/*.a
tools/libpico/build-rp2350/*.a
tools/libpico/build-rp2350-riscv/*.a

0 comments on commit db4b167

Please sign in to comment.