Remove Swift 5.0 and 5.1 support, and add CI config (#122)

* Setup CI and update Package

* Rename sanity to soundness

* Apply suggestions from code review

Co-authored-by: Cory Benfield <lukasa@apple.com>

* Fix nightly docker config

Co-authored-by: Cory Benfield <lukasa@apple.com>
This commit is contained in:
David Evans 2021-06-23 08:57:00 +01:00 committed by GitHub
parent 188a295ee3
commit 0aecfe8b3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 86 additions and 77 deletions

View File

@ -1,4 +1,4 @@
// swift-tools-version:5.0 // swift-tools-version:5.2
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// //
// This source file is part of the SwiftNIO open source project // This source file is part of the SwiftNIO open source project
@ -24,13 +24,34 @@ let package = Package(
.package(url: "https://github.com/apple/swift-nio.git", from: "2.27.0"), .package(url: "https://github.com/apple/swift-nio.git", from: "2.27.0"),
], ],
targets: [ targets: [
.target(name: "NIOTransportServices", .target(
dependencies: ["NIO", "NIOFoundationCompat", "NIOConcurrencyHelpers", "NIOTLS"]), name: "NIOTransportServices",
.target(name: "NIOTSHTTPClient", dependencies: [
dependencies: ["NIO", "NIOTransportServices", "NIOHTTP1"]), .product(name: "NIO", package: "swift-nio"),
.target(name: "NIOTSHTTPServer", .product(name: "NIOFoundationCompat", package: "swift-nio"),
dependencies: ["NIO", "NIOTransportServices", "NIOHTTP1"]), .product(name: "NIOConcurrencyHelpers", package: "swift-nio"),
.testTarget(name: "NIOTransportServicesTests", .product(name: "NIOTLS", package: "swift-nio"),
dependencies: ["NIO", "NIOTransportServices", "NIOConcurrencyHelpers"]), ]),
.target(
name: "NIOTSHTTPClient",
dependencies: [
"NIOTransportServices",
.product(name: "NIO", package: "swift-nio"),
.product(name: "NIOHTTP1", package: "swift-nio"),
]),
.target(
name: "NIOTSHTTPServer",
dependencies: [
"NIOTransportServices",
.product(name: "NIO", package: "swift-nio"),
.product(name: "NIOHTTP1", package: "swift-nio"),
]),
.testTarget(
name: "NIOTransportServicesTests",
dependencies: [
"NIOTransportServices",
.product(name: "NIO", package: "swift-nio"),
.product(name: "NIOConcurrencyHelpers", package: "swift-nio"),
]),
] ]
) )

View File

@ -1,5 +1,5 @@
ARG swift_version=5.0 ARG swift_version=5.4
ARG ubuntu_version=bionic ARG ubuntu_version=focal
ARG base_image=swift:$swift_version-$ubuntu_version ARG base_image=swift:$swift_version-$ubuntu_version
FROM $base_image FROM $base_image
# needed to do again after FROM due to docker limitation # needed to do again after FROM due to docker limitation

View File

@ -0,0 +1,16 @@
version: "3"
services:
runtime-setup:
image: swift-nio-transport-services:16.04-5.2
build:
args:
ubuntu_version: "xenial"
swift_version: "5.2"
test:
image: swift-nio-transport-services:16.04-5.2
shell:
image: swift-nio-transport-services:16.04-5.2

View File

@ -1,16 +0,0 @@
version: "3"
services:
runtime-setup:
image: swift-nio-transport-services:18.04-5.0
build:
args:
ubuntu_version: "bionic"
swift_version: "5.0"
test:
image: swift-nio-transport-services:18.04-5.0
shell:
image: swift-nio-transport-services:18.04-5.0

View File

@ -0,0 +1,16 @@
version: "3"
services:
runtime-setup:
image: swift-nio-transport-services:18.04-5.3
build:
args:
ubuntu_version: "bionic"
swift_version: "5.3"
test:
image: swift-nio-transport-services:18.04-5.3
shell:
image: swift-nio-transport-services:18.04-5.3

View File

@ -0,0 +1,16 @@
version: "3"
services:
runtime-setup:
image: swift-nio-transport-services:20.04-5.4
build:
args:
ubuntu_version: "focal"
swift_version: "5.4"
test:
image: swift-nio-transport-services:20.04-5.4
shell:
image: swift-nio-transport-services:20.04-5.4

View File

@ -3,58 +3,14 @@ version: "3"
services: services:
runtime-setup: runtime-setup:
image: swift-nio:20.04-main image: swift-nio-transport-services:20.04-main
build: build:
args: args:
base_image: "swiftlang/swift:nightly-main-focal"
ubuntu_version: "focal" ubuntu_version: "focal"
base_image: "swiftlang/swift:nightly-main-focal"
unit-tests:
image: swift-nio:20.04-main
integration-tests:
image: swift-nio:20.04-main
test: test:
image: swift-nio:20.04-main image: swift-nio-transport-services:20.04-main
environment:
- MAX_ALLOCS_ALLOWED_1000_addHandlers=47050
- MAX_ALLOCS_ALLOWED_1000_addHandlers_sync=40050
- MAX_ALLOCS_ALLOWED_1000_getHandlers=12050
- MAX_ALLOCS_ALLOWED_1000_getHandlers_sync=50
- MAX_ALLOCS_ALLOWED_1000_reqs_1_conn=30540
- MAX_ALLOCS_ALLOWED_1000_tcpbootstraps=4100
- MAX_ALLOCS_ALLOWED_1000_tcpconnections=179010
- MAX_ALLOCS_ALLOWED_1000_udp_reqs=16050
- MAX_ALLOCS_ALLOWED_1000_udpbootstraps=2000
- MAX_ALLOCS_ALLOWED_1000_udpconnections=101050
- MAX_ALLOCS_ALLOWED_1_reqs_1000_conn=471050
- MAX_ALLOCS_ALLOWED_bytebuffer_lots_of_rw=2100
- MAX_ALLOCS_ALLOWED_creating_10000_headers=100
- MAX_ALLOCS_ALLOWED_decode_1000_ws_frames=2000
- MAX_ALLOCS_ALLOWED_encode_1000_ws_frames_holding_buffer=1000
- MAX_ALLOCS_ALLOWED_encode_1000_ws_frames_holding_buffer_with_space=1000
- MAX_ALLOCS_ALLOWED_encode_1000_ws_frames_new_buffer=5010
- MAX_ALLOCS_ALLOWED_encode_1000_ws_frames_new_buffer_with_space=5010
- MAX_ALLOCS_ALLOWED_future_lots_of_callbacks=75010
- MAX_ALLOCS_ALLOWED_modifying_1000_circular_buffer_elements=50
- MAX_ALLOCS_ALLOWED_modifying_byte_buffer_view=2010
- MAX_ALLOCS_ALLOWED_ping_pong_1000_reqs_1_conn=4440
- MAX_ALLOCS_ALLOWED_read_10000_chunks_from_file=190500
- MAX_ALLOCS_ALLOWED_schedule_10000_tasks=90050
- MAX_ALLOCS_ALLOWED_scheduling_10000_executions=20150
- MAX_ALLOCS_ALLOWED_udp_1000_reqs_1_conn=16250
- MAX_ALLOCS_ALLOWED_udp_1_reqs_1000_conn=202050
- SANITIZER_ARG=--sanitize=thread
performance-test:
image: swift-nio:20.04-main
shell: shell:
image: swift-nio:20.04-main image: swift-nio-transport-services:20.04-main
echo:
image: swift-nio:20.04-main
http:
image: swift-nio:20.04-main

View File

@ -22,9 +22,9 @@ services:
- CAP_NET_RAW - CAP_NET_RAW
- CAP_NET_BIND_SERVICE - CAP_NET_BIND_SERVICE
sanity: soundness:
<<: *common <<: *common
command: /bin/bash -xcl "./scripts/sanity.sh" command: /bin/bash -xcl "./scripts/soundness.sh"
test: test:
<<: *common <<: *common