1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
# This source file is part of the Swift open source project
#
# Copyright (c) 2021-2023 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for Swift project authors
# this file is not designed to be run directly
# instead, use the docker-compose.<os>.<swift> files
# eg docker-compose -f Utilities/docker/docker-compose.yaml -f Utilities/docker/docker-compose.2004.57.yaml run test
version: "3"
services:
runtime-setup:
image: swift-package-manager:default
build:
context: .
dockerfile: Dockerfile
common: &common
image: swift-package-manager:default
depends_on: [runtime-setup]
volumes:
# ssh, caches
- ~/.ssh:/root/.ssh
- ~/.cache:/root/.cache
- ~/.swiftpm/cache:/root/.swiftpm/cache
- ~/.swiftpm/configuration:/root/.swiftpm/config # old location, remove after 5.6
- ~/.swiftpm/configuration:/root/.swiftpm/configuration
- ~/.swiftpm/security:/root/.swiftpm/security
# swift-package-manager code
- ../..:/code/swift-package-manager:z
# bootstrap script requires dependencies to be pre-fetched and in a specific place
- ../../../swift-tools-support-core:/code/swift-tools-support-core:z
- ../../../yams:/code/yams:z
- ../../../swift-argument-parser:/code/swift-argument-parser:z
- ../../../swift-crypto:/code/swift-crypto:z
- ../../../swift-driver:/code/swift-driver:z
- ../../../swift-llbuild:/code/llbuild:z
- ../../../swift-system:/code/swift-system:z
- ../../../swift-collections:/code/swift-collections:z
- ../../../swift-asn1:/code/swift-asn1:z
- ../../../swift-certificates:/code/swift-certificates:z
working_dir: /code/swift-package-manager
cap_drop:
- CAP_NET_RAW
- CAP_NET_BIND_SERVICE
build:
<<: *common
command: /bin/bash -cl "swift build"
test:
<<: *common
command: /bin/bash -cl "swift test --parallel"
bootstrap-clean:
<<: *common
command: /bin/bash -cl "./Utilities/bootstrap clean"
bootstrap-build:
<<: *common
command: /bin/bash -cl "./Utilities/bootstrap build"
bootstrap-test:
<<: *common
command: /bin/bash -cl "./Utilities/bootstrap test"
# util
shell:
<<: *common
entrypoint: /bin/bash
|