Skip to content

Update examples CI to use swift-test-matrix #2174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can omit this if you want

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The examples are about to move to the SwiftPM build plugin so we'll need to install protoc as a setup. I left it blank so I didn't have to find the name of the env variable again 🙃


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
Expand Down
Loading