|
9 | 9 | build:
|
10 | 10 | if: github.repository_owner == 'raspberrypi'
|
11 | 11 | runs-on: [self-hosted, Linux, X64]
|
| 12 | + strategy: |
| 13 | + fail-fast: false |
| 14 | + matrix: |
| 15 | + board: ["pico", "pico2_w"] |
12 | 16 |
|
13 | 17 | steps:
|
14 | 18 | - name: Clean workspace
|
@@ -37,24 +41,24 @@ jobs:
|
37 | 41 | # Some projects don't allow in-source building, so create a separate build directory
|
38 | 42 | # We'll use this as our working directory for all subsequent commands
|
39 | 43 | working-directory: ${{github.workspace}}/pico-examples
|
40 |
| - run: cmake -E make_directory ${{github.workspace}}/pico-examples/build |
| 44 | + run: cmake -E make_directory ${{github.workspace}}/pico-examples/build.${{ matrix.board }} |
41 | 45 |
|
42 | 46 | - name: Configure CMake
|
43 | 47 | # Use a bash shell so we can use the same syntax for environment variable
|
44 | 48 | # access regardless of the host operating system
|
45 | 49 | shell: bash
|
46 |
| - working-directory: ${{github.workspace}}/pico-examples/build |
| 50 | + working-directory: ${{github.workspace}}/pico-examples/build.${{ matrix.board }} |
47 | 51 | # Note the current convention is to use the -S and -B options here to specify source
|
48 | 52 | # and build directories, but this is only available with CMake 3.13 and higher.
|
49 | 53 | # 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 |
| 54 | + run: PICO_SDK_PATH=../../pico-sdk cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPICO_BOARD=${{ matrix.board }} |
51 | 55 |
|
52 | 56 | - name: Get core count
|
53 | 57 | id: core_count
|
54 | 58 | run : cat /proc/cpuinfo | grep processor | wc -l
|
55 | 59 |
|
56 | 60 | - name: Build
|
57 |
| - working-directory: ${{github.workspace}}/pico-examples/build |
| 61 | + working-directory: ${{github.workspace}}/pico-examples/build.${{ matrix.board }} |
58 | 62 | shell: bash
|
59 | 63 | # Execute the build. You can specify a specific target with "--target <NAME>"
|
60 | 64 | run: cmake --build . --config $BUILD_TYPE --parallel $(nproc)
|
0 commit comments