mirror of
https://github.com/swift-server/RediStack.git
synced 2026-05-03 07:32:28 +00:00
Bump minimum supported Swift version to 5.5
## Motivation RediStack 1.x is going to be supported at least until 2.x is released, which is a few months away. Developers who are on later versions of Swift will adopt later versions of NIO and other libraries, and after we merged !183 we required NIO 2.42.x which has a minimum Swift version of 5.5 ## Changes This back ports the CI config from `master` into this branch, with updates to the README to reflect the changes
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
include: '/.gitlab/ci/test-template.yml'
|
||||
|
||||
swift trunk:
|
||||
extends: .unit-test
|
||||
image: swiftlang/swift:nightly-master-amazonlinux2
|
||||
allow_failure: true
|
||||
|
||||
swift 5.3:
|
||||
extends: .unit-test
|
||||
image: swift:5.3-amazonlinux2
|
||||
|
||||
swift 5.2:
|
||||
extends: .unit-test
|
||||
image: swift:5.2-amazonlinux2
|
||||
+15
-12
@@ -1,7 +1,7 @@
|
||||
include: '/.gitlab/ci/test-template.yml'
|
||||
include: '/.gitlab/ci/platform-test.yml'
|
||||
|
||||
.centos7-test-workaround:
|
||||
extends: .unit-test
|
||||
.centos7:
|
||||
extends: .platform-test
|
||||
before_script:
|
||||
- yum install -y make libcurl-devel
|
||||
- git clone https://github.com/git/git -bv2.28.0 --depth 1
|
||||
@@ -9,14 +9,17 @@ include: '/.gitlab/ci/test-template.yml'
|
||||
- make prefix=/usr -j all install NO_OPENSSL=1 NO_EXPAT=1 NO_TCLTK=1 NO_GETTEXT=1 NO_PERL=1
|
||||
|
||||
swift trunk:
|
||||
extends: .centos7-test-workaround
|
||||
image: swiftlang/swift:nightly-master-centos7
|
||||
allow_failure: true
|
||||
extends: .centos7
|
||||
image: swiftlang/swift:nightly-main-centos7
|
||||
|
||||
swift 5.3:
|
||||
extends: .centos7-test-workaround
|
||||
image: swift:5.3-centos7
|
||||
swift 5.7:
|
||||
extends: .centos7
|
||||
image: swiftlang/swift:nightly-5.7-centos7
|
||||
|
||||
swift 5.2:
|
||||
extends: .centos7-test-workaround
|
||||
image: swift:5.2-centos7
|
||||
swift 5.6:
|
||||
extends: .centos7
|
||||
image: swift:5.6-centos7
|
||||
|
||||
swift 5.5:
|
||||
extends: .centos7
|
||||
image: swift:5.5-centos7
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
include: '/.gitlab/ci/test-template.yml'
|
||||
|
||||
swift trunk:
|
||||
extends: .unit-test
|
||||
image: swiftlang/swift:nightly-master-centos8
|
||||
allow_failure: true
|
||||
|
||||
swift 5.3:
|
||||
extends: .unit-test
|
||||
image: swift:5.3-centos8
|
||||
|
||||
swift 5.2:
|
||||
extends: .unit-test
|
||||
image: swift:5.2-centos8
|
||||
@@ -0,0 +1,5 @@
|
||||
include: '/.gitlab/ci/platform-test.yml'
|
||||
|
||||
swift 5.5:
|
||||
extends: .platform-test
|
||||
image: swift:5.5-${SWIFT_PLATFORM_NAME}
|
||||
+38
-49
@@ -1,37 +1,8 @@
|
||||
include: '/.gitlab/ci/platform-test.yml'
|
||||
|
||||
stages:
|
||||
- Platform Tests
|
||||
- Quality Checks
|
||||
- Docs
|
||||
|
||||
pages:
|
||||
stage: Docs
|
||||
only:
|
||||
- tags
|
||||
image: norionomura/jazzy
|
||||
tags:
|
||||
- docker
|
||||
variables:
|
||||
MODULE_NAME: "RediStack"
|
||||
REPO_URL: "https://gitlab.com/mordil/swift-redi-stack"
|
||||
script: |
|
||||
export VERSION=$(git describe --abbrev=0 --tags || echo "0.0.0")
|
||||
swift build
|
||||
sourcekitten doc --spm-module "$MODULE_NAME" > "./$MODULE_NAME.json"
|
||||
jazzy --clean \
|
||||
--author "Nathan Harris (Mordil)" \
|
||||
--readme "./README.md" \
|
||||
--author_url "https://www.mordil.info" \
|
||||
--github_url "$REPO_URL" \
|
||||
--github-file-prefix "$REPO_URL/blob/$VERSION" \
|
||||
--root-url "https://mordil.gitlab.io/swift-redi-stack/" \
|
||||
--module "$MODULE_NAME" \
|
||||
--module-version "$VERSION" \
|
||||
--theme docs/theme \
|
||||
--sourcekitten-sourcefile "./$MODULE_NAME.json" \
|
||||
--output "./public"
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
|
||||
Code Climate:
|
||||
only:
|
||||
@@ -58,38 +29,56 @@ Code Climate:
|
||||
reports:
|
||||
codequality: gl-code-quality-report.json
|
||||
|
||||
Ubuntu Bionic:
|
||||
Code Coverage:
|
||||
extends: .platform-test
|
||||
stage: Quality Checks
|
||||
allow_failure: false
|
||||
image: swift:latest
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
changes:
|
||||
- '*.swift'
|
||||
script: scripts/generate_code_coverage.sh
|
||||
coverage: '/TOTAL.*(\s\d+\.\d+%)/'
|
||||
|
||||
.standard-platform-test:
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "push"
|
||||
stage: Platform Tests
|
||||
trigger:
|
||||
strategy: depend
|
||||
include: '/.gitlab/ci/ubuntu-bionic.yml'
|
||||
include: '/.gitlab/ci/standard-platforms.yml'
|
||||
|
||||
Ubuntu Xenial:
|
||||
stage: Platform Tests
|
||||
extends: .standard-platform-test
|
||||
variables:
|
||||
SWIFT_PLATFORM_NAME: xenial
|
||||
trigger:
|
||||
strategy: depend
|
||||
include: '/.gitlab/ci/ubuntu-xenial.yml'
|
||||
include: '/.gitlab/ci/eol-platforms-5.5.yml'
|
||||
|
||||
Ubuntu Bionic:
|
||||
extends: .standard-platform-test
|
||||
variables:
|
||||
SWIFT_PLATFORM_NAME: bionic
|
||||
|
||||
Ubuntu Focal:
|
||||
stage: Platform Tests
|
||||
trigger:
|
||||
strategy: depend
|
||||
include: '/.gitlab/ci/ubuntu-focal.yml'
|
||||
extends: .standard-platform-test
|
||||
variables:
|
||||
SWIFT_PLATFORM_NAME: focal
|
||||
|
||||
CentOS 7:
|
||||
stage: Platform Tests
|
||||
extends: .standard-platform-test
|
||||
trigger:
|
||||
strategy: depend
|
||||
include: '/.gitlab/ci/centos-7.yml'
|
||||
|
||||
CentOS 8:
|
||||
stage: Platform Tests
|
||||
extends: .standard-platform-test
|
||||
variables:
|
||||
SWIFT_PLATFORM_NAME: centos8
|
||||
trigger:
|
||||
strategy: depend
|
||||
include: '/.gitlab/ci/centos-8.yml'
|
||||
include: '/.gitlab/ci/eol-platforms-5.5.yml'
|
||||
|
||||
Amazon Linux 2:
|
||||
stage: Platform Tests
|
||||
trigger:
|
||||
strategy: depend
|
||||
include: '/.gitlab/ci/amazonlinux-2.yml'
|
||||
extends: .standard-platform-test
|
||||
variables:
|
||||
SWIFT_PLATFORM_NAME: amazonlinux2
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
stages:
|
||||
- Test
|
||||
|
||||
.unit-test:
|
||||
.platform-test:
|
||||
stage: Test
|
||||
allow_failure: true
|
||||
tags:
|
||||
- docker
|
||||
variables:
|
||||
@@ -0,0 +1,17 @@
|
||||
include: '/.gitlab/ci/platform-test.yml'
|
||||
|
||||
swift trunk:
|
||||
extends: .platform-test
|
||||
image: swiftlang/swift:nightly-main-${SWIFT_PLATFORM_NAME}
|
||||
|
||||
swift 5.7:
|
||||
extends: .platform-test
|
||||
image: swiftlang/swift:nightly-5.7-${SWIFT_PLATFORM_NAME}
|
||||
|
||||
swift 5.6:
|
||||
extends: .platform-test
|
||||
image: swift:5.6-${SWIFT_PLATFORM_NAME}
|
||||
|
||||
swift 5.5:
|
||||
extends: .platform-test
|
||||
image: swift:5.5-${SWIFT_PLATFORM_NAME}
|
||||
@@ -1,18 +0,0 @@
|
||||
include: '/.gitlab/ci/test-template.yml'
|
||||
|
||||
swift trunk:
|
||||
extends: .unit-test
|
||||
image: swiftlang/swift:nightly-master-bionic
|
||||
allow_failure: true
|
||||
|
||||
swift 5.3:
|
||||
extends: .unit-test
|
||||
image: swift:5.3-bionic
|
||||
|
||||
swift 5.2:
|
||||
extends: .unit-test
|
||||
image: swift:5.2-bionic
|
||||
|
||||
swift 5.1:
|
||||
extends: .unit-test
|
||||
image: swift:5.1-bionic
|
||||
@@ -1,14 +0,0 @@
|
||||
include: '/.gitlab/ci/test-template.yml'
|
||||
|
||||
swift trunk:
|
||||
extends: .unit-test
|
||||
image: swiftlang/swift:nightly-master-focal
|
||||
allow_failure: true
|
||||
|
||||
swift 5.3:
|
||||
extends: .unit-test
|
||||
image: swift:5.3-focal
|
||||
|
||||
swift 5.2:
|
||||
extends: .unit-test
|
||||
image: swift:5.2-focal
|
||||
@@ -1,18 +0,0 @@
|
||||
include: '/.gitlab/ci/test-template.yml'
|
||||
|
||||
swift trunk:
|
||||
extends: .unit-test
|
||||
image: swiftlang/swift:nightly-master-xenial
|
||||
allow_failure: true
|
||||
|
||||
swift 5.3:
|
||||
extends: .unit-test
|
||||
image: swift:5.3-xenial
|
||||
|
||||
swift 5.2:
|
||||
extends: .unit-test
|
||||
image: swift:5.2-xenial
|
||||
|
||||
swift 5.1:
|
||||
extends: .unit-test
|
||||
image: swift:5.1-xenial
|
||||
+38
-6
@@ -1,4 +1,4 @@
|
||||
// swift-tools-version:5.1
|
||||
// swift-tools-version:5.5
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This source file is part of the RediStack open source project
|
||||
@@ -28,11 +28,43 @@ let package = Package(
|
||||
.package(url: "https://github.com/apple/swift-nio.git", from: "2.43.0"),
|
||||
],
|
||||
targets: [
|
||||
.target(name: "RediStack", dependencies: ["NIO", "Logging", "Metrics"]),
|
||||
.target(
|
||||
name: "RediStack",
|
||||
dependencies: [
|
||||
.product(name: "NIO", package: "swift-nio"),
|
||||
.product(name: "Logging", package: "swift-log"),
|
||||
.product(name: "Metrics", package: "swift-metrics")
|
||||
]
|
||||
),
|
||||
.target(name: "RedisTypes", dependencies: ["RediStack"]),
|
||||
.target(name: "RediStackTestUtils", dependencies: ["NIO", "RediStack"]),
|
||||
.testTarget(name: "RediStackTests", dependencies: ["RediStack", "NIO", "RediStackTestUtils", "NIOTestUtils"]),
|
||||
.testTarget(name: "RedisTypesTests", dependencies: ["RediStack", "NIO", "RediStackTestUtils", "RedisTypes"]),
|
||||
.testTarget(name: "RediStackIntegrationTests", dependencies: ["RediStack", "NIO", "RediStackTestUtils"])
|
||||
.target(
|
||||
name: "RediStackTestUtils",
|
||||
dependencies: [
|
||||
.product(name: "NIO", package: "swift-nio"),
|
||||
"RediStack"
|
||||
]
|
||||
),
|
||||
.testTarget(
|
||||
name: "RediStackTests",
|
||||
dependencies: [
|
||||
"RediStack", "RediStackTestUtils",
|
||||
.product(name: "NIO", package: "swift-nio"),
|
||||
.product(name: "NIOTestUtils", package: "swift-nio")
|
||||
]
|
||||
),
|
||||
.testTarget(
|
||||
name: "RedisTypesTests",
|
||||
dependencies: [
|
||||
"RediStack", "RedisTypes", "RediStackTestUtils",
|
||||
.product(name: "NIO", package: "swift-nio")
|
||||
]
|
||||
),
|
||||
.testTarget(
|
||||
name: "RediStackIntegrationTests",
|
||||
dependencies: [
|
||||
"RediStack", "RediStackTestUtils",
|
||||
.product(name: "NIO", package: "swift-nio")
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<p>
|
||||
<a href="https://github.com/swift-server/sswg/blob/master/process/incubation.md#sandbox-level"><img src="https://img.shields.io/badge/sswg-sandbox-lightgrey.svg" alt="SSWG Maturity"></a>
|
||||
<a href="https://gitlab.com/Mordil/RediStack/blob/master/LICENSE.txt"><img src="https://img.shields.io/badge/License-Apache%202.0-yellow.svg" alt="Apache 2 License"></a>
|
||||
<a href="https://swift.org"><img src="https://img.shields.io/badge/Swift-5.1+-orange.svg" alt="Swift 5.1+"></a>
|
||||
<a href="https://swift.org"><img src="https://img.shields.io/badge/Swift-5.5+-orange.svg" alt="Swift 5.5+"></a>
|
||||
<a href="https://redis.io"><img src="https://img.shields.io/badge/Redis-5.0-red.svg" alt="Redis 5.0"></a>
|
||||
</p>
|
||||
|
||||
@@ -32,6 +32,7 @@ The table below lists the major releases alongside their compatible language, de
|
||||
| RediStack Release | [Swift](https://swift.org/download) | [Redis](https://redis.io) | [SwiftNIO](https://github.com/apple/swift-nio) | [SwiftLog](https://github.com/apple/swift-log) | [SwiftMetrics](https://github.com/apple/swift-metrics) |
|
||||
|:-----------------:|:-----------------------------------:|:-------------------------:|:----------------------------------------------:|:----------------------------------------------:|:------------------------------:|
|
||||
| `from: "1.0.0"` | 5.1+ | 3.x**¹** < 6.x | 2.x | 1.x | 1.x ..< 3.0 |
|
||||
| `from: "1.4.0"` | 5.5+ | 3.x**¹** < 6.x | 2.x | 1.x | 1.x ..< 3.0 |
|
||||
|
||||
> **¹** _Use of newer Redis features on older Redis versions is done at your own risk. See Redis' release notes for [v5](https://raw.githubusercontent.com/antirez/redis/5.0/00-RELEASENOTES), [v4](https://raw.githubusercontent.com/antirez/redis/4.0/00-RELEASENOTES), and [v3](https://raw.githubusercontent.com/antirez/redis/3.0/00-RELEASENOTES) for what is supported for each version of Redis._
|
||||
|
||||
@@ -117,15 +118,18 @@ This policy is to balance the desire for as much backwards compatibility as poss
|
||||
The following table shows the combination of Swift language versions and operating systems that
|
||||
receive regular unit testing (either in development, or with CI).
|
||||
|
||||
| Platform | Swift 5.1 | 5.2 | 5.3 | Trunk |
|
||||
|:----------------------|:------------------:|:------------------:|:------------------:|:------------------:|
|
||||
| macOS Latest (Intel) | | | :white_check_mark: | |
|
||||
| Ubuntu 20.04 (Focal) | | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||
| Ubuntu 18.04 (Bionic) | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||
| Ubuntu 16.04 (Xenial) | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||
| Amazon Linux 2 | | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||
| CentOS 7 | | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||
| CentOS 8 | | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||
| Platform | Swift 5.5 | 5.6 | 5.7 | Trunk |
|
||||
|:----------------------------|:---------:|:---:|:---:|:-----:|
|
||||
| macOS Latest (M1) | | | ✅ | |
|
||||
| Ubuntu 20.04 (Focal) | ✅ | ✅ | ✅ | ✅ |
|
||||
| Ubuntu 18.04 (Bionic) | ✅ | ✅ | ✅ | ✅ |
|
||||
| Ubuntu 16.04 (Xenial)**³** | ✅ | ❌ | ❌ | ❌ |
|
||||
| Amazon Linux 2 | ✅ | ✅ | ✅ | ✅ |
|
||||
| CentOS 8**³** | ✅ | ❌ | ❌ | ❌ |
|
||||
| CentOS 7 | ✅ | ✅ | ✅ | ✅ |
|
||||
|
||||
> **³** _CentOS 8 and Ubuntu 16.04 are no longer officially supported by Swift after [Swift 5.5](https://github.com/apple/swift-docker/pull/273)._
|
||||
|
||||
|
||||
## License
|
||||
|
||||
|
||||
Reference in New Issue
Block a user