From 3f6223453d723d572872f3ab198f4536201166d0 Mon Sep 17 00:00:00 2001 From: "Sven A. Schmidt" Date: Fri, 11 Apr 2025 10:30:54 +0200 Subject: [PATCH 1/3] Add CI --- .github/workflows/ci.yml | 58 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..fbb9cc0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,58 @@ +# Copyright Dave Verwer, Sven A. Schmidt, and other contributors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: CI + +on: + workflow_dispatch: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + macOS: + # https://github.com/actions/runner-images + runs-on: macos-15 + strategy: + matrix: + xcode: + - '16.3' + steps: + - uses: actions/checkout@v3 + - name: Get swift version + run: env DEVELOPER_DIR="/Applications/Xcode_${{ matrix.xcode }}.app" swift --version + - name: Test + run: env DEVELOPER_DIR="/Applications/Xcode_${{ matrix.xcode }}.app" swift test + - name: Build release + run: env DEVELOPER_DIR="/Applications/Xcode_${{ matrix.xcode }}.app" swift build -c release + + Linux: + # https://github.com/actions/runner-images + runs-on: ubuntu-latest + strategy: + matrix: + image: + - swift:6.0 + - swift:6.1 + container: + image: ${{ matrix.image }} + steps: + - uses: actions/checkout@v3 + - name: Get swift version + run: swift --version + - name: Test + run: swift test + - name: Build release + run: swift build -c release From 4fbe5949d7ffc956521b1448f57b922863559c34 Mon Sep 17 00:00:00 2001 From: "Sven A. Schmidt" Date: Fri, 11 Apr 2025 10:45:03 +0200 Subject: [PATCH 2/3] Skip tests (there are none) --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fbb9cc0..f277f50 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,8 +33,8 @@ jobs: - uses: actions/checkout@v3 - name: Get swift version run: env DEVELOPER_DIR="/Applications/Xcode_${{ matrix.xcode }}.app" swift --version - - name: Test - run: env DEVELOPER_DIR="/Applications/Xcode_${{ matrix.xcode }}.app" swift test + # - name: Test + # run: env DEVELOPER_DIR="/Applications/Xcode_${{ matrix.xcode }}.app" swift test - name: Build release run: env DEVELOPER_DIR="/Applications/Xcode_${{ matrix.xcode }}.app" swift build -c release @@ -52,7 +52,7 @@ jobs: - uses: actions/checkout@v3 - name: Get swift version run: swift --version - - name: Test - run: swift test + # - name: Test + # run: swift test - name: Build release run: swift build -c release From cc80ec2933b5e72c9a4c56b77c455df5202faa42 Mon Sep 17 00:00:00 2001 From: "Sven A. Schmidt" Date: Fri, 11 Apr 2025 10:46:06 +0200 Subject: [PATCH 3/3] Make types Sendable --- Sources/DependencyResolution/ProductDependency.swift | 2 +- Sources/DependencyResolution/ResolvedDependency.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/DependencyResolution/ProductDependency.swift b/Sources/DependencyResolution/ProductDependency.swift index 981c83e..fcb6385 100644 --- a/Sources/DependencyResolution/ProductDependency.swift +++ b/Sources/DependencyResolution/ProductDependency.swift @@ -13,7 +13,7 @@ // limitations under the License. -public struct ProductDependency: Codable, Equatable { +public struct ProductDependency: Codable, Equatable, Sendable { public var identity: String public var name: String public var url: String diff --git a/Sources/DependencyResolution/ResolvedDependency.swift b/Sources/DependencyResolution/ResolvedDependency.swift index a23e73d..55c96e7 100644 --- a/Sources/DependencyResolution/ResolvedDependency.swift +++ b/Sources/DependencyResolution/ResolvedDependency.swift @@ -13,7 +13,7 @@ // limitations under the License. -public struct ResolvedDependency: Codable, Equatable { +public struct ResolvedDependency: Codable, Equatable, Sendable { public var packageName: String public var repositoryURL: String