Skip to content

Commit 2cec96b

Browse files
committed
Update CI to Swift 5.10
1 parent be2ff07 commit 2cec96b

File tree

7 files changed

+50
-39
lines changed

7 files changed

+50
-39
lines changed

.github/workflows/compatibility_tests.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
include:
16-
- os: macos-13
17-
xcode-version: "15.2" # Swift 5.9.2
1816
- os: macos-14
19-
xcode-version: "15.2" # Swift 5.9.2
17+
xcode-version: "15.3" # Swift 5.10
2018
runs-on: ${{ matrix.os }}
19+
env:
20+
OPENGRAPH_WERROR: 1
21+
OPENGRAPH_SWIFT_TESTING: 1
22+
OPENGRAPH_ATTRIBUTEGRAPH: 1
23+
OPENGRAPH_COMPATIBILITY_TEST: 1
2124
steps:
2225
- uses: actions/checkout@v4
2326
- name: Setup Xcode
@@ -26,19 +29,15 @@ jobs:
2629
xcode-version: ${{ matrix.xcode-version }}
2730
- name: Swift version
2831
run: swift --version
29-
- name: Run tests against Apple's AttributeGraph on macOS
32+
- name: Run tests against Apple's AttributeGraph on macOS via SwiftPM
3033
run: |
3134
swift test \
3235
--build-path .build-compatibility-test-debug
33-
env:
34-
OPENGRAPH_ATTRIBUTEGRAPH: 1
35-
OPENGRAPH_COMPATIBILITY_TEST: 1
36-
# FIXME: macOS 13 CI issue. Can't reproduce on macOS 14 locally
37-
# - name: Run tests against Apple's AttributeGraph on macOS
38-
# run: |
39-
# xcodebuild test \
40-
# -scheme OpenGraph-Package \
41-
# -sdk macosx \
42-
# -destination "platform=macOS"
43-
# env:
44-
# OPENGRAPH_COMPATIBILITY_TEST: 1
36+
- name: Run tests against Apple's AttributeGraph on macOS via Xcode
37+
run: |
38+
xcodebuild test \
39+
-scheme OpenGraph-Package \
40+
-sdk macosx \
41+
-destination "platform=macOS" \
42+
-skipPackagePluginValidation \
43+
-skipMacroValidation

.github/workflows/ios.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
include:
16-
# macOS 13 CI issue: "/Users/runner/work/_temp/3a207233-d293-4e92-9dd3-b83f7ccd4597.sh: line 7: 2698 Segmentation fault: 11 xcodebuild build"
17-
# - os: macos-13
18-
# xcode-version: "15.2" # Swift 5.9.2
1916
- os: macos-14
20-
xcode-version: "15.2" # Swift 5.9.2
17+
xcode-version: "15.3" # Swift 5.10
2118
runs-on: ${{ matrix.os }}
19+
env:
20+
OPENGRAPH_WERROR: 1
21+
OPENGRAPH_SWIFT_TESTING: 1
22+
OPENGRAPH_ATTRIBUTEGRAPH: 0
23+
OPENGRAPH_COMPATIBILITY_TEST: 0
2224
steps:
2325
- uses: actions/checkout@v4
2426
- name: Setup Xcode

.github/workflows/macos.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
include:
16-
- os: macos-13
17-
xcode-version: "15.2" # Swift 5.9.2
1816
- os: macos-14
19-
xcode-version: "15.2" # Swift 5.9.2
17+
xcode-version: "15.3" # Swift 5.10
2018
runs-on: ${{ matrix.os }}
19+
env:
20+
OPENGRAPH_WERROR: 1
21+
OPENGRAPH_SWIFT_TESTING: 1
22+
OPENGRAPH_ATTRIBUTEGRAPH: 0
23+
OPENGRAPH_COMPATIBILITY_TEST: 0
2124
steps:
2225
- uses: actions/checkout@v4
2326
- name: Setup Xcode
@@ -30,7 +33,6 @@ jobs:
3033
run: |
3134
swift test \
3235
-c debug \
33-
-Xswiftc -warnings-as-errors \
3436
--enable-code-coverage \
3537
--build-path .build-test-debug
3638
xcrun llvm-cov show \
@@ -41,7 +43,6 @@ jobs:
4143
run: |
4244
swift test \
4345
-c release \
44-
-Xswiftc -warnings-as-errors \
4546
--enable-code-coverage \
4647
--build-path .build-test-release
4748
- uses: codecov/codecov-action@v3

.github/workflows/ubuntu.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,13 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
swift_version: ["5.9.2"]
15+
swift_version: ["5.10"]
1616
runs-on: ubuntu-22.04
17+
env:
18+
OPENGRAPH_WERROR: 1
19+
OPENGRAPH_SWIFT_TESTING: 1
20+
OPENGRAPH_ATTRIBUTEGRAPH: 0
21+
OPENGRAPH_COMPATIBILITY_TEST: 0
1722
container: swift:${{ matrix.swift_version }}-jammy
1823
steps:
1924
- uses: actions/checkout@v4
@@ -24,7 +29,6 @@ jobs:
2429
run: |
2530
swift test \
2631
-c debug \
27-
-Xswiftc -warnings-as-errors \
2832
--enable-code-coverage \
2933
--build-path .build-test-debug
3034
llvm-cov show \
@@ -35,7 +39,6 @@ jobs:
3539
run: |
3640
swift test \
3741
-c release \
38-
-Xswiftc -warnings-as-errors \
3942
--build-path .build-test-release
4043
- uses: codecov/codecov-action@v3
4144
with:

.github/workflows/wasm.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,19 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
swift_version: ["5.9.1"]
15+
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
1616
os: [ubuntu-22.04]
1717
runs-on: ${{ matrix.os }}
18+
env:
19+
OPENGRAPH_WERROR: 1
20+
OPENGRAPH_SWIFT_TESTING: 0
21+
OPENGRAPH_ATTRIBUTEGRAPH: 0
22+
OPENGRAPH_COMPATIBILITY_TEST: 0
1823
steps:
1924
- uses: actions/checkout@v4
2025
- uses: swiftwasm/setup-swiftwasm@v1
2126
with:
22-
swift-version: wasm-${{ matrix.swift_version }}-RELEASE
27+
swift-version: wasm-${{ matrix.swift_version }}
2328
- name: build
2429
run: |
2530
swift build --triple wasm32-unknown-wasi

Package.resolved

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 5.9
1+
// swift-tools-version: 5.10
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import Foundation
@@ -18,10 +18,11 @@ func envEnable(_ key: String, default defaultValue: Bool = false) -> Bool {
1818
}
1919

2020
let isXcodeEnv = Context.environment["__CFBundleIdentifier"] == "com.apple.dt.Xcode"
21+
let development = envEnable("OPENGRAPH_DEVELOPMENT", default: false)
2122

2223
var sharedSwiftSettings: [SwiftSetting] = []
2324

24-
let warningsAsErrorsCondition = envEnable("OPENGRAPH_WERROR", default: isXcodeEnv)
25+
let warningsAsErrorsCondition = envEnable("OPENGRAPH_WERROR", default: isXcodeEnv && development)
2526
if warningsAsErrorsCondition {
2627
sharedSwiftSettings.append(.unsafeFlags(["-warnings-as-errors"]))
2728
}
@@ -125,8 +126,7 @@ if attributeGraphCondition {
125126
let swiftTestingCondition = envEnable("OPENGRAPH_SWIFT_TESTING", default: true)
126127
if swiftTestingCondition {
127128
package.dependencies.append(
128-
// Fix it to be 0.3.0 before we bump to Swift 5.10
129-
.package(url: "https://github.com/apple/swift-testing", exact: "0.3.0")
129+
.package(url: "https://github.com/apple/swift-testing", exact: "0.6.0")
130130
)
131131
openGraphTestTarget.dependencies.append(
132132
.product(name: "Testing", package: "swift-testing")

0 commit comments

Comments
 (0)