Skip to content

Commit 03f97a8

Browse files
committed
Add new github workflows
1 parent 13d8cdf commit 03f97a8

File tree

4 files changed

+299
-0
lines changed

4 files changed

+299
-0
lines changed
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="gcc-arm-embedded" version="10.2.1" />
4+
<package id="cmake" version="3.25.2" installArguments="ADD_CMAKE_TO_PATH=System" />
5+
<package id="mingw" version="12.2.0" />
6+
<package id="ninja" version="1.11.1" />
7+
</packages>

.github/workflows/macOS.yml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Build on macOS
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- 'test_workflow'
7+
- 'develop'
8+
- 'master'
9+
10+
jobs:
11+
build:
12+
runs-on: macos-12
13+
steps:
14+
- name: Clean workspace
15+
run: |
16+
echo "Cleaning up previous run"
17+
rm -rf "${{ github.workspace }}"
18+
mkdir -p "${{ github.workspace }}"
19+
20+
- name: Checkout pico-examples
21+
uses: actions/checkout@v2
22+
with:
23+
path: pico-examples
24+
25+
- name: Checkout pico-sdk/develop
26+
uses: actions/checkout@v2
27+
with:
28+
repository: raspberrypi/pico-sdk
29+
ref: develop
30+
path: pico-sdk
31+
32+
- name: Checkout pico-sdk submodules
33+
working-directory: ${{github.workspace}}/pico-sdk
34+
run: git submodule update --init
35+
- name: Install dependencies
36+
run: |
37+
brew install cmake
38+
brew tap ArmMbed/homebrew-formulae
39+
brew install arm-none-eabi-gcc
40+
41+
- name: Build Project
42+
working-directory: ${{github.workspace}}/pico-examples
43+
# bash required otherwise this mysteriously (no error) fails at "Generating cyw43_bus_pio_spi.pio.h"
44+
shell: bash
45+
run: |
46+
mkdir build
47+
cd build
48+
cmake .. -G "Unix Makefiles" -DPICO_SDK_PATH=../../pico-sdk -DCMAKE_BUILD_TYPE=Debug -DPICO_BOARD=pico_w
49+
cmake --build .
50+
51+
- name: Build Native
52+
working-directory: ${{github.workspace}}/pico-examples
53+
# bash required otherwise this mysteriously (no error) fails at "Generating cyw43_bus_pio_spi.pio.h"
54+
shell: bash
55+
run: |
56+
mkdir build_native
57+
cd build_native
58+
cmake .. -G "Unix Makefiles" -DPICO_SDK_PATH=../../pico-sdk -DCMAKE_BUILD_TYPE=Debug -DPICO_PLATFORM=host
59+
cmake --build .

.github/workflows/multi-gcc.yml

+185
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
name: Multi GCC
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- 'master'
7+
- 'test_workflow'
8+
9+
jobs:
10+
build:
11+
if: github.repository_owner == 'raspberrypi'
12+
runs-on: [self-hosted, Linux, X64]
13+
14+
steps:
15+
- name: Clean workspace
16+
run: |
17+
echo "Cleaning up previous run"
18+
rm -rf "${{ github.workspace }}"
19+
mkdir -p "${{ github.workspace }}"
20+
21+
- name: Checkout pico-examples
22+
uses: actions/checkout@v2
23+
with:
24+
path: pico-examples
25+
26+
- name: Checkout pico-sdk/develop
27+
uses: actions/checkout@v2
28+
with:
29+
repository: raspberrypi/pico-sdk
30+
ref: develop
31+
path: pico-sdk
32+
33+
- name: Checkout pico-sdk submodules
34+
working-directory: ${{github.workspace}}/pico-sdk
35+
run: git submodule update --init
36+
37+
- name: Create Build Environment
38+
# Some projects don't allow in-source building, so create a separate build directory
39+
# We'll use this as our working directory for all subsequent commands
40+
working-directory: ${{github.workspace}}/pico-examples
41+
run: cmake -E make_directory ${{github.workspace}}/pico-examples/build
42+
43+
- name: Get core count
44+
id: core_count
45+
run : cat /proc/cpuinfo | grep processor | wc -l
46+
47+
- name: GCC 6.2.1 Debug
48+
if: always()
49+
shell: bash
50+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Debug -DPICO_TOOLCHAIN_PATH=/opt/arm/gcc-arm-none-eabi-6_2-2016q4 -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
51+
52+
- name: GCC 6.2.1 Release
53+
if: always()
54+
shell: bash
55+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Release -DPICO_TOOLCHAIN_PATH=/opt/arm/gcc-arm-none-eabi-6_2-2016q4 -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
56+
57+
- name: GCC 6.3.1 Debug
58+
if: always()
59+
shell: bash
60+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Debug -DPICO_TOOLCHAIN_PATH=/opt/arm/gcc-arm-none-eabi-6-2017-q2-update -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
61+
62+
- name: GCC 6.3.1 Release
63+
if: always()
64+
shell: bash
65+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Release -DPICO_TOOLCHAIN_PATH=/opt/arm/gcc-arm-none-eabi-6-2017-q2-update -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
66+
67+
- name: GCC 7.2.1 Debug
68+
if: always()
69+
shell: bash
70+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Debug -DPICO_TOOLCHAIN_PATH=/opt/arm/gcc-arm-none-eabi-7-2017-q4-major -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
71+
72+
- name: GCC 7.2.1 Release
73+
if: always()
74+
shell: bash
75+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Release -DPICO_TOOLCHAIN_PATH=/opt/arm/gcc-arm-none-eabi-7-2017-q4-major -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
76+
77+
- name: GCC 7.3.1 Debug
78+
if: always()
79+
shell: bash
80+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Debug -DPICO_TOOLCHAIN_PATH=/opt/arm/gcc-arm-none-eabi-7-2018-q2-update -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
81+
82+
- name: GCC 7.3.1 Release
83+
if: always()
84+
shell: bash
85+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Release -DPICO_TOOLCHAIN_PATH=/opt/arm/gcc-arm-none-eabi-7-2018-q2-update -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
86+
87+
- name: GCC 8.2.1 Debug
88+
if: always()
89+
shell: bash
90+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Debug -DPICO_TOOLCHAIN_PATH=/opt/arm/gcc-arm-none-eabi-8-2018-q4-major -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
91+
92+
- name: GCC 8.2.1 Release
93+
if: always()
94+
shell: bash
95+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Release -DPICO_TOOLCHAIN_PATH=/opt/arm/gcc-arm-none-eabi-8-2018-q4-major -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
96+
97+
- name: GCC 8.3.1 Debug
98+
if: always()
99+
shell: bash
100+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Debug -DPICO_TOOLCHAIN_PATH=/opt/arm/gcc-arm-none-eabi-8-2019-q3-update -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
101+
102+
- name: GCC 8.3.1 Release
103+
if: always()
104+
shell: bash
105+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Release -DPICO_TOOLCHAIN_PATH=/opt/arm/gcc-arm-none-eabi-8-2019-q3-update -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
106+
107+
- name: GCC 9.2.1 Debug
108+
if: always()
109+
shell: bash
110+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Debug -DPICO_TOOLCHAIN_PATH=/opt/arm/gcc-arm-none-eabi-9-2019-q4-major -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
111+
112+
- name: GCC 9.2.1 Release
113+
if: always()
114+
shell: bash
115+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Release -DPICO_TOOLCHAIN_PATH=/opt/arm/gcc-arm-none-eabi-9-2019-q4-major -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
116+
117+
- name: GCC 9.3.1 Debug
118+
if: always()
119+
shell: bash
120+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Debug -DPICO_TOOLCHAIN_PATH=/opt/arm/gcc-arm-none-eabi-9-2020-q2-update -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
121+
122+
- name: GCC 9.3.1 Release
123+
if: always()
124+
shell: bash
125+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Release -DPICO_TOOLCHAIN_PATH=/opt/arm/gcc-arm-none-eabi-9-2020-q2-update -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
126+
127+
- name: GCC 10.2.1 Debug
128+
if: always()
129+
shell: bash
130+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Debug -DPICO_TOOLCHAIN_PATH=/opt/arm/gcc-arm-none-eabi-10-2020-q4-major -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
131+
132+
- name: GCC 10.2.1 Release
133+
if: always()
134+
shell: bash
135+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Release -DPICO_TOOLCHAIN_PATH=/opt/arm/gcc-arm-none-eabi-10-2020-q4-major -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
136+
137+
- name: GCC 10.3.1 Debug
138+
if: always()
139+
shell: bash
140+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Debug -DPICO_TOOLCHAIN_PATH=/opt/arm/gcc-arm-none-eabi-10.3-2021.10 -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
141+
142+
- name: GCC 10.3.1 Release
143+
if: always()
144+
shell: bash
145+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Release -DPICO_TOOLCHAIN_PATH=/opt/arm/gcc-arm-none-eabi-10.3-2021.10 -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
146+
147+
- name: GCC 11.2.1 Debug
148+
if: always()
149+
shell: bash
150+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Debug -DPICO_TOOLCHAIN_PATH=/opt/arm/gcc-arm-11.2-2022.02-x86_64-arm-none-eabi -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
151+
152+
- name: GCC 11.2.1 Release
153+
if: always()
154+
shell: bash
155+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Release -DPICO_TOOLCHAIN_PATH=/opt/arm/gcc-arm-11.2-2022.02-x86_64-arm-none-eabi -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
156+
157+
- name: GCC 11.3.1 Debug
158+
if: always()
159+
shell: bash
160+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Debug -DPICO_TOOLCHAIN_PATH=/opt/arm/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
161+
162+
- name: GCC 11.3.1 Release
163+
if: always()
164+
shell: bash
165+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Release -DPICO_TOOLCHAIN_PATH=/opt/arm/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
166+
167+
- name: GCC 12.2.1 Debug
168+
if: always()
169+
shell: bash
170+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Debug -DPICO_TOOLCHAIN_PATH=/opt/arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
171+
172+
- name: GCC 12.2.1 Release
173+
if: always()
174+
shell: bash
175+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Release -DPICO_TOOLCHAIN_PATH=/opt/arm/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi -DPICO_BOARD=pico_w; make -j ${{steps.core_count.outputs.output}}
176+
177+
- name: Native Debug
178+
if: always()
179+
shell: bash
180+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Debug -DPICO_PLATFORM=host; make -j ${{steps.core_count.outputs.output}}
181+
182+
- name: Native Release
183+
if: always()
184+
shell: bash
185+
run: cd ${{github.workspace}}/pico-examples; mkdir -p build; rm -rf build/*; cd build; PICO_SDK_PATH=../../pico-sdk cmake ../ -DCMAKE_BUILD_TYPE=Release -DPICO_PLATFORM=host; make -j ${{steps.core_count.outputs.output}}

.github/workflows/windows.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build on Windows
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- 'test_workflow'
7+
- 'develop'
8+
- 'master'
9+
10+
jobs:
11+
build:
12+
runs-on: windows-2022
13+
steps:
14+
- name: Clean workspace
15+
shell: bash
16+
run: |
17+
echo "Cleaning up previous run"
18+
rm -rf "${{ github.workspace }}/pico-sdk"
19+
rm -rf "${{ github.workspace }}/pico-examples"
20+
- name: Checkout pico-examples
21+
uses: actions/checkout@v2
22+
with:
23+
path: pico-examples
24+
25+
- name: Checkout pico-sdk/develop
26+
uses: actions/checkout@v2
27+
with:
28+
repository: raspberrypi/pico-sdk
29+
ref: develop
30+
path: pico-sdk
31+
32+
- name: Checkout pico-sdk submodules
33+
working-directory: ${{github.workspace}}/pico-sdk
34+
run: git submodule update --init
35+
36+
- name: Install dependencies
37+
working-directory: ${{github.workspace}}/pico-examples
38+
run: choco install .github/workflows/choco_packages.config
39+
40+
- name: Build Project
41+
working-directory: ${{github.workspace}}/pico-examples
42+
# bash required otherwise this mysteriously (no error) fails at "Generating cyw43_bus_pio_spi.pio.h"
43+
shell: bash
44+
run: |
45+
mkdir build
46+
cd build
47+
cmake .. -G Ninja -DPICO_SDK_PATH=../../pico-sdk -DCMAKE_BUILD_TYPE=Debug -DPICO_BOARD=pico_w
48+
cmake --build .

0 commit comments

Comments
 (0)