From fa04f20635594cb554708ef468fba1d26cab45e0 Mon Sep 17 00:00:00 2001
From: Daniel Strobusch <1847260+dastrobu@users.noreply.github.com>
Date: Sat, 10 Jan 2026 00:58:21 +0100
Subject: [PATCH] Update CI and docs to Swift 6.2
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.
---
.github/workflows/ci.yaml | 9 ++++---
.github/workflows/docc.yaml | 18 ++++++-------
.gitignore | 2 ++
.run/preview-documentation.run.xml | 17 +++++++++++++
Package.swift | 15 +++--------
README.md | 2 +-
.../XCTestManifests.swift | 11 --------
Tests/AccelerateArrayTests/cblas.swift | 11 --------
Tests/AccelerateArrayTests/lapack.swift | 13 ----------
Tests/AccelerateArrayTests/test_support.swift | 2 +-
Tests/AccelerateArrayTests/vDSP.swift | 25 -------------------
11 files changed, 39 insertions(+), 86 deletions(-)
create mode 100644 .run/preview-documentation.run.xml
delete mode 100644 Tests/AccelerateArrayTests/XCTestManifests.swift
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 5168644..cefdf5c 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -6,17 +6,18 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v6
- uses: norio-nomura/action-swiftlint@3.2.1
macos-test:
strategy:
matrix:
swift-version:
- - "5.9"
+ - "6.1"
+ - "6.2"
runs-on: macos-latest
steps:
- - uses: actions/checkout@v4
- - uses: swift-actions/setup-swift@v1
+ - uses: actions/checkout@v6
+ - uses: swift-actions/setup-swift@v3
with:
swift-version: ${{ matrix.swift-version }}
- run: swift test
diff --git a/.github/workflows/docc.yaml b/.github/workflows/docc.yaml
index fe098be..8fc9119 100644
--- a/.github/workflows/docc.yaml
+++ b/.github/workflows/docc.yaml
@@ -9,19 +9,19 @@ jobs:
generate-docs:
runs-on: macos-latest
steps:
- - uses: actions/checkout@v4
- - uses: swift-actions/setup-swift@v1
+ - uses: actions/checkout@v6
+ - uses: swift-actions/setup-swift@v3
with:
- swift-version: "5.9"
+ swift-version: "6.2"
- name: generate-documentation
# https://apple.github.io/swift-docc-plugin/documentation/swiftdoccplugin/generating-documentation-for-hosting-online/
run: >
- swift package
- --allow-writing-to-directory ./docs
- generate-documentation
- --output-path ./docs
- --hosting-base-path AccelerateArray
- --disable-indexing
+ swift package
+ --allow-writing-to-directory ./docs
+ generate-documentation
+ --output-path ./docs
+ --hosting-base-path AccelerateArray
+ --disable-indexing
--transform-for-static-hosting
- name: generate theme-settings.json
run: echo '' > theme-settings.json
diff --git a/.gitignore b/.gitignore
index 80e1661..f22f420 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,7 +7,9 @@
*.log
*.bak
+.swiftpm/
build
+.DS_Store
.idea
docs
diff --git a/.run/preview-documentation.run.xml b/.run/preview-documentation.run.xml
new file mode 100644
index 0000000..796883e
--- /dev/null
+++ b/.run/preview-documentation.run.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Package.swift b/Package.swift
index e962314..ca33c4e 100644
--- a/Package.swift
+++ b/Package.swift
@@ -1,4 +1,4 @@
-// swift-tools-version:5.7
+// swift-tools-version:6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
@@ -11,17 +11,10 @@ let package = Package(
name: "AccelerateArray",
targets: ["AccelerateArray"]),
],
- dependencies: {
+ dependencies: [
// https://apple.github.io/swift-docc-plugin/documentation/swiftdoccplugin/
- var deps: [PackageDescription.Package.Dependency] = []
- #if swift(>=5.6.0)
- deps.append(
-// .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.3.0")
- .package(url: "https://github.com/apple/swift-docc-plugin", branch: "main")
- )
- #endif
- return deps
- }(),
+ .package(url: "https://github.com/apple/swift-docc-plugin", branch: "main")
+ ],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends
diff --git a/README.md b/README.md
index 96e8ce3..c5f4732 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# AccelerateArray
-[](https://swift.org)
+[](https://swift.org)


diff --git a/Tests/AccelerateArrayTests/XCTestManifests.swift b/Tests/AccelerateArrayTests/XCTestManifests.swift
deleted file mode 100644
index 5197fec..0000000
--- a/Tests/AccelerateArrayTests/XCTestManifests.swift
+++ /dev/null
@@ -1,11 +0,0 @@
-import XCTest
-
-#if !canImport(ObjectiveC)
-public func allTests() -> [XCTestCaseEntry] {
- return [
- testCase(cblasTests.allTests),
- testCase(lapackTests.allTests),
- testCase(vDSPTests.allTests),
- ]
-}
-#endif
diff --git a/Tests/AccelerateArrayTests/cblas.swift b/Tests/AccelerateArrayTests/cblas.swift
index e07469f..8c0caa1 100644
--- a/Tests/AccelerateArrayTests/cblas.swift
+++ b/Tests/AccelerateArrayTests/cblas.swift
@@ -102,15 +102,4 @@ class CblasTests: XCTestCase {
XCTAssertEqual(a, [1, 2])
XCTAssertEqual(b, [11, 1, 16])
}
-
- static var allTests: [(String, (CblasTests) -> () throws -> Void)] {
- return [
- ("testScalFloat", testScalFloat),
- ("testScalDouble", testScalDouble),
- ("testSetFloat", testSetFloat),
- ("testSetDouble", testSetDouble),
- ("testAxpbyFloat", testAxpbyFloat),
- ("testAxpbyDouble", testAxpbyDouble),
- ]
- }
}
diff --git a/Tests/AccelerateArrayTests/lapack.swift b/Tests/AccelerateArrayTests/lapack.swift
index 22201f1..add90d8 100644
--- a/Tests/AccelerateArrayTests/lapack.swift
+++ b/Tests/AccelerateArrayTests/lapack.swift
@@ -277,17 +277,4 @@ class LapackTests: XCTestCase {
XCTAssertEqual(X1, X2, accuracy: 1e-15)
}
-
- static var allTests: [(String, (LapackTests) -> () throws -> Void)] {
- return [
- ("testGetrfFloat", testGetrfFloat),
- ("testGetriFloat", testGetriFloat),
- ("testGesvFloat", testGesvFloat),
- ("testGtsvFloat", testGtsvFloat),
- ("testGetrfDouble", testGetrfDouble),
- ("testGetriDouble", testGetriDouble),
- ("testGesvDouble", testGesvDouble),
- ("testGtsvDouble", testGtsvDouble),
- ]
- }
}
diff --git a/Tests/AccelerateArrayTests/test_support.swift b/Tests/AccelerateArrayTests/test_support.swift
index a3c0b65..134fd09 100644
--- a/Tests/AccelerateArrayTests/test_support.swift
+++ b/Tests/AccelerateArrayTests/test_support.swift
@@ -8,7 +8,7 @@ import XCTest
internal func XCTAssertEqual(_ expression1: @autoclosure () throws -> [T],
_ expression2: @autoclosure () throws -> [T],
accuracy: T, _ message: @autoclosure () -> String = "",
- file: StaticString = #file, line: UInt = #line) rethrows where T: FloatingPoint {
+ file: StaticString = #filePath, line: UInt = #line) rethrows where T: FloatingPoint {
let array1: [T] = try expression1()
let array2: [T] = try expression2()
XCTAssertEqual(array1.count, array2.count, file: file, line: line)
diff --git a/Tests/AccelerateArrayTests/vDSP.swift b/Tests/AccelerateArrayTests/vDSP.swift
index fd51846..9ad9775 100644
--- a/Tests/AccelerateArrayTests/vDSP.swift
+++ b/Tests/AccelerateArrayTests/vDSP.swift
@@ -176,29 +176,4 @@ class VDSPTests: XCTestCase {
a.vpoly(b: b, c: &c, strideC: 2)
XCTAssertEqual(c, [3, 0, 5, 0])
}
-
- static var allTests: [(String, (VDSPTests) -> () throws -> Void)] {
- return [
- ("testVrampFloat", testVrampFloat),
- ("testVrampDouble", testVrampDouble),
- ("testMtransFloatWhenEmpty", testMtransFloatWhenEmpty),
- ("testMtransFloat", testMtransFloat),
- ("testMtransDoubleWhenEmpty", testMtransDoubleWhenEmpty),
- ("testMtransDouble", testMtransDouble),
- ("testMmulFloatWhenEmpty", testMmulFloatWhenEmpty),
- ("testMmulFloat", testMmulFloat),
- ("testMmulDoubleWhenEmpty", testMmulDoubleWhenEmpty),
- ("testMmulDouble", testMmulDouble),
- ("testVpolyShouldReturnEmptyArrayWhenCoefficientsEmptyDouble", testVpolyShouldReturnEmptyArrayWhenCoefficientsEmptyDouble),
- ("testVpolyDouble", testVpolyDouble),
- ("testVpolyShouldRespectStrideADouble", testVpolyShouldRespectStrideADouble),
- ("testVpolyShouldRespectStrideBDouble", testVpolyShouldRespectStrideBDouble),
- ("testVpolyShouldRespectStrideCDouble", testVpolyShouldRespectStrideCDouble),
- ("testVpolyShouldReturnEmptyArrayWhenCoefficientsEmptyFloat", testVpolyShouldReturnEmptyArrayWhenCoefficientsEmptyFloat),
- ("testVpolyFloat", testVpolyFloat),
- ("testVpolyShouldRespectStrideAFloat", testVpolyShouldRespectStrideAFloat),
- ("testVpolyShouldRespectStrideBFloat", testVpolyShouldRespectStrideBFloat),
- ("testVpolyShouldRespectStrideCFloat", testVpolyShouldRespectStrideCFloat),
- ]
- }
}