File tree Expand file tree Collapse file tree 2 files changed +63
-0
lines changed Expand file tree Collapse file tree 2 files changed +63
-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
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ add_custom_command(
16
16
COMMAND
17
17
${SWIFTC}
18
18
-target armv6m-none-none-eabi -Xcc -mfloat-abi=soft -Xcc -fshort-enums
19
+ -Xcc -DPICO_RP2040
19
20
-Xfrontend -function-sections -enable-experimental-feature Embedded -wmo -parse-as-library
20
21
$$\( echo '$<TARGET_PROPERTY:swift-blinky,INCLUDE_DIRECTORIES>' | tr '\; ' '\\ n' | sed -e 's/\\\( .*\\\) /-Xcc -I\\ 1/g' \)
21
22
$$\( echo '${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}' | tr ' ' '\\ n' | sed -e 's/\\\( .*\\\) /-Xcc -I\\ 1/g' \)
You can’t perform that action at this time.
0 commit comments