Browse Source

update ci setup (#127)

motivation: 5.2 adoption, prepare for 5.3

changes:
* add 5.2 docker-compose setup
* add 5.3 docker-compose setup (placeholder)
* fix formatting
tomer doron 5 years ago
parent
commit
fa15ddefc4

+ 1 - 1
.swiftformat

@@ -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

+ 1 - 4
Sources/Logging/Logging.swift

@@ -440,10 +440,7 @@ extension Logger {
     ///
     ///     logger.info("Hello \(world)")
     ///
-    public struct Message: ExpressibleByStringLiteral,
-        Equatable,
-        CustomStringConvertible,
-        ExpressibleByStringInterpolation {
+    public struct Message: ExpressibleByStringLiteral, Equatable, CustomStringConvertible, ExpressibleByStringInterpolation {
         public typealias StringLiteralType = String
 
         private var value: String

+ 3 - 2
docker/Dockerfile

@@ -1,6 +1,7 @@
 ARG swift_version=5.0
 ARG ubuntu_version=bionic
-FROM swift:$swift_version-$ubuntu_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
@@ -29,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

+ 18 - 0
docker/docker-compose.1804.52.yaml

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

+ 17 - 0
docker/docker-compose.1804.53.yaml

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