From 3923c389bf0e5a2c673c891b4dc9306bf9224ab3 Mon Sep 17 00:00:00 2001 From: Mathew Polzin Date: Mon, 14 Sep 2026 08:51:13 -0500 Subject: [PATCH] add downstream project CI step --- .github/downstream-project/Package.swift | 25 +++++++++++++++++++ .github/downstream-project/Sources/Main.swift | 3 +++ .github/workflows/codecov.yml | 3 ++- .github/workflows/downstream-project.yml | 25 +++++++++++++++++++ .github/workflows/traits.yml | 3 ++- 5 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 .github/downstream-project/Package.swift create mode 100644 .github/downstream-project/Sources/Main.swift create mode 100644 .github/workflows/downstream-project.yml diff --git a/.github/downstream-project/Package.swift b/.github/downstream-project/Package.swift new file mode 100644 index 0000000000..dfa8694598 --- /dev/null +++ b/.github/downstream-project/Package.swift @@ -0,0 +1,25 @@ +// swift-tools-version: 6.3 + +import PackageDescription + +let package = Package( + name: "OpenAPIKit-Project", + platforms: [ + .macOS("26.4") + ], + products: [ + .executable(name: "OpenAPIKit-Project", targets: ["OpenAPIKit-Project"]) + ], + dependencies: [ + .package(path: "../../") + ], + targets: [ + .executableTarget( + name: "OpenAPIKit-Project", + dependencies: [ + .product(name: "OpenAPIKit", package: "OpenAPIKit") + ] + ) + ], + swiftLanguageModes: [.v6] +) diff --git a/.github/downstream-project/Sources/Main.swift b/.github/downstream-project/Sources/Main.swift new file mode 100644 index 0000000000..8cb8aa198a --- /dev/null +++ b/.github/downstream-project/Sources/Main.swift @@ -0,0 +1,3 @@ +import OpenAPIKit + +print("Hello World!") \ No newline at end of file diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 7094255548..5c5832c835 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -1,6 +1,7 @@ name: Code Coverage -on: [pull_request] +on: + pull_request: jobs: codecov: diff --git a/.github/workflows/downstream-project.yml b/.github/workflows/downstream-project.yml new file mode 100644 index 0000000000..bf20e35da4 --- /dev/null +++ b/.github/workflows/downstream-project.yml @@ -0,0 +1,25 @@ +name: Downstream Project + +on: + pull_request: + +jobs: + build-with-compiler-flags: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + image: + - swift:6.3-noble + - swiftlang/swift:nightly-noble + flags: + - [] + - ['-Xswiftc', '-cross-module-optimization'] + container: ${{ matrix.image }} + steps: + - name: Checkout code + uses: actions/checkout@v5 + - name: Build Downstream Project + run: | + cd .github/downstream-project + swift build -c release ${{ join(matrix.flags, ' ') }} diff --git a/.github/workflows/traits.yml b/.github/workflows/traits.yml index 6a89e3c4ad..019d4c8454 100644 --- a/.github/workflows/traits.yml +++ b/.github/workflows/traits.yml @@ -1,6 +1,7 @@ name: Traits -on: [pull_request] +on: + pull_request: jobs: without-default-traits: