File tree Expand file tree Collapse file tree 4 files changed +104
-0
lines changed Expand file tree Collapse file tree 4 files changed +104
-0
lines changed Original file line number Diff line number Diff line change
1
+ ARG swift_version=5.0
2
+ ARG ubuntu_version=bionic
3
+ FROM swift:$swift_version-$ubuntu_version
4
+ # needed to do again after FROM due to docker limitation
5
+ ARG swift_version
6
+ ARG ubuntu_version
7
+
8
+ # set as UTF-8
9
+ RUN apt-get update && apt-get install -y locales locales-all
10
+ ENV LC_ALL en_US.UTF-8
11
+ ENV LANG en_US.UTF-8
12
+ ENV LANGUAGE en_US.UTF-8
13
+
14
+ # dependencies
15
+ RUN apt-get update && apt-get install -y wget
16
+ RUN apt-get update && apt-get install -y lsof dnsutils netcat-openbsd net-tools curl jq # used by integration tests
17
+
18
+ # ruby and jazzy for docs generation
19
+ RUN apt-get update && apt-get install -y ruby ruby-dev libsqlite3-dev
20
+ RUN gem install jazzy --no-ri --no-rdoc
21
+
22
+ # tools
23
+ RUN mkdir -p $HOME/.tools
24
+ RUN echo 'export PATH="$HOME/.tools:$PATH"' >> $HOME/.profile
25
+
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
Original file line number Diff line number Diff line change
1
+ version : " 3"
2
+
3
+ services :
4
+
5
+ runtime-setup :
6
+ image : swift-aws-lambda:16.04-5.1
7
+ build :
8
+ args :
9
+ ubuntu_version : " xenial"
10
+ swift_version : " 5.1"
11
+
12
+ test :
13
+ image : swift-aws-lambda:16.04-5.1
14
+
15
+ shell :
16
+ image : swift-aws-lambda:16.04-5.1
Original file line number Diff line number Diff line change
1
+ version : " 3"
2
+
3
+ services :
4
+
5
+ runtime-setup :
6
+ image : swift-aws-lambda:18.04-5.0
7
+ build :
8
+ args :
9
+ ubuntu_version : " bionic"
10
+ swift_version : " 5.0"
11
+
12
+ test :
13
+ image : swift-aws-lambda:18.04-5.0
14
+
15
+ shell :
16
+ image : swift-aws-lambda:18.04-5.0
Original file line number Diff line number Diff line change
1
+ # this file is not designed to be run directly
2
+ # instead, use the docker-compose.<os>.<swift> files
3
+ # eg docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.1804.50.yaml run test
4
+ version : " 3"
5
+
6
+ services :
7
+
8
+ runtime-setup :
9
+ image : swift-aws-lambda:default
10
+ build :
11
+ context : .
12
+ dockerfile : Dockerfile
13
+
14
+ common : &common
15
+ image : swift-aws-lambda:default
16
+ depends_on : [runtime-setup]
17
+ volumes :
18
+ - ~/.ssh:/root/.ssh
19
+ - ..:/code:z
20
+ working_dir : /code
21
+ cap_drop :
22
+ - CAP_NET_RAW
23
+ - CAP_NET_BIND_SERVICE
24
+
25
+ sanity :
26
+ << : *common
27
+ command : /bin/bash -cl "./scripts/sanity.sh"
28
+
29
+ test :
30
+ << : *common
31
+ command : /bin/bash -cl "swift test -Xswiftc -warnings-as-errors"
32
+
33
+ # util
34
+
35
+ shell :
36
+ << : *common
37
+ entrypoint : /bin/bash
You can’t perform that action at this time.
0 commit comments