From 12b2ee2eee9f16b3ec17732691499d36e8e95c25 Mon Sep 17 00:00:00 2001 From: George Barnett Date: Wed, 22 Jan 2025 16:21:35 +0000 Subject: [PATCH] Update examples CI to use swift-test-matrix (#2174) --- .github/workflows/pull_request.yml | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index e7ae36d8b..6bbf64854 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -26,14 +26,31 @@ jobs: linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable" linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -require-explicit-sendable" - examples: + construct-examples-matrix: + name: Construct Examples matrix + runs-on: ubuntu-latest + outputs: + examples-matrix: '${{ steps.generate-matrix.outputs.examples-matrix }}' + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + persist-credentials: false + - id: generate-matrix + run: echo "examples-matrix=$(curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/generate_matrix.sh | bash)" >> "$GITHUB_OUTPUT" + env: + MATRIX_LINUX_5_9_ENABLED: false + MATRIX_LINUX_5_10_ENABLED: false + MATRIX_LINUX_COMMAND: "./dev/build-examples.sh" + MATRIX_LINUX_SETUP_COMMAND: "" + + examples-matrix: name: Examples - uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main + needs: construct-examples-matrix + uses: apple/swift-nio/.github/workflows/swift_test_matrix.yml@main with: name: "Examples" - matrix_linux_5_9_enabled: false - matrix_linux_5_10_enabled: false - matrix_linux_command: "./dev/build-examples.sh" + matrix_string: '${{ needs.construct-examples-matrix.outputs.examples-matrix }}' benchmarks: name: Benchmarks