-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
setup docker to build for multiple swift versions locally
- Loading branch information
Showing
6 changed files
with
108 additions
and
1 deletion.
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 |
---|---|---|
@@ -1,4 +1,28 @@ | ||
fmt: | ||
swift-format format -i -r -p Sources Package.swift | ||
|
||
.PHONY: fmt | ||
test: | ||
swift test | ||
|
||
test-linux-swift508: | ||
docker compose run --rm --build swift508 | ||
|
||
test-linux-swift509: | ||
docker compose run --rm --build swift509 | ||
|
||
test-linux-swift510: | ||
docker compose run --rm --build swift510 | ||
|
||
test-linux-swift600: | ||
docker compose run --rm --build swift600 | ||
|
||
test-linux-all: | ||
docker compose run --rm --build | ||
|
||
.PHONY: fmt \ | ||
test \ | ||
test-linux-swift508 \ | ||
test-linux-swift509 \ | ||
test-linux-swift510 \ | ||
test-linux-swift600 \ | ||
test-linux-all |
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,31 @@ | ||
version: '3.7' | ||
|
||
name: linux-tests | ||
services: | ||
swift508: | ||
build: | ||
context: . | ||
dockerfile: swift508.Dockerfile | ||
working_dir: /app | ||
entrypoint: swift test | ||
|
||
swift509: | ||
build: | ||
context: . | ||
dockerfile: swift509.Dockerfile | ||
working_dir: /app | ||
entrypoint: swift test | ||
|
||
swift510: | ||
build: | ||
context: . | ||
dockerfile: swift510.Dockerfile | ||
working_dir: /app | ||
entrypoint: swift test | ||
|
||
swift600: | ||
build: | ||
context: . | ||
dockerfile: swift600.Dockerfile | ||
working_dir: /app | ||
entrypoint: swift test |
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,13 @@ | ||
FROM swift:5.8 | ||
|
||
WORKDIR /app | ||
|
||
COPY Package.* ./ | ||
|
||
RUN swift package resolve --skip-update \ | ||
$([ -f ./Package.resolved ] && echo "--force-resolved-versions" || true) | ||
|
||
COPY ./Plugins ./Plugins | ||
COPY ./Sources ./Sources | ||
COPY ./Tests ./Tests | ||
|
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,13 @@ | ||
FROM swift:5.9 | ||
|
||
WORKDIR /app | ||
|
||
COPY Package.* ./ | ||
|
||
RUN swift package resolve --skip-update \ | ||
$([ -f ./Package.resolved ] && echo "--force-resolved-versions" || true) | ||
|
||
COPY ./Plugins ./Plugins | ||
COPY ./Sources ./Sources | ||
COPY ./Tests ./Tests | ||
|
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,13 @@ | ||
FROM swift:5.10 | ||
|
||
WORKDIR /app | ||
|
||
COPY Package.* ./ | ||
|
||
RUN swift package resolve --skip-update \ | ||
$([ -f ./Package.resolved ] && echo "--force-resolved-versions" || true) | ||
|
||
COPY ./Plugins ./Plugins | ||
COPY ./Sources ./Sources | ||
COPY ./Tests ./Tests | ||
|
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,13 @@ | ||
FROM swift:6.0 | ||
|
||
WORKDIR /app | ||
|
||
COPY Package.* ./ | ||
|
||
RUN swift package resolve --skip-update \ | ||
$([ -f ./Package.resolved ] && echo "--force-resolved-versions" || true) | ||
|
||
COPY ./Plugins ./Plugins | ||
COPY ./Sources ./Sources | ||
COPY ./Tests ./Tests | ||
|