Skip to content

Commit db4b167

Browse files
authored
Build libpico in CI (earlephilhower#2596)
* Build libpico in CI * Use our arm-none-eabi-gcc, apply Pico-SDK patch * Indentation fix, add comment
1 parent 5a42864 commit db4b167

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/build-libpico.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Run whenever it is manually triggered, a pull request or a push is done that modifes the libpico configuration
2+
3+
name: libpico Builder
4+
5+
on:
6+
pull_request:
7+
paths:
8+
- tools/libpico/**
9+
workflow_dispatch:
10+
push:
11+
paths:
12+
- tools/libpico/**
13+
jobs:
14+
build-libpico:
15+
name: Build libpico precompiled libraries
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
submodules: false
21+
- name: Get submodules for pico-sdk
22+
run: cd pico-sdk && git submodule update --init --recursive
23+
- name: Install dependencies
24+
run: |
25+
sudo apt update
26+
sudo apt install cmake make build-essential wget
27+
# Automatically get correct toolchain
28+
cd tools && python3 get.py && cd ..
29+
# add to PATH
30+
echo "$GITHUB_WORKSPACE/system/riscv32-unknown-elf/bin" >> "$GITHUB_PATH"
31+
echo "$GITHUB_WORKSPACE/system/arm-none-eabi/bin" >> "$GITHUB_PATH"
32+
# Needed until we switch to Pico-SDK 2.0.1.
33+
- name: Patch Pico-SDK (Fix Assembly for newer GCC)
34+
run: |
35+
cd pico-sdk
36+
wget https://patch-diff.githubusercontent.com/raw/raspberrypi/pico-sdk/pull/2000.patch
37+
patch -p1 < 2000.patch
38+
- name: Build libpico
39+
run: |
40+
cd tools/libpico
41+
./make-libpico.sh
42+
- uses: actions/upload-artifact@v4
43+
with:
44+
name: libpico
45+
path: |
46+
tools/libpico/build-rp2040/*.a
47+
tools/libpico/build-rp2350/*.a
48+
tools/libpico/build-rp2350-riscv/*.a

0 commit comments

Comments
 (0)