File tree Expand file tree Collapse file tree 1 file changed +62
-0
lines changed Expand file tree Collapse file tree 1 file changed +62
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build Pico SDK Examples
2+
3+ on :
4+ push :
5+ branches : ["main"]
6+ pull_request :
7+ branches : ["main"]
8+ schedule :
9+ # Build on Mondays at 9am PST every week
10+ - cron : ' 0 17 * * 1'
11+
12+ jobs :
13+ build-pico-sdk :
14+ runs-on : ubuntu-22.04
15+ container : swiftlang/swift:nightly-main-jammy
16+ strategy :
17+ matrix :
18+ example : [pico-blink-sdk, pico-w-blink-sdk]
19+
20+ steps :
21+ - name : Checkout repo
22+ uses : actions/checkout@v4
23+
24+ - name : Update system packages
25+ run : |
26+ apt-get -y update
27+ apt-get -y install curl ninja-build python3
28+
29+ - name : Install CMake 3.30.2
30+ run : |
31+ ARCH=`uname -m`
32+ curl -L https://github.com/Kitware/CMake/releases/download/v3.30.2/cmake-3.30.2-linux-$ARCH.tar.gz -O
33+ tar xzf cmake-3.30.2-linux-$ARCH.tar.gz
34+ export PATH="`pwd`/cmake-3.30.2-linux-$ARCH/bin:$PATH"
35+ cmake --version
36+ echo "PATH=$PATH" >> $GITHUB_ENV
37+
38+ - name : Clone Pico SDK
39+ run : |
40+ git clone https://github.com/raspberrypi/pico-sdk.git
41+ cd pico-sdk
42+ git submodule update --init --recursive
43+ cd ..
44+
45+ - name : Download GNU ARM toolchain
46+ run : |
47+ ARCH=`uname -m`
48+ curl -L https://developer.arm.com/-/media/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-$ARCH-arm-none-eabi.tar.xz -O
49+ tar xf arm-gnu-toolchain-13.3.rel1-$ARCH-arm-none-eabi.tar.xz
50+
51+ - name : Set PICO environment variables
52+ run : |
53+ ARCH=`uname -m`
54+ echo "PICO_BOARD=pico" >> $GITHUB_ENV
55+ echo "PICO_SDK_PATH=`pwd`/pico-sdk" >> $GITHUB_ENV
56+ echo "PICO_TOOLCHAIN_PATH=`pwd`/arm-gnu-toolchain-13.3.rel1-$ARCH-arm-none-eabi" >> $GITHUB_ENV
57+
58+ - name : Build ${{ matrix.example }}
59+ run : |
60+ cd ${{ matrix.example }}
61+ cmake -B build -G Ninja .
62+ cmake --build build
You can’t perform that action at this time.
0 commit comments