From bfcd341710afaa97244d3cf2dfbec17dea88b687 Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Thu, 14 Mar 2024 10:16:31 -0400 Subject: [PATCH] Add swift 5.10 to CI to the 1.x branch. Add the 5.9 and 5.10 Package.swift files also (copies of the 5.8). --- .github/workflows/build.yml | 6 ++- .github/workflows/regular_conformance.yml | 2 +- Package@swift-5.10.swift | 48 +++++++++++++++++++++++ Package@swift-5.9.swift | 48 +++++++++++++++++++++++ 4 files changed, 102 insertions(+), 2 deletions(-) create mode 100644 Package@swift-5.10.swift create mode 100644 Package@swift-5.9.swift diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2cb877dbf..db4d87fad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,13 +15,17 @@ jobs: strategy: fail-fast: false matrix: - swift: ["5.9.2", "5.8.1", "5.7.3", "5.6.3", "5.5.3", "5.4.3", "5.3.3", "5.2.5", "5.1.5", "5.0.3", "4.2.4"] + swift: ["5.10.0", "5.9.2", "5.8.1", "5.7.3", "5.6.3", "5.5.3", "5.4.3", "5.3.3", "5.2.5", "5.1.5", "5.0.3", "4.2.4"] # protobuf_git can reference a commit, tag, or branch # commit: "commits/6935eae45c99926a000ecbef0be20dfd3d159e71" # tag: "ref/tags/v3.11.4" # branch: "ref/heads/main" protobuf_git: ["ref/heads/main"] include: + - swift: 5.10.0 + ubuntu: -jammy + generate_linux_main: false + build_protobuf: true - swift: 5.9.2 ubuntu: -jammy generate_linux_main: false diff --git a/.github/workflows/regular_conformance.yml b/.github/workflows/regular_conformance.yml index cb986fbdf..5381a4f30 100644 --- a/.github/workflows/regular_conformance.yml +++ b/.github/workflows/regular_conformance.yml @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - swift: ["5.9.2"] + swift: ["5.10.0"] ubuntu: ["jammy"] # protobuf_git can reference a commit, tag, or branch # commit: "commits/6935eae45c99926a000ecbef0be20dfd3d159e71" diff --git a/Package@swift-5.10.swift b/Package@swift-5.10.swift new file mode 100644 index 000000000..6630c76f0 --- /dev/null +++ b/Package@swift-5.10.swift @@ -0,0 +1,48 @@ +// swift-tools-version:5.6 + +// Package.swift +// +// Copyright (c) 2014 - 2018 Apple Inc. and the project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See LICENSE.txt for license information: +// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt +// + +import PackageDescription + +let package = Package( + name: "SwiftProtobuf", + products: [ + .executable(name: "protoc-gen-swift", targets: ["protoc-gen-swift"]), + .library(name: "SwiftProtobuf", targets: ["SwiftProtobuf"]), + .library(name: "SwiftProtobufPluginLibrary", targets: ["SwiftProtobufPluginLibrary"]), + .plugin( + name: "SwiftProtobufPlugin", + targets: ["SwiftProtobufPlugin"] + ), + ], + targets: [ + .target(name: "SwiftProtobuf", + resources: [.copy("PrivacyInfo.xcprivacy")]), + .target(name: "SwiftProtobufPluginLibrary", + dependencies: ["SwiftProtobuf"], + resources: [.copy("PrivacyInfo.xcprivacy")]), + .executableTarget(name: "protoc-gen-swift", + dependencies: ["SwiftProtobufPluginLibrary", "SwiftProtobuf"]), + .executableTarget(name: "Conformance", + dependencies: ["SwiftProtobuf"]), + .plugin( + name: "SwiftProtobufPlugin", + capability: .buildTool(), + dependencies: [ + "protoc-gen-swift" + ] + ), + .testTarget(name: "SwiftProtobufTests", + dependencies: ["SwiftProtobuf"]), + .testTarget(name: "SwiftProtobufPluginLibraryTests", + dependencies: ["SwiftProtobufPluginLibrary"]), + ], + swiftLanguageVersions: [.v4, .v4_2, .version("5")] +) diff --git a/Package@swift-5.9.swift b/Package@swift-5.9.swift new file mode 100644 index 000000000..6630c76f0 --- /dev/null +++ b/Package@swift-5.9.swift @@ -0,0 +1,48 @@ +// swift-tools-version:5.6 + +// Package.swift +// +// Copyright (c) 2014 - 2018 Apple Inc. and the project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See LICENSE.txt for license information: +// https://github.com/apple/swift-protobuf/blob/main/LICENSE.txt +// + +import PackageDescription + +let package = Package( + name: "SwiftProtobuf", + products: [ + .executable(name: "protoc-gen-swift", targets: ["protoc-gen-swift"]), + .library(name: "SwiftProtobuf", targets: ["SwiftProtobuf"]), + .library(name: "SwiftProtobufPluginLibrary", targets: ["SwiftProtobufPluginLibrary"]), + .plugin( + name: "SwiftProtobufPlugin", + targets: ["SwiftProtobufPlugin"] + ), + ], + targets: [ + .target(name: "SwiftProtobuf", + resources: [.copy("PrivacyInfo.xcprivacy")]), + .target(name: "SwiftProtobufPluginLibrary", + dependencies: ["SwiftProtobuf"], + resources: [.copy("PrivacyInfo.xcprivacy")]), + .executableTarget(name: "protoc-gen-swift", + dependencies: ["SwiftProtobufPluginLibrary", "SwiftProtobuf"]), + .executableTarget(name: "Conformance", + dependencies: ["SwiftProtobuf"]), + .plugin( + name: "SwiftProtobufPlugin", + capability: .buildTool(), + dependencies: [ + "protoc-gen-swift" + ] + ), + .testTarget(name: "SwiftProtobufTests", + dependencies: ["SwiftProtobuf"]), + .testTarget(name: "SwiftProtobufPluginLibraryTests", + dependencies: ["SwiftProtobufPluginLibrary"]), + ], + swiftLanguageVersions: [.v4, .v4_2, .version("5")] +)