Skip to content

Commit 9629f6b

Browse files
authored
Add separate builds for Pico and Pico 2 W to GiHub CI
Many of the pico-examples are RP2350 only, so add a Pico 2 W build job so that these (and the wireless-only examples) get test-built too
1 parent 2d44306 commit 9629f6b

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

.github/workflows/cmake.yml

+22-7
Original file line numberDiff line numberDiff line change
@@ -33,28 +33,43 @@ jobs:
3333
working-directory: ${{github.workspace}}/pico-sdk
3434
run: git submodule update --init
3535

36-
- name: Create Build Environment
36+
- name: Create Build Environment (Pico)
3737
# Some projects don't allow in-source building, so create a separate build directory
3838
# We'll use this as our working directory for all subsequent commands
3939
working-directory: ${{github.workspace}}/pico-examples
40-
run: cmake -E make_directory ${{github.workspace}}/pico-examples/build
40+
run: cmake -E make_directory ${{github.workspace}}/pico-examples/build.pico
4141

42-
- name: Configure CMake
42+
- name: Configure CMake (Pico)
4343
# Use a bash shell so we can use the same syntax for environment variable
4444
# access regardless of the host operating system
4545
shell: bash
46-
working-directory: ${{github.workspace}}/pico-examples/build
46+
working-directory: ${{github.workspace}}/pico-examples/build.pico
4747
# Note the current convention is to use the -S and -B options here to specify source
4848
# and build directories, but this is only available with CMake 3.13 and higher.
4949
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
50-
run: PICO_SDK_PATH=../../pico-sdk cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE
50+
run: PICO_SDK_PATH=../../pico-sdk cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPICO_BOARD=pico
5151

5252
- name: Get core count
5353
id: core_count
5454
run : cat /proc/cpuinfo | grep processor | wc -l
5555

56-
- name: Build
57-
working-directory: ${{github.workspace}}/pico-examples/build
56+
- name: Build (Pico)
57+
working-directory: ${{github.workspace}}/pico-examples/build.pico
58+
shell: bash
59+
# Execute the build. You can specify a specific target with "--target <NAME>"
60+
run: cmake --build . --config $BUILD_TYPE --parallel $(nproc)
61+
62+
- name: Create Build Environment (Pico 2 W)
63+
working-directory: ${{github.workspace}}/pico-examples
64+
run: cmake -E make_directory ${{github.workspace}}/pico-examples/build.pico2_w
65+
66+
- name: Configure CMake (Pico 2 W)
67+
shell: bash
68+
working-directory: ${{github.workspace}}/pico-examples/build.pico2_w
69+
run: PICO_SDK_PATH=../../pico-sdk cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPICO_BOARD=pico2_w
70+
71+
- name: Build (Pico 2 W)
72+
working-directory: ${{github.workspace}}/pico-examples/build.pico2_w
5873
shell: bash
5974
# Execute the build. You can specify a specific target with "--target <NAME>"
6075
run: cmake --build . --config $BUILD_TYPE --parallel $(nproc)

0 commit comments

Comments
 (0)