File tree Expand file tree Collapse file tree 7 files changed +191
-0
lines changed Expand file tree Collapse file tree 7 files changed +191
-0
lines changed Original file line number Diff line number Diff line change 1+ ARG swift_version=5.7
2+ ARG ubuntu_version=jammy
3+ ARG base_image=swift:$swift_version-$ubuntu_version
4+ FROM $base_image
5+ # needed to do again after FROM due to docker limitation
6+ ARG swift_version
7+ ARG ubuntu_version
8+
9+ # set as UTF-8
10+ RUN apt-get update && apt-get install -y locales locales-all
11+ ENV LC_ALL en_US.UTF-8
12+ ENV LANG en_US.UTF-8
13+ ENV LANGUAGE en_US.UTF-8
14+
15+ # dependencies
16+ RUN apt-get update && apt-get install -y wget
17+ RUN apt-get update && apt-get install -y lsof dnsutils netcat-openbsd net-tools libz-dev curl jq # used by integration tests
18+
19+ # ruby and jazzy for docs generation
20+ RUN apt-get update && apt-get install -y ruby ruby-dev libsqlite3-dev build-essential
21+ # jazzy no longer works on xenial as ruby is too old.
22+ RUN if [ "${ubuntu_version}" = "focal" ] ; then echo "gem: --no-document" > ~/.gemrc; fi
23+ RUN if [ "${ubuntu_version}" = "focal" ] ; then gem install jazzy; fi
24+
25+ # tools
26+ RUN mkdir -p $HOME/.tools
27+ RUN echo 'export PATH="$HOME/.tools:$PATH"' >> $HOME/.profile
28+
29+ # swiftformat (until part of the toolchain)
30+
31+ ARG swiftformat_version=0.48.8
32+ RUN git clone --branch $swiftformat_version --depth 1 https://github.com/nicklockwood/SwiftFormat $HOME/.tools/swift-format
33+ RUN cd $HOME/.tools/swift-format && swift build -c release
34+ 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 : redistack:20.04-5.6
7+ build :
8+ args :
9+ ubuntu_version : " focal"
10+ swift_version : " 5.6"
11+
12+ documentation-check :
13+ image : redistack:20.04-5.6
14+
15+ test :
16+ image : redistack:20.04-5.6
17+ environment : []
18+ # - SANITIZER_ARG=--sanitize=thread
19+
20+ shell :
21+ image : redistack:20.04-5.6
Original file line number Diff line number Diff line change 1+ version : " 3"
2+
3+ services :
4+
5+ runtime-setup :
6+ image : redistack:22.04-5.7
7+ build :
8+ args :
9+ ubuntu_version : " jammy"
10+ swift_version : " 5.7"
11+
12+ documentation-check :
13+ image : redistack:22.04-5.7
14+
15+ test :
16+ image : redistack:22.04-5.7
17+ environment : []
18+ # - SANITIZER_ARG=--sanitize=thread
19+
20+ shell :
21+ image : redistack:22.04-5.7
Original file line number Diff line number Diff line change 1+ version : " 3"
2+
3+ services :
4+
5+ runtime-setup :
6+ image : redistack:22.04-5.8
7+ build :
8+ args :
9+ ubuntu_version : " jammy"
10+ swift_version : " 5.8"
11+
12+ documentation-check :
13+ image : redistack:22.04-5.8
14+
15+ test :
16+ image : redistack:22.04-5.8
17+ environment :
18+ - IMPORT_CHECK_ARG=--explicit-target-dependency-import-check error
19+ # - SANITIZER_ARG=--sanitize=thread
20+
21+ shell :
22+ image : redistack:22.04-5.8
Original file line number Diff line number Diff line change 1+ version : " 3"
2+
3+ services :
4+
5+ runtime-setup :
6+ image : redistack:22.04-5.9
7+ build :
8+ args :
9+ base_image : " swiftlang/swift:nightly-5.9-jammy"
10+
11+ documentation-check :
12+ image : redistack:22.04-5.9
13+
14+ test :
15+ image : redistack:22.04-5.9
16+ environment :
17+ - IMPORT_CHECK_ARG=--explicit-target-dependency-import-check error
18+ # - SANITIZER_ARG=--sanitize=thread
19+
20+ shell :
21+ image : redistack:22.04-5.9
Original file line number Diff line number Diff line change 1+ version : " 3"
2+
3+ services :
4+
5+ runtime-setup :
6+ image : redistack:22.04-main
7+ build :
8+ args :
9+ base_image : " swiftlang/swift:nightly-main-jammy"
10+
11+ documentation-check :
12+ image : redistack:22.04-main
13+
14+ test :
15+ image : redistack:22.04-main
16+ environment :
17+ - IMPORT_CHECK_ARG=--explicit-target-dependency-import-check error
18+ # - SANITIZER_ARG=--sanitize=thread
19+
20+ shell :
21+ image : redistack:22.04-main
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 : redistack:default
10+ build :
11+ context : .
12+ dockerfile : Dockerfile
13+
14+ common : &common
15+ image : redistack: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+ soundness :
26+ << : *common
27+ command : /bin/bash -xcl "./scripts/soundness.sh"
28+
29+ documentation-check :
30+ << : *common
31+ command : /bin/bash -xcl "./scripts/check-docs.sh"
32+
33+ test :
34+ << : *common
35+ depends_on : [runtime-setup, redis]
36+ command : /bin/bash -xcl "swift test -Xswiftc -warnings-as-errors --enable-test-discovery $${SANITIZER_ARG-} $${IMPORT_CHECK_ARG-}"
37+ environment :
38+ - REDIS_URL=redis
39+
40+ # util
41+
42+ shell :
43+ << : *common
44+ entrypoint : /bin/bash
45+
46+ docs :
47+ << : *common
48+ command : /bin/bash -cl "./scripts/generate_docs.sh"
49+
50+ redis :
51+ image : redis:7
You can’t perform that action at this time.
0 commit comments