-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a42b72a
commit 2ace701
Showing
6 changed files
with
152 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# file options | ||
|
||
--swiftversion 5.7 | ||
--exclude .build | ||
|
||
# format options | ||
|
||
--self insert | ||
--patternlet inline | ||
--ranges nospace | ||
--stripunusedargs unnamed-only | ||
--ifdef no-indent | ||
--extensionacl on-declarations | ||
--disable typeSugar # https://github.com/nicklockwood/SwiftFormat/issues/636 | ||
--disable andOperator | ||
--disable wrapMultilineStatementBraces | ||
--disable enumNamespaces | ||
--disable redundantExtensionACL | ||
--disable redundantReturn | ||
--disable preferKeyPath | ||
--disable sortedSwitchCases | ||
--disable hoistAwait | ||
--disable hoistTry | ||
|
||
# rules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
ARG swift_version=5.7 | ||
ARG ubuntu_version=focal | ||
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 | ||
|
||
# set as UTF-8 | ||
RUN apt-get update && apt-get install -y locales locales-all | ||
ENV LC_ALL en_US.UTF-8 | ||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US.UTF-8 | ||
|
||
# tools | ||
RUN mkdir -p $HOME/.tools | ||
RUN echo 'export PATH="$HOME/.tools:$PATH"' >> $HOME/.profile | ||
|
||
# swiftformat (until part of the toolchain) | ||
|
||
ARG swiftformat_version=0.51.12 | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
version: "3" | ||
|
||
services: | ||
|
||
runtime-setup: | ||
image: swift-async-algorithms:20.04-5.7 | ||
build: | ||
args: | ||
ubuntu_version: "focal" | ||
swift_version: "5.7" | ||
|
||
build: | ||
image: swift-async-algorithms:20.04-5.7 | ||
|
||
test: | ||
image: swift-async-algorithms:20.04-5.7 | ||
environment: [] | ||
#- SANITIZER_ARG: "--sanitize=thread" | ||
#- TSAN_OPTIONS: "no_huge_pages_for_shadow=0 suppressions=/code/tsan_suppressions.txt" | ||
|
||
shell: | ||
image: swift-async-algorithms:20.04-5.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
version: "3" | ||
|
||
services: | ||
|
||
runtime-setup: | ||
image: swift-async-algorithms:20.04-5.8 | ||
build: | ||
args: | ||
base_image: "swiftlang/swift:nightly-5.8-focal" | ||
|
||
build: | ||
image: swift-async-algorithms:20.04-5.8 | ||
|
||
test: | ||
image: swift-async-algorithms:20.04-5.8 | ||
environment: [] | ||
#- SANITIZER_ARG: "--sanitize=thread" | ||
#- TSAN_OPTIONS: "no_huge_pages_for_shadow=0 suppressions=/code/tsan_suppressions.txt" | ||
|
||
shell: | ||
image: swift-async-algorithms:20.04-5.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
version: "3" | ||
|
||
services: | ||
|
||
runtime-setup: | ||
image: swift-async-algorithms:22.04-main | ||
build: | ||
args: | ||
base_image: "swiftlang/swift:nightly-main-jammy" | ||
|
||
build: | ||
image: swift-async-algorithms:22.04-main | ||
|
||
test: | ||
image: swift-async-algorithms:22.04-main | ||
environment: [] | ||
#- SANITIZER_ARG: "--sanitize=thread" | ||
#- TSAN_OPTIONS: "no_huge_pages_for_shadow=0 suppressions=/code/tsan_suppressions.txt" | ||
|
||
shell: | ||
image: swift-async-algorithms:22.04-main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# this file is not designed to be run directly | ||
# instead, use the docker-compose.<os>.<swift> files | ||
# eg docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.2004.56.yaml run test | ||
version: "3" | ||
|
||
services: | ||
runtime-setup: | ||
image: swift-async-algorithms:default | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
|
||
common: &common | ||
image: swift-async-algorithms:default | ||
depends_on: [runtime-setup] | ||
volumes: | ||
- ~/.ssh:/root/.ssh | ||
- ..:/code:z | ||
working_dir: /code | ||
|
||
soundness: | ||
<<: *common | ||
command: /bin/bash -xcl "swift -version && uname -a && ./scripts/soundness.sh" | ||
|
||
build: | ||
<<: *common | ||
environment: [] | ||
command: /bin/bash -cl "swift build" | ||
|
||
test: | ||
<<: *common | ||
depends_on: [runtime-setup] | ||
command: /bin/bash -xcl "swift $${SWIFT_TEST_VERB-test} $${WARN_AS_ERROR_ARG-} $${SANITIZER_ARG-} $${IMPORT_CHECK_ARG-}" | ||
|
||
# util | ||
|
||
shell: | ||
<<: *common | ||
entrypoint: /bin/bash |