Skip to content

Commit

Permalink
swift 5 docker support (#952)
Browse files Browse the repository at this point in the history
* swift 5 docker support

Motivation: easily build and test swift-nio v1 using swift 5 docker

Modifications: adjust dockerfile and add docker-compose file for ubuntu 18.04, swift 5
  • Loading branch information
tomerd authored and weissi committed Apr 8, 2019
1 parent b111dfc commit f5ca03d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ RUN gem install jazzy --no-ri --no-rdoc
# swift
ARG swift_version=4.0.3
ARG swift_flavour=RELEASE
ARG swift_builds_suffix=release

RUN mkdir $HOME/.swift
RUN wget -q https://swift.org/builds/swift-${swift_version}-$(echo $swift_flavour | tr A-Z a-z)/ubuntu$(echo $ubuntu_version | sed 's/\.//g')/swift-${swift_version}-${swift_flavour}/swift-${swift_version}-${swift_flavour}-ubuntu${ubuntu_version}.tar.gz -O $HOME/swift.tar.gz
RUN wget -q "https://swift.org/builds/swift-${swift_version}-${swift_builds_suffix}/ubuntu$(echo $ubuntu_version | sed 's/\.//g')/swift-${swift_version}-${swift_flavour}/swift-${swift_version}-${swift_flavour}-ubuntu${ubuntu_version}.tar.gz" -O $HOME/swift.tar.gz
RUN tar xzf $HOME/swift.tar.gz --directory $HOME/.swift --strip-components=1
RUN echo 'export PATH="$HOME/.swift/usr/bin:$PATH"' >> $HOME/.profile
RUN echo 'export LINUX_SOURCEKIT_LIB_PATH="$HOME/.swift/usr/lib"' >> $HOME/.profile
Expand Down
26 changes: 26 additions & 0 deletions docker/docker-compose.1804.50.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: "3"

services:

runtime-setup:
image: swift-nio:18.04-5.0
build:
args:
ubuntu_version: "18.04"
swift_version: "5.0"
skip_ruby_from_ppa: "true"

unit-tests:
image: swift-nio:18.04-5.0

integration-tests:
image: swift-nio:18.04-5.0

test:
image: swift-nio:18.04-5.0

echo:
image: swift-nio:18.04-5.0

http:
image: swift-nio:18.04-5.0

0 comments on commit f5ca03d

Please sign in to comment.