Skip to content

Commit 206dacf

Browse files
authored
Do not run the matrix if there is no macOS versions picked for benchmarks (#3450)
After the recent addition of macOS-based benchmarks, the `main` workflow has been failing with: ``` Error when evaluating 'strategy' for job 'benchmarks-macos'. apple/swift-nio/.github/workflows/benchmarks.yml@main (Line: 239, Col: 15): Matrix vector 'config' does not contain any values ``` This happens because `swift-nio` does not set any `_enabled` flag for any version of Xcode to run the benchmarks. An example of a failed run: https://github.com/apple/swift-nio/actions/runs/19479529118 ### Motivation: Scheduled jobs should not fail. ### Modifications: Added a condition for running macOS benchmarks matrix generation job. ### Result: Jobs should not fail without any Xcode versions picked for running benchmarks. An example of a run with macos-matrix job skipped: https://github.com/apple/swift-nio/actions/runs/19482328681/job/55758816398 An example of a run with a opt-in macOS Benchmarks: https://github.com/apple/swift-nio/actions/runs/19484086327/job/55762298924
1 parent 6dae988 commit 206dacf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/benchmarks.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,12 @@ jobs:
149149
construct-matrix-macos:
150150
name: Construct macOS Benchmarks matrix
151151
runs-on: ubuntu-latest
152+
if: |
153+
inputs.macos_xcode_16_3_enabled ||
154+
inputs.macos_xcode_16_4_enabled ||
155+
inputs.macos_xcode_26_0_enabled ||
156+
inputs.macos_xcode_26_1_enabled ||
157+
inputs.macos_xcode_latest_beta_enabled
152158
outputs:
153159
macos-matrix: '${{ steps.generate-matrix.outputs.macos-matrix }}'
154160
steps:

0 commit comments

Comments
 (0)