|
35 | 35 | CARGO_SEMVER_CHECKS_BASELINE_VERSION: 1.0.0
|
36 | 36 |
|
37 | 37 | jobs:
|
| 38 | + determine-runner: |
| 39 | + runs-on: ubuntu-latest |
| 40 | + outputs: |
| 41 | + runner: ${{ steps.set-runner.outputs.runner }} |
| 42 | + steps: |
| 43 | + - name: Clone this repository |
| 44 | + uses: actions/checkout@v4 |
| 45 | + |
| 46 | + - name: Determine which runner to use |
| 47 | + id: set-runner |
| 48 | + run: | |
| 49 | + if [[ -f ci/runners.json ]]; then |
| 50 | + echo "runner=$(cat ci/runners.json)" >> $GITHUB_OUTPUT |
| 51 | + else |
| 52 | + echo "runner=['ubuntu-latest', 'windows-latest', 'macos-latest']" >> $GITHUB_OUTPUT |
| 53 | + fi |
| 54 | +
|
38 | 55 | check:
|
| 56 | + needs: determine-runner |
39 | 57 | name: Lints and doc tests on ${{ matrix.os }}
|
40 | 58 | runs-on: ${{ matrix.os }}
|
41 | 59 | strategy:
|
42 | 60 | fail-fast: false
|
43 | 61 | matrix:
|
44 |
| - os: [ubuntu-latest, windows-latest, macos-latest] |
| 62 | + os: ${{ fromJSON(needs.determine-runner.outputs.runner) }} |
45 | 63 |
|
46 | 64 | steps:
|
47 | 65 | - name: Clone this repository
|
@@ -117,12 +135,13 @@ jobs:
|
117 | 135 | run: cargo +stable semver-checks --verbose --default-features --package zenoh --release-type ${{ env.CARGO_SEMVER_CHECKS_RELEASE_TYPE }} --baseline-version ${{ env.CARGO_SEMVER_CHECKS_BASELINE_VERSION }}
|
118 | 136 |
|
119 | 137 | test:
|
| 138 | + needs: determine-runner |
120 | 139 | name: Unit tests on ${{ matrix.os }}
|
121 | 140 | runs-on: ${{ matrix.os }}
|
122 | 141 | strategy:
|
123 | 142 | fail-fast: false
|
124 | 143 | matrix:
|
125 |
| - os: [ubuntu-latest, windows-latest, macos-latest] |
| 144 | + os: ${{ fromJSON(needs.determine-runner.outputs.runner) }} |
126 | 145 |
|
127 | 146 | steps:
|
128 | 147 | - name: Clone this repository
|
|
0 commit comments