Package.swift 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. // swift-tools-version:5.6
  2. /*
  3. * Copyright 2020, gRPC Authors All rights reserved.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. import PackageDescription
  18. let package = Package(
  19. name: "QPSBenchmark",
  20. platforms: [.macOS(.v12)],
  21. products: [
  22. .executable(name: "QPSBenchmark", targets: ["QPSBenchmark"]),
  23. ],
  24. dependencies: [
  25. .package(path: "../../"),
  26. .package(url: "https://github.com/apple/swift-nio.git", from: "2.32.0"),
  27. .package(url: "https://github.com/apple/swift-log.git", from: "1.4.0"),
  28. .package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.0.0"),
  29. .package(url: "https://github.com/apple/swift-atomics.git", from: "1.0.2"),
  30. .package(
  31. url: "https://github.com/swift-server/swift-service-lifecycle.git",
  32. from: "1.0.0-alpha"
  33. ),
  34. .package(
  35. name: "SwiftProtobuf",
  36. url: "https://github.com/apple/swift-protobuf.git",
  37. from: "1.19.0"
  38. ),
  39. ],
  40. targets: [
  41. .executableTarget(
  42. name: "QPSBenchmark",
  43. dependencies: [
  44. .product(name: "GRPC", package: "grpc-swift"),
  45. .product(name: "Atomics", package: "swift-atomics"),
  46. .product(name: "NIOCore", package: "swift-nio"),
  47. .product(name: "NIOPosix", package: "swift-nio"),
  48. .product(name: "NIOConcurrencyHelpers", package: "swift-nio"),
  49. .product(name: "ArgumentParser", package: "swift-argument-parser"),
  50. .product(name: "Logging", package: "swift-log"),
  51. .product(name: "Lifecycle", package: "swift-service-lifecycle"),
  52. .product(name: "SwiftProtobuf", package: "SwiftProtobuf"),
  53. .target(name: "BenchmarkUtils"),
  54. ],
  55. exclude: [
  56. "Model/benchmark_service.proto",
  57. "Model/control.proto",
  58. "Model/core_stats.proto",
  59. "Model/messages.proto",
  60. "Model/payloads.proto",
  61. "Model/stats.proto",
  62. "Model/worker_service.proto",
  63. ]
  64. ),
  65. .target(
  66. name: "BenchmarkUtils",
  67. dependencies: [
  68. .product(name: "GRPC", package: "grpc-swift"),
  69. ]
  70. ),
  71. .testTarget(
  72. name: "BenchmarkUtilsTests",
  73. dependencies: [
  74. .product(name: "GRPC", package: "grpc-swift"),
  75. .target(name: "BenchmarkUtils"),
  76. ]
  77. ),
  78. ]
  79. )