Skip to content

Commit cd4a228

Browse files
authored
Update CI and docs to Swift 6.2 (#24)
This commit updates the CI workflows and documentation generation to use Swift 6.2. It also updates various GitHub Actions to their latest versions and removes unnecessary test manifest files that are no longer required.
1 parent 847ccd0 commit cd4a228

11 files changed

Lines changed: 39 additions & 86 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,18 @@ jobs:
66
lint:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v4
9+
- uses: actions/checkout@v6
1010
- uses: norio-nomura/action-swiftlint@3.2.1
1111
macos-test:
1212
strategy:
1313
matrix:
1414
swift-version:
15-
- "5.9"
15+
- "6.1"
16+
- "6.2"
1617
runs-on: macos-latest
1718
steps:
18-
- uses: actions/checkout@v4
19-
- uses: swift-actions/setup-swift@v1
19+
- uses: actions/checkout@v6
20+
- uses: swift-actions/setup-swift@v3
2021
with:
2122
swift-version: ${{ matrix.swift-version }}
2223
- run: swift test

.github/workflows/docc.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ jobs:
99
generate-docs:
1010
runs-on: macos-latest
1111
steps:
12-
- uses: actions/checkout@v4
13-
- uses: swift-actions/setup-swift@v1
12+
- uses: actions/checkout@v6
13+
- uses: swift-actions/setup-swift@v3
1414
with:
15-
swift-version: "5.9"
15+
swift-version: "6.2"
1616
- name: generate-documentation
1717
# https://apple.github.io/swift-docc-plugin/documentation/swiftdoccplugin/generating-documentation-for-hosting-online/
1818
run: >
19-
swift package
20-
--allow-writing-to-directory ./docs
21-
generate-documentation
22-
--output-path ./docs
23-
--hosting-base-path AccelerateArray
24-
--disable-indexing
19+
swift package
20+
--allow-writing-to-directory ./docs
21+
generate-documentation
22+
--output-path ./docs
23+
--hosting-base-path AccelerateArray
24+
--disable-indexing
2525
--transform-for-static-hosting
2626
- name: generate theme-settings.json
2727
run: echo '' > theme-settings.json

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
*.log
88
*.bak
99

10+
.swiftpm/
1011
build
1112

13+
.DS_Store
1214
.idea
1315
docs

.run/preview-documentation.run.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="preview-documentation" type="ShConfigurationType">
3+
<option name="SCRIPT_TEXT" value="swift package --disable-sandbox preview-documentation" />
4+
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
5+
<option name="SCRIPT_PATH" value="swift" />
6+
<option name="SCRIPT_OPTIONS" value="package --disable-sandbox preview-documentation" />
7+
<option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" />
8+
<option name="SCRIPT_WORKING_DIRECTORY" value="$PROJECT_DIR$" />
9+
<option name="INDEPENDENT_INTERPRETER_PATH" value="true" />
10+
<option name="INTERPRETER_PATH" value="/usr/local/bin/bash" />
11+
<option name="INTERPRETER_OPTIONS" value="" />
12+
<option name="EXECUTE_IN_TERMINAL" value="true" />
13+
<option name="EXECUTE_SCRIPT_FILE" value="false" />
14+
<envs />
15+
<method v="2" />
16+
</configuration>
17+
</component>

Package.swift

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

44
import PackageDescription
@@ -11,17 +11,10 @@ let package = Package(
1111
name: "AccelerateArray",
1212
targets: ["AccelerateArray"]),
1313
],
14-
dependencies: {
14+
dependencies: [
1515
// https://apple.github.io/swift-docc-plugin/documentation/swiftdoccplugin/
16-
var deps: [PackageDescription.Package.Dependency] = []
17-
#if swift(>=5.6.0)
18-
deps.append(
19-
// .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.3.0")
20-
.package(url: "https://github.com/apple/swift-docc-plugin", branch: "main")
21-
)
22-
#endif
23-
return deps
24-
}(),
16+
.package(url: "https://github.com/apple/swift-docc-plugin", branch: "main")
17+
],
2518
targets: [
2619
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
2720
// Targets can depend on other targets in this package, and on products in packages which this package depends

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# AccelerateArray
22

3-
[![Swift Version](https://img.shields.io/badge/swift-5.9-blue.svg)](https://swift.org)
3+
[![Swift Version](https://img.shields.io/badge/swift-6.2-blue.svg)](https://swift.org)
44
![Platform](https://img.shields.io/badge/platform-macOS-lightgray.svg)
55
![Build](https://github.com/dastrobu/AccelerateArray/actions/workflows/ci.yaml/badge.svg)
66

Tests/AccelerateArrayTests/XCTestManifests.swift

Lines changed: 0 additions & 11 deletions
This file was deleted.

Tests/AccelerateArrayTests/cblas.swift

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,4 @@ class CblasTests: XCTestCase {
102102
XCTAssertEqual(a, [1, 2])
103103
XCTAssertEqual(b, [11, 1, 16])
104104
}
105-
106-
static var allTests: [(String, (CblasTests) -> () throws -> Void)] {
107-
return [
108-
("testScalFloat", testScalFloat),
109-
("testScalDouble", testScalDouble),
110-
("testSetFloat", testSetFloat),
111-
("testSetDouble", testSetDouble),
112-
("testAxpbyFloat", testAxpbyFloat),
113-
("testAxpbyDouble", testAxpbyDouble),
114-
]
115-
}
116105
}

Tests/AccelerateArrayTests/lapack.swift

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -277,17 +277,4 @@ class LapackTests: XCTestCase {
277277

278278
XCTAssertEqual(X1, X2, accuracy: 1e-15)
279279
}
280-
281-
static var allTests: [(String, (LapackTests) -> () throws -> Void)] {
282-
return [
283-
("testGetrfFloat", testGetrfFloat),
284-
("testGetriFloat", testGetriFloat),
285-
("testGesvFloat", testGesvFloat),
286-
("testGtsvFloat", testGtsvFloat),
287-
("testGetrfDouble", testGetrfDouble),
288-
("testGetriDouble", testGetriDouble),
289-
("testGesvDouble", testGesvDouble),
290-
("testGtsvDouble", testGtsvDouble),
291-
]
292-
}
293280
}

Tests/AccelerateArrayTests/test_support.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import XCTest
88
internal func XCTAssertEqual<T>(_ expression1: @autoclosure () throws -> [T],
99
_ expression2: @autoclosure () throws -> [T],
1010
accuracy: T, _ message: @autoclosure () -> String = "",
11-
file: StaticString = #file, line: UInt = #line) rethrows where T: FloatingPoint {
11+
file: StaticString = #filePath, line: UInt = #line) rethrows where T: FloatingPoint {
1212
let array1: [T] = try expression1()
1313
let array2: [T] = try expression2()
1414
XCTAssertEqual(array1.count, array2.count, file: file, line: line)

0 commit comments

Comments
 (0)