Skip to content

Commit 8418932

Browse files
tomerdweissi
authored andcommitted
swift 5.1 docker setup (#158)
* swift 5.1 docker setup motivation: support swift 5.1 changes: * add docker compose file for swift 5.1, will add CI job once merged * update swiftformat version to 0.40.12 * use more standard dockerfile setup * 16.04
1 parent 32d063e commit 8418932

File tree

2 files changed

+48
-4
lines changed

2 files changed

+48
-4
lines changed

docker/Dockerfile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,18 @@ RUN gem install jazzy --no-ri --no-rdoc
2323
RUN mkdir -p $HOME/.tools
2424
RUN echo 'export PATH="$HOME/.tools:$PATH"' >> $HOME/.profile
2525

26+
# script to allow mapping framepointers on linux (until part of the toolchain)
27+
RUN wget -q https://raw.githubusercontent.com/apple/swift/master/utils/symbolicate-linux-fatal -O $HOME/.tools/symbolicate-linux-fatal
28+
RUN chmod 755 $HOME/.tools/symbolicate-linux-fatal
29+
30+
# swiftformat (until part of the toolchain)
31+
32+
ARG swiftformat_version=0.40.12
33+
RUN git clone --branch $swiftformat_version --depth 1 https://github.com/nicklockwood/SwiftFormat $HOME/.tools/swift-format
34+
RUN cd $HOME/.tools/swift-format && swift build -c release
35+
RUN ln -s $HOME/.tools/swift-format/.build/release/swiftformat $HOME/.tools/swiftformat
36+
2637
# h2spec
2738
ARG h2spec_version
2839
RUN [ -z $h2spec_version ] || wget -q https://github.com/summerwind/h2spec/releases/download/v$h2spec_version/h2spec_linux_amd64.tar.gz -O $HOME/.tools/h2spec.tar.gz
2940
RUN [ -z $h2spec_version ] || tar xzf $HOME/.tools/h2spec.tar.gz --directory $HOME/.tools
30-
31-
# script to allow mapping framepointers on linux
32-
RUN wget -q https://raw.githubusercontent.com/apple/swift/master/utils/symbolicate-linux-fatal -O $HOME/.tools/symbolicate-linux-fatal
33-
RUN chmod 755 $HOME/.tools/symbolicate-linux-fatal

docker/docker-compose.1604.51.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
version: "3"
2+
3+
services:
4+
5+
runtime-setup:
6+
image: swift-nio-http2:16.04-5.1
7+
build:
8+
args:
9+
ubuntu_version: "xenial"
10+
swift_version: "5.1"
11+
h2spec_version: "2.2.1"
12+
13+
unit-tests:
14+
image: swift-nio-http2:16.04-5.1
15+
16+
integration-tests:
17+
image: swift-nio-http2:16.04-5.1
18+
environment:
19+
- MAX_ALLOCS_ALLOWED_create_client_stream_channel=72010
20+
- MAX_ALLOCS_ALLOWED_hpack_decoding=5050
21+
- MAX_ALLOCS_ALLOWED_client_server_request_response=378000
22+
23+
performance-test:
24+
image: swift-nio-http2:16.04-5.1
25+
26+
h2spec:
27+
image: swift-nio-http2:16.04-5.1
28+
29+
test:
30+
image: swift-nio-http2:16.04-5.1
31+
environment:
32+
- MAX_ALLOCS_ALLOWED_create_client_stream_channel=72010
33+
- MAX_ALLOCS_ALLOWED_hpack_decoding=5050
34+
- MAX_ALLOCS_ALLOWED_client_server_request_response=378000
35+
36+
shell:
37+
image: swift-nio-http2:16.04-5.1

0 commit comments

Comments
 (0)