diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e63a0e3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: Forked ci +on: + push: + workflow_dispatch: + pull_request: +jobs: + macos-ios: + runs-on: macos-15 + steps: + - uses: actions/checkout@v4 + - name: "Test Swift Package on macOS" + run: swift test + - name: "Build Swift Package on iOS" + run: xcodebuild build -skipMacroValidation -skipPackagePluginValidation -sdk "iphonesimulator" -destination "platform=iOS Simulator,name=iPhone 16" -scheme "Forked-Package" + #run: xcodebuild test -skipMacroValidation -skipPackagePluginValidation -sdk "iphonesimulator" -destination "platform=iOS Simulator,name=iPhone 16" -scheme "Forked-Package" + linux-android: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - name: "Test Swift Package on Linux" + run: swift test + - name: "Build Swift Package on Android" + uses: skiptools/swift-android-action@v2 + with: + # Android SDK does not yet support Testing framework + build-tests: false + windows: + runs-on: windows-latest + # Error: error: invalid path 'docs/Forked/data/documentation/forked/atomicrepository/content(of:at:).json' + if: false + steps: + - uses: compnerd/gha-setup-swift@main + with: + branch: swift-6.0.3-release + tag: 6.0.3-RELEASE + - uses: actions/checkout@v4 + - name: "Test Swift Package on Windows" + run: swift test + diff --git a/Sources/ForkedCloudKit/CloudKitExchange+CKSyncEngineDelegate.swift b/Sources/ForkedCloudKit/CloudKitExchange+CKSyncEngineDelegate.swift index 9267cd7..e937f19 100644 --- a/Sources/ForkedCloudKit/CloudKitExchange+CKSyncEngineDelegate.swift +++ b/Sources/ForkedCloudKit/CloudKitExchange+CKSyncEngineDelegate.swift @@ -1,3 +1,4 @@ +#if canImport(CloudKit) import CloudKit import os.log @@ -71,3 +72,5 @@ extension CloudKitExchange: CKSyncEngineDelegate { } } +#endif + diff --git a/Sources/ForkedCloudKit/CloudKitExchange+HandlingCloudChanges.swift b/Sources/ForkedCloudKit/CloudKitExchange+HandlingCloudChanges.swift index 241f4d5..aa249ea 100644 --- a/Sources/ForkedCloudKit/CloudKitExchange+HandlingCloudChanges.swift +++ b/Sources/ForkedCloudKit/CloudKitExchange+HandlingCloudChanges.swift @@ -1,3 +1,4 @@ +#if canImport(CloudKit) import CloudKit import Forked import os.log @@ -177,5 +178,4 @@ extension CloudKitExchange { } - - +#endif diff --git a/Sources/ForkedCloudKit/CloudKitExchange.swift b/Sources/ForkedCloudKit/CloudKitExchange.swift index a40b75b..2a34756 100644 --- a/Sources/ForkedCloudKit/CloudKitExchange.swift +++ b/Sources/ForkedCloudKit/CloudKitExchange.swift @@ -1,3 +1,4 @@ +#if canImport(CloudKit) import CloudKit import SwiftUI import AsyncAlgorithms @@ -248,4 +249,5 @@ internal extension CloudKitExchange { } } +#endif