[CI] Update package for Swift 6.0+ (#137)

### Motivation:

Right now, the nightly CI is failing due to the package relying on old
decommissioned Swift toolchains (dev toolchains for 6.0).

### Modifications:

Updated the CI setup to be Swift 6.0+, bumped the tools version, but
kept the language mode to 5 for now.

Bumping of language mode from 5 to 6 can be done in a separate PR, this
PR is mainly to unblock nightly CI.

### Result:

Fixes nightly CI.
This commit is contained in:
Honza Dvorsky
2026-02-16 17:09:27 +01:00
committed by GitHub
parent a05d4bcf57
commit 8c4ce10883
6 changed files with 33 additions and 43 deletions
+2 -3
View File
@@ -11,10 +11,9 @@ jobs:
name: Unit tests
uses: ./.github/workflows/unit_tests.yml
with:
linux_5_9_arguments_override: "--explicit-target-dependency-import-check error"
linux_5_10_arguments_override: "--explicit-target-dependency-import-check error"
linux_6_0_arguments_override: "--explicit-target-dependency-import-check error"
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error"
linux_6_1_arguments_override: "--explicit-target-dependency-import-check error"
linux_6_2_arguments_override: "--explicit-target-dependency-import-check error"
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"
release-builds:
+2 -3
View File
@@ -15,10 +15,9 @@ jobs:
name: Unit tests
uses: ./.github/workflows/unit_tests.yml
with:
linux_5_9_arguments_override: "--explicit-target-dependency-import-check error"
linux_5_10_arguments_override: "--explicit-target-dependency-import-check error"
linux_6_0_arguments_override: "--explicit-target-dependency-import-check error"
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error"
linux_6_1_arguments_override: "--explicit-target-dependency-import-check error"
linux_6_2_arguments_override: "--explicit-target-dependency-import-check error"
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"
cxx-interop:
+20 -32
View File
@@ -3,22 +3,6 @@ name: Unit tests
on:
workflow_call:
inputs:
linux_5_9_enabled:
type: boolean
description: "Boolean to enable the Linux 5.9 Swift version matrix job. Defaults to true."
default: true
linux_5_9_arguments_override:
type: string
description: "The arguments passed to swift test in the Linux 5.9 Swift version matrix job."
default: ""
linux_5_10_enabled:
type: boolean
description: "Boolean to enable the Linux 5.10 Swift version matrix job. Defaults to true."
default: true
linux_5_10_arguments_override:
type: string
description: "The arguments passed to swift test in the Linux 5.10 Swift version matrix job."
default: ""
linux_6_0_enabled:
type: boolean
description: "Boolean to enable the Linux 6.0 Swift version matrix job. Defaults to true."
@@ -27,13 +11,21 @@ on:
type: string
description: "The arguments passed to swift test in the Linux 6.0 Swift version matrix job."
default: ""
linux_nightly_6_0_enabled:
linux_6_1_enabled:
type: boolean
description: "Boolean to enable the Linux nightly 6.0 Swift version matrix job. Defaults to true."
description: "Boolean to enable the Linux 6.1 Swift version matrix job. Defaults to true."
default: true
linux_nightly_6_0_arguments_override:
linux_6_1_arguments_override:
type: string
description: "The arguments passed to swift test in the Linux nightly 6.0 Swift version matrix job."
description: "The arguments passed to swift test in the Linux 6.1 Swift version matrix job."
default: ""
linux_6_2_enabled:
type: boolean
description: "Boolean to enable the Linux 6.2 Swift version matrix job. Defaults to true."
default: true
linux_6_2_arguments_override:
type: string
description: "The arguments passed to swift test in the Linux 6.2 Swift version matrix job."
default: ""
linux_nightly_main_enabled:
type: boolean
@@ -53,18 +45,15 @@ jobs:
matrix:
# We are specifying only the major and minor of the docker images to automatically pick up the latest patch release
swift:
- image: "swift:5.9-jammy"
swift_version: "5.9"
enabled: ${{ inputs.linux_5_9_enabled }}
- image: "swift:5.10-jammy"
swift_version: "5.10"
enabled: ${{ inputs.linux_5_10_enabled }}
- image: "swift:6.0-jammy"
swift_version: "6.0"
enabled: ${{ inputs.linux_6_0_enabled }}
- image: "swiftlang/swift:nightly-6.0-jammy"
swift_version: "nightly-6.0"
enabled: ${{ inputs.linux_nightly_6_0_enabled }}
- image: "swift:6.1-jammy"
swift_version: "6.1"
enabled: ${{ inputs.linux_6_1_enabled }}
- image: "swift:6.2-jammy"
swift_version: "6.2"
enabled: ${{ inputs.linux_6_2_enabled }}
- image: "swiftlang/swift:nightly-main-jammy"
swift_version: "nightly-main"
enabled: ${{ inputs.linux_nightly_main_enabled }}
@@ -84,10 +73,9 @@ jobs:
env:
SWIFT_VERSION: ${{ matrix.swift.swift_version }}
COMMAND: "swift test"
COMMAND_OVERRIDE_5_9: "swift test ${{ inputs.linux_5_9_arguments_override }}"
COMMAND_OVERRIDE_5_10: "swift test ${{ inputs.linux_5_10_arguments_override }}"
COMMAND_OVERRIDE_6_0: "swift test ${{ inputs.linux_6_0_arguments_override }}"
COMMAND_OVERRIDE_NIGHTLY_6_0: "swift test ${{ inputs.linux_nightly_6_0_arguments_override }}"
COMMAND_OVERRIDE_6_1: "swift test ${{ inputs.linux_6_1_arguments_override }}"
COMMAND_OVERRIDE_6_2: "swift test ${{ inputs.linux_6_2_arguments_override }}"
COMMAND_OVERRIDE_NIGHTLY_MAIN: "swift test ${{ inputs.linux_nightly_main_arguments_override }}"
REDIS_URL: redis
run: |
+4 -1
View File
@@ -1,4 +1,4 @@
// swift-tools-version:5.6
// swift-tools-version:6.0
//===----------------------------------------------------------------------===//
//
// This source file is part of the RediStack open source project
@@ -91,5 +91,8 @@ let package = Package(
.product(name: "NIO", package: "swift-nio"),
]
),
],
swiftLanguageModes: [
.v5
]
)
+1 -2
View File
@@ -3,7 +3,6 @@
[![SSWG Sandbox Incubating Badge](https://img.shields.io/badge/sswg-sandbox-lightgrey.svg)][SSWG Incubation]
[![Documentation](http://img.shields.io/badge/read_the-docs-2196f3.svg)][Documentation]
[![MIT License](http://img.shields.io/badge/license-Apache-brightgreen.svg)][Apache License]
[![Swift 5.6](http://img.shields.io/badge/swift-5.6-brightgreen.svg)][Swift 5.6]
**RediStack** (pronounced like "ready stack") is a _non-blocking_ Swift client for [Redis](https://redis.io) built on top of [SwiftNIO](https://github.com/apple/swift-nio).
@@ -23,7 +22,7 @@ To install **RediStack**, just add the package as a dependency in your **Package
```swift
dependencies: [
.package(url: "https://github.com/swift-server/RediStack.git", from: "1.4.1")
.package(url: "https://github.com/swift-server/RediStack.git", from: "1.6.2")
]
```
@@ -381,7 +381,8 @@ extension RedisConnectionPool: RedisClientWithUserContext {
}
private func subscribe(
using operation: @escaping (RedisConnection, @escaping RedisSubscriptionChangeHandler, Logger) ->
using operation:
@escaping (RedisConnection, @escaping RedisSubscriptionChangeHandler, Logger) ->
EventLoopFuture<Void>,
onUnsubscribe unsubscribeHandler: RedisSubscriptionChangeHandler?,
context: Logger?
@@ -439,7 +440,8 @@ extension RedisConnectionPool: RedisClientWithUserContext {
@usableFromInline
internal func forwardOperationToConnection<T>(
_ operation: @escaping (RedisConnection, @escaping (RedisConnection, Logger) -> Void, Logger) ->
_ operation:
@escaping (RedisConnection, @escaping (RedisConnection, Logger) -> Void, Logger) ->
EventLoopFuture<T>,
preferredConnection: RedisConnection?,
context: Logger?