update ci setup (#67)

motivation: 5.2 adoption, prepare for 5.3

changes:
* add 5.2 docker-compose setup
* add 5.3 docker-compose setup (placeholder)
* remove 4.2 docker-compose setup
* format
This commit is contained in:
tomer doron 2020-04-03 19:50:13 -07:00 committed by GitHub
parent a8db098592
commit 41d2db7675
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 41 additions and 22 deletions

View File

@ -1,5 +1,6 @@
# file options
--swiftversion 5.0
--exclude .build
# format options
@ -7,7 +8,6 @@
--self insert
--patternlet inline
--stripunusedargs unnamed-only
--comments ignore
--ifdef no-indent
# rules

View File

@ -38,7 +38,7 @@ import Glibc
/// of lock is safe to use with `libpthread`-based threading models, such as the
/// one used by NIO.
internal final class Lock {
fileprivate let mutex: UnsafeMutablePointer<pthread_mutex_t> = UnsafeMutablePointer.allocate(capacity: 1)
private let mutex: UnsafeMutablePointer<pthread_mutex_t> = UnsafeMutablePointer.allocate(capacity: 1)
/// Create a new lock.
public init() {
@ -102,7 +102,7 @@ extension Lock {
/// of lock is safe to use with `libpthread`-based threading models, such as the
/// one used by NIO.
internal final class ReadWriteLock {
fileprivate let rwlock: UnsafeMutablePointer<pthread_rwlock_t> = UnsafeMutablePointer.allocate(capacity: 1)
private let rwlock: UnsafeMutablePointer<pthread_rwlock_t> = UnsafeMutablePointer.allocate(capacity: 1)
/// Create a new lock.
public init() {

View File

@ -1,8 +1,7 @@
ARG swift_version=5.0
ARG ubuntu_version=bionic
# backwards compatibility for 4.2 images
ARG image_version=$swift_version-$ubuntu_version
FROM swift:$image_version
ARG base_image=swift:$swift_version-$ubuntu_version
FROM $base_image
# needed to do again after FROM due to docker limitation
ARG swift_version
ARG ubuntu_version
@ -31,7 +30,7 @@ RUN chmod 755 $HOME/.tools/symbolicate-linux-fatal
# swiftformat (until part of the toolchain)
ARG swiftformat_version=0.40.12
ARG swiftformat_version=0.44.6
RUN git clone --branch $swiftformat_version --depth 1 https://github.com/nicklockwood/SwiftFormat $HOME/.tools/swift-format
RUN cd $HOME/.tools/swift-format && swift build -c release
RUN ln -s $HOME/.tools/swift-format/.build/release/swiftformat $HOME/.tools/swiftformat

View File

@ -1,15 +0,0 @@
version: "3"
services:
runtime-setup:
image: swift-metrics:18.04-4.2
build:
args:
image_version: "4.2"
test:
image: swift-metrics:18.04-4.2
shell:
image: swift-metrics:18.04-4.2

View File

@ -0,0 +1,18 @@
version: "3"
services:
runtime-setup:
image: swift-metrics:18.04-5.2
build:
args:
ubuntu_version: "bionic"
swift_version: "5.2"
test:
image: swift-metrics:18.04-5.2
environment: []
#- SANITIZER_ARG=--sanitize=thread
shell:
image: swift-metrics:18.04-5.2

View File

@ -0,0 +1,17 @@
version: "3"
services:
runtime-setup:
image: swift-metrics:18.04-5.3
build:
args:
base_image: "swiftlang/swift:nightly-master-bionic"
test:
image: swift-metrics:18.04-5.3
environment: []
#- SANITIZER_ARG=--sanitize=thread
shell:
image: swift-metrics:18.04-5.3