Skip to content

Commit 12b2ee2

Browse files
authored
Update examples CI to use swift-test-matrix (#2174)
1 parent 067938b commit 12b2ee2

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

.github/workflows/pull_request.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,31 @@ jobs:
2626
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
2727
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable"
2828

29-
examples:
29+
construct-examples-matrix:
30+
name: Construct Examples matrix
31+
runs-on: ubuntu-latest
32+
outputs:
33+
examples-matrix: '${{ steps.generate-matrix.outputs.examples-matrix }}'
34+
steps:
35+
- name: Checkout repository
36+
uses: actions/checkout@v4
37+
with:
38+
persist-credentials: false
39+
- id: generate-matrix
40+
run: echo "examples-matrix=$(curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/generate_matrix.sh | bash)" >> "$GITHUB_OUTPUT"
41+
env:
42+
MATRIX_LINUX_5_9_ENABLED: false
43+
MATRIX_LINUX_5_10_ENABLED: false
44+
MATRIX_LINUX_COMMAND: "./dev/build-examples.sh"
45+
MATRIX_LINUX_SETUP_COMMAND: ""
46+
47+
examples-matrix:
3048
name: Examples
31-
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
49+
needs: construct-examples-matrix
50+
uses: apple/swift-nio/.github/workflows/swift_test_matrix.yml@main
3251
with:
3352
name: "Examples"
34-
matrix_linux_5_9_enabled: false
35-
matrix_linux_5_10_enabled: false
36-
matrix_linux_command: "./dev/build-examples.sh"
53+
matrix_string: '${{ needs.construct-examples-matrix.outputs.examples-matrix }}'
3754

3855
benchmarks:
3956
name: Benchmarks

0 commit comments

Comments
 (0)