Files
swift-crypto/docker/docker-compose.yaml
Yim Lee 03581fe6ef Setup docker for cmake build (#70)
* Setup docker for cmake build

Motivation:
Be able to run cmake build in CI

Modifications:
- Add "cmake" service to `docker-compose.yaml`
- Update `Dockerfile` to install `cmake` and `ninja`. Remove unneeded dependencies.
- Add `docker-compose.2004.53.yaml`. `cmake` on previous Ubuntu versions are too old and it would be a pain to upgrade, so using Ubuntu 20.04 to simplify things.
- Add back modulemap to ensure cmake build is successful

Result:
Can run cmake in CI
2021-02-04 13:45:56 -08:00

44 lines
1.1 KiB
YAML

# 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.1804.51.yaml run test
version: "3"
services:
runtime-setup:
image: swift-crypto:default
build:
context: .
dockerfile: Dockerfile
common: &common
image: swift-crypto:default
depends_on: [runtime-setup]
volumes:
- ~/.ssh:/root/.ssh
- ..:/code:z
working_dir: /code
cap_drop:
- CAP_NET_RAW
- CAP_NET_BIND_SERVICE
soundness:
<<: *common
command: /bin/bash -xcl "./scripts/soundness.sh"
test:
<<: *common
# FIXME: get rid of existing warnings
#command: /bin/bash -xcl "swift test --enable-test-discovery -Xswiftc -warnings-as-errors $${SANITIZER_ARG-}"
command: /bin/bash -xcl "swift test --enable-test-discovery"
cmake:
<<: *common
command: /bin/bash -xcl "cmake -G Ninja -D CMAKE_BUILD_TYPE=Release -B out -S . && ninja -C out"
# util
shell:
<<: *common
entrypoint: /bin/bash