Skip to content

Commit

Permalink
Merge branch 'main' into v2/code-gen
Browse files Browse the repository at this point in the history
  • Loading branch information
glbrntt authored Jan 22, 2025
2 parents 1c9706e + 9639fe9 commit 2845f67
Show file tree
Hide file tree
Showing 37 changed files with 139 additions and 4,814 deletions.
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: "apt update && apt install -y protobuf-compiler && ./dev/build-examples.sh"

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
9 changes: 6 additions & 3 deletions Examples/echo/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ let package = Package(
name: "echo",
platforms: [.macOS("15.0")],
dependencies: [
.package(url: "https://github.com/grpc/grpc-swift.git", exact: "2.0.0-beta.3"),
.package(url: "https://github.com/grpc/grpc-swift-protobuf.git", exact: "1.0.0-beta.3"),
.package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", exact: "1.0.0-beta.3"),
.package(url: "https://github.com/grpc/grpc-swift.git", branch: "main"),
.package(url: "https://github.com/grpc/grpc-swift-protobuf.git", branch: "main"),
.package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", branch: "main"),
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.5.0"),
],
targets: [
Expand All @@ -34,6 +34,9 @@ let package = Package(
.product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"),
.product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"),
.product(name: "ArgumentParser", package: "swift-argument-parser"),
],
plugins: [
.plugin(name: "GRPCProtobufGenerator", package: "grpc-swift-protobuf")
]
)
]
Expand Down
994 changes: 0 additions & 994 deletions Examples/echo/Sources/Generated/echo.grpc.swift

This file was deleted.

129 changes: 0 additions & 129 deletions Examples/echo/Sources/Generated/echo.pb.swift

This file was deleted.

1 change: 1 addition & 0 deletions Examples/echo/Sources/Protos/echo
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"generate": {
"clients": true,
"servers": true,
"messages": true
}
}
7 changes: 5 additions & 2 deletions Examples/error-details/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ let package = Package(
name: "error-details",
platforms: [.macOS(.v15)],
dependencies: [
.package(url: "https://github.com/grpc/grpc-swift.git", exact: "2.0.0-beta.3"),
.package(url: "https://github.com/grpc/grpc-swift-protobuf.git", exact: "1.0.0-beta.3"),
.package(url: "https://github.com/grpc/grpc-swift.git", branch: "main"),
.package(url: "https://github.com/grpc/grpc-swift-protobuf.git", branch: "main"),
],
targets: [
.executableTarget(
Expand All @@ -31,6 +31,9 @@ let package = Package(
.product(name: "GRPCCore", package: "grpc-swift"),
.product(name: "GRPCInProcessTransport", package: "grpc-swift"),
.product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"),
],
plugins: [
.plugin(name: "GRPCProtobufGenerator", package: "grpc-swift-protobuf")
]
)
]
Expand Down
Loading

0 comments on commit 2845f67

Please sign in to comment.