Skip to content

Commit cb9c514

Browse files
taplinclaude
andcommitted
CI: oldest and newest toolchains, pinned simulator
Linux runs Swift 6.2 and 6.4, macOS runs Xcode 26.0.1 and 26.6, each in debug and release. The iOS job pins Xcode 26.6 and an iPhone 17. The macOS Swift 6.2 release jobs and the iOS job need Perfect-CRUD's crud-3-release-prep on main first: CRUD main crashes in Swift 6.2 release builds, and declares no iOS (Xcode 26 then builds it for iOS 12 and fails). Checked against that branch with Xcode 26.3: 49/49 in debug, release and the iOS Simulator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 2c05ff8 commit cb9c514

2 files changed

Lines changed: 27 additions & 15 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,20 @@ on:
44
push:
55
pull_request:
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
linux:
9-
name: Linux (Swift 6.4, ${{ matrix.configuration }})
12+
name: Linux (Swift ${{ matrix.swift }}, ${{ matrix.configuration }})
1013
runs-on: ubuntu-24.04
11-
container: swift:6.4-noble
14+
container: swift:${{ matrix.swift }}-noble
15+
timeout-minutes: 30
1216
strategy:
1317
fail-fast: false
1418
matrix:
19+
# The oldest supported Swift (swift-tools-version 6.2) and the newest.
20+
swift: ["6.2", "6.4"]
1521
configuration: [debug, release]
1622
steps:
1723
- uses: actions/checkout@v7
@@ -36,17 +42,22 @@ jobs:
3642
run: swift test $FLAGS
3743

3844
macos:
39-
name: macOS (${{ matrix.configuration }})
45+
name: macOS (Xcode ${{ matrix.xcode }}, ${{ matrix.configuration }})
4046
runs-on: macos-26
47+
timeout-minutes: 30
4148
strategy:
4249
fail-fast: false
4350
matrix:
51+
# The oldest Xcode with Swift 6.2, and the runner's default.
52+
xcode: ["26.0.1", "26.6"]
4453
configuration: [debug, release]
4554
steps:
4655
- uses: actions/checkout@v7
4756

48-
- name: Toolchain
49-
run: swift --version
57+
- name: Select Xcode
58+
run: |
59+
sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
60+
swift --version
5061
5162
- name: Build (warnings are errors)
5263
run: |
@@ -62,19 +73,20 @@ jobs:
6273
ios:
6374
name: iOS Simulator
6475
runs-on: macos-26
76+
timeout-minutes: 30
6577
steps:
6678
- uses: actions/checkout@v7
6779

68-
- name: Pick a simulator
80+
- name: Select Xcode
6981
run: |
82+
sudo xcode-select -s /Applications/Xcode_26.6.app
7083
xcodebuild -version
71-
# Simulator names change with each Xcode, so take the first available iPhone.
72-
udid=$(xcrun simctl list devices available -j \
73-
| jq -r '[.devices | to_entries[] | select(.key | contains("iOS")) | .value[] | select(.name | startswith("iPhone"))][0].udid')
74-
[ -n "$udid" ] && [ "$udid" != null ] || { echo "No iPhone simulator available"; exit 1; }
75-
echo "SIMULATOR=$udid" >> "$GITHUB_ENV"
7684
77-
# No SWIFT_TREAT_WARNINGS_AS_ERRORS here: Xcode builds the Perfect-CRUD dependency with
78-
# warnings suppressed, and the two flags conflict. The macOS and Linux jobs check warnings.
85+
# The test target builds at the package's iOS 15 deployment target, so this also
86+
# catches APIs that need a newer iOS. No SWIFT_TREAT_WARNINGS_AS_ERRORS: Xcode builds the
87+
# Perfect-CRUD dependency with warnings suppressed, and the two flags conflict. The macOS
88+
# and Linux jobs check warnings.
7989
- name: Test
80-
run: xcodebuild test -scheme PerfectSQLite -destination "platform=iOS Simulator,id=$SIMULATOR"
90+
run: |
91+
xcodebuild test -scheme PerfectSQLite \
92+
-destination 'platform=iOS Simulator,name=iPhone 17,OS=latest'

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
This project provides a Swift wrapper around the SQLite 3 C library, plus a [Perfect-CRUD](https://github.com/PerfectlySoft/Perfect-CRUD) database driver built on top of it.
1616

17-
**Modernized for Swift 6.** Requires **swift-tools-version 6.2** and builds under full **Swift 6 language mode** (strict concurrency checking on for both the library and test targets). Supports **macOS 12+** and **iOS 15+** (`platforms: [.macOS(.v12), .iOS(.v15)]`) and **Linux** (tested with Swift 6.2.4, 6.3.2 and 6.4 on Ubuntu 24.04). CI runs the tests on macOS, Linux and the iOS Simulator. tvOS/watchOS/visionOS aren't declared or tested.
17+
**Modernized for Swift 6.** Requires **swift-tools-version 6.2** and builds under full **Swift 6 language mode** (strict concurrency checking on for both the library and test targets). Supports **macOS 12+** and **iOS 15+** (`platforms: [.macOS(.v12), .iOS(.v15)]`) and **Linux** (tested with Swift 6.2.4, 6.3.2 and 6.4 on Ubuntu 24.04). CI runs the tests on Linux (Swift 6.2 and 6.4), macOS (Xcode 26.0.1 and 26.6) and the iOS Simulator. tvOS/watchOS/visionOS aren't declared or tested.
1818

1919
The pre-Swift-6 version of this package is preserved on the [`legacy`](../../tree/legacy) branch.
2020

0 commit comments

Comments
 (0)