Skip to content

Commit

Permalink
CI generate plugin test matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
rnro committed Jan 24, 2025
1 parent b8e1d21 commit 6c3f38a
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 8 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,28 @@ 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"

plugin-tests:
construct-plugin-tests-matrix:
name: Construct plugin tests matrix
runs-on: ubuntu-latest
outputs:
plugin-tests-matrix: '${{ steps.generate-matrix.outputs.plugin-tests-matrix }}'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
- id: generate-matrix
run: echo "plugin-tests-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: "curl -s https://raw.githubusercontent.com/rnro/grpc-swift-protobuf/refs/heads/build_plugin_integration_tests/dev/plugin-tests.sh | GITHUB_ACTIONS=true bash"
MATRIX_LINUX_SETUP_COMMAND: "apt-get update -y -q && apt-get install -y -q curl protobuf-compiler"

plugin-tests-matrix:
name: Plugin tests
uses: apple/swift-nio/.github/workflows/swift_load_test_matrix.yml@main
needs: construct-plugin-tests-matrix
uses: apple/swift-nio/.github/workflows/swift_test_matrix.yml@main
with:
name: "Plugin tests"
matrix_path: ".github/workflows/matrices/plugin-tests.json"
matrix_string: '${{ needs.construct-plugin-tests-matrix.outputs.plugin-tests-matrix }}'
1 change: 0 additions & 1 deletion .github/workflows/matrices/plugin-tests.json

This file was deleted.

25 changes: 22 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +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"

plugin-tests:
construct-plugin-tests-matrix:
name: Construct plugin tests matrix
runs-on: ubuntu-latest
outputs:
plugin-tests-matrix: '${{ steps.generate-matrix.outputs.plugin-tests-matrix }}'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
- id: generate-matrix
run: echo "plugin-tests-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: "curl -s https://raw.githubusercontent.com/rnro/grpc-swift-protobuf/refs/heads/build_plugin_integration_tests/dev/plugin-tests.sh | GITHUB_ACTIONS=true bash"
MATRIX_LINUX_SETUP_COMMAND: "apt-get update -y -q && apt-get install -y -q curl protobuf-compiler"

plugin-tests-matrix:
name: Plugin tests
uses: apple/swift-nio/.github/workflows/swift_load_test_matrix.yml@main
needs: construct-plugin-tests-matrix
uses: apple/swift-nio/.github/workflows/swift_test_matrix.yml@main
with:
name: "Plugin tests"
matrix_path: ".github/workflows/matrices/plugin-tests.json"
matrix_string: '${{ needs.construct-plugin-tests-matrix.outputs.plugin-tests-matrix }}'

cxx-interop:
name: Cxx interop
Expand Down
2 changes: 1 addition & 1 deletion IntegrationTests/PluginTests/Resources/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import PackageDescription

var package = Package(
let package = Package(
name: "grpc-adopter",
platforms: [
.macOS(.v15),
Expand Down

0 comments on commit 6c3f38a

Please sign in to comment.