diff --git a/.github/workflows/compatibility_tests.yml b/.github/workflows/compatibility_tests.yml index 889f4106..f7d5a417 100644 --- a/.github/workflows/compatibility_tests.yml +++ b/.github/workflows/compatibility_tests.yml @@ -13,11 +13,14 @@ jobs: fail-fast: false matrix: include: - - os: macos-13 - xcode-version: "15.2" # Swift 5.9.2 - os: macos-14 - xcode-version: "15.2" # Swift 5.9.2 + xcode-version: "15.3" # Swift 5.10 runs-on: ${{ matrix.os }} + env: + OPENGRAPH_WERROR: 1 + OPENGRAPH_SWIFT_TESTING: 1 + OPENGRAPH_ATTRIBUTEGRAPH: 1 + OPENGRAPH_COMPATIBILITY_TEST: 1 steps: - uses: actions/checkout@v4 - name: Setup Xcode @@ -26,19 +29,15 @@ jobs: xcode-version: ${{ matrix.xcode-version }} - name: Swift version run: swift --version - - name: Run tests against Apple's AttributeGraph on macOS + - name: Run tests against Apple's AttributeGraph on macOS via SwiftPM run: | swift test \ --build-path .build-compatibility-test-debug - env: - OPENGRAPH_ATTRIBUTEGRAPH: 1 - OPENGRAPH_COMPATIBILITY_TEST: 1 - # FIXME: macOS 13 CI issue. Can't reproduce on macOS 14 locally - # - name: Run tests against Apple's AttributeGraph on macOS - # run: | - # xcodebuild test \ - # -scheme OpenGraph-Package \ - # -sdk macosx \ - # -destination "platform=macOS" - # env: - # OPENGRAPH_COMPATIBILITY_TEST: 1 \ No newline at end of file + - name: Run tests against Apple's AttributeGraph on macOS via Xcode + run: | + xcodebuild test \ + -scheme OpenGraph-Package \ + -sdk macosx \ + -destination "platform=macOS" \ + -skipPackagePluginValidation \ + -skipMacroValidation \ No newline at end of file diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index d9dbe986..2ca4ea70 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -13,12 +13,14 @@ jobs: fail-fast: false matrix: include: - # macOS 13 CI issue: "/Users/runner/work/_temp/3a207233-d293-4e92-9dd3-b83f7ccd4597.sh: line 7: 2698 Segmentation fault: 11 xcodebuild build" - # - os: macos-13 - # xcode-version: "15.2" # Swift 5.9.2 - os: macos-14 - xcode-version: "15.2" # Swift 5.9.2 + xcode-version: "15.3" # Swift 5.10 runs-on: ${{ matrix.os }} + env: + OPENGRAPH_WERROR: 1 + OPENGRAPH_SWIFT_TESTING: 1 + OPENGRAPH_ATTRIBUTEGRAPH: 0 + OPENGRAPH_COMPATIBILITY_TEST: 0 steps: - uses: actions/checkout@v4 - name: Setup Xcode diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 4507e295..86501ab6 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -13,11 +13,14 @@ jobs: fail-fast: false matrix: include: - - os: macos-13 - xcode-version: "15.2" # Swift 5.9.2 - os: macos-14 - xcode-version: "15.2" # Swift 5.9.2 + xcode-version: "15.3" # Swift 5.10 runs-on: ${{ matrix.os }} + env: + OPENGRAPH_WERROR: 1 + OPENGRAPH_SWIFT_TESTING: 1 + OPENGRAPH_ATTRIBUTEGRAPH: 0 + OPENGRAPH_COMPATIBILITY_TEST: 0 steps: - uses: actions/checkout@v4 - name: Setup Xcode @@ -30,7 +33,6 @@ jobs: run: | swift test \ -c debug \ - -Xswiftc -warnings-as-errors \ --enable-code-coverage \ --build-path .build-test-debug xcrun llvm-cov show \ @@ -41,7 +43,6 @@ jobs: run: | swift test \ -c release \ - -Xswiftc -warnings-as-errors \ --enable-code-coverage \ --build-path .build-test-release - uses: codecov/codecov-action@v3 diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 596d7d04..5d3780a8 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -12,8 +12,13 @@ jobs: strategy: fail-fast: false matrix: - swift_version: ["5.9.2"] + swift_version: ["5.10"] runs-on: ubuntu-22.04 + env: + OPENGRAPH_WERROR: 1 + OPENGRAPH_SWIFT_TESTING: 1 + OPENGRAPH_ATTRIBUTEGRAPH: 0 + OPENGRAPH_COMPATIBILITY_TEST: 0 container: swift:${{ matrix.swift_version }}-jammy steps: - uses: actions/checkout@v4 @@ -24,7 +29,6 @@ jobs: run: | swift test \ -c debug \ - -Xswiftc -warnings-as-errors \ --enable-code-coverage \ --build-path .build-test-debug llvm-cov show \ @@ -35,7 +39,6 @@ jobs: run: | swift test \ -c release \ - -Xswiftc -warnings-as-errors \ --build-path .build-test-release - uses: codecov/codecov-action@v3 with: diff --git a/.github/workflows/wasm.yml b/.github/workflows/wasm.yml index cfcade51..00590430 100644 --- a/.github/workflows/wasm.yml +++ b/.github/workflows/wasm.yml @@ -12,14 +12,19 @@ jobs: strategy: fail-fast: false matrix: - swift_version: ["5.9.1"] + swift_version: ["5.10-SNAPSHOT-2024-03-30-a"] # "5.10-RELEASE" is not release for WASM, tracked via https://github.com/swiftwasm/swift/issues/5570 os: [ubuntu-22.04] runs-on: ${{ matrix.os }} + env: + OPENGRAPH_WERROR: 1 + OPENGRAPH_SWIFT_TESTING: 0 + OPENGRAPH_ATTRIBUTEGRAPH: 0 + OPENGRAPH_COMPATIBILITY_TEST: 0 steps: - uses: actions/checkout@v4 - uses: swiftwasm/setup-swiftwasm@v1 with: - swift-version: wasm-${{ matrix.swift_version }}-RELEASE + swift-version: wasm-${{ matrix.swift_version }} - name: build run: | swift build --triple wasm32-unknown-wasi diff --git a/Package.resolved b/Package.resolved index 646b5506..60273fe9 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,12 +1,13 @@ { + "originHash" : "9bbeb48f673780072b1cb86308961efbc9eaf1cec5a177dcbbb7b9424cd07a78", "pins" : [ { "identity" : "swift-syntax", "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-syntax.git", "state" : { - "revision" : "64889f0c732f210a935a0ad7cda38f77f876262d", - "version" : "509.1.1" + "revision" : "fa8f95c2d536d6620cc2f504ebe8a6167c9fc2dd", + "version" : "510.0.1" } }, { @@ -14,10 +15,10 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-testing", "state" : { - "revision" : "126e4be6857bda76aab3f45282bc6cfff5ac876a", - "version" : "0.3.0" + "revision" : "8097dd8bcf7f2ed85f8aa8883635ce413012f53b", + "version" : "0.6.0" } } ], - "version" : 2 + "version" : 3 } diff --git a/Package.swift b/Package.swift index ca6dfea5..2e701be6 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 5.9 +// swift-tools-version: 5.10 // The swift-tools-version declares the minimum version of Swift required to build this package. import Foundation @@ -18,10 +18,11 @@ func envEnable(_ key: String, default defaultValue: Bool = false) -> Bool { } let isXcodeEnv = Context.environment["__CFBundleIdentifier"] == "com.apple.dt.Xcode" +let development = envEnable("OPENGRAPH_DEVELOPMENT", default: false) var sharedSwiftSettings: [SwiftSetting] = [] -let warningsAsErrorsCondition = envEnable("OPENGRAPH_WERROR", default: isXcodeEnv) +let warningsAsErrorsCondition = envEnable("OPENGRAPH_WERROR", default: isXcodeEnv && development) if warningsAsErrorsCondition { sharedSwiftSettings.append(.unsafeFlags(["-warnings-as-errors"])) } @@ -125,8 +126,7 @@ if attributeGraphCondition { let swiftTestingCondition = envEnable("OPENGRAPH_SWIFT_TESTING", default: true) if swiftTestingCondition { package.dependencies.append( - // Fix it to be 0.3.0 before we bump to Swift 5.10 - .package(url: "https://github.com/apple/swift-testing", exact: "0.3.0") + .package(url: "https://github.com/apple/swift-testing", exact: "0.6.0") ) openGraphTestTarget.dependencies.append( .product(name: "Testing", package: "swift-testing")