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