mirror of
https://github.com/apple/swift-crypto
synced 2026-11-30 05:18:46 +00:00
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
This commit is contained in:
1 parent
f9e47ba809
commit
03581fe6ef
4 files changed
+33
-1
No files matched your search
@@ -0,0 +1,4 @@
|
||||
module CCryptoBoringSSL {
|
||||
header "CCryptoBoringSSL.h"
|
||||
export *
|
||||
}
|
||||
+4
-1
@@ -21,7 +21,10 @@ RUN apt-get update && apt-get install -y lsof dnsutils netcat-openbsd net-tools
|
||||
|
||||
# ruby and jazzy for docs generation
|
||||
RUN apt-get update && apt-get install -y ruby ruby-dev libsqlite3-dev
|
||||
RUN gem install jazzy --no-ri --no-rdoc
|
||||
RUN if [ "${ubuntu_version}" != "focal" ] ; then gem install jazzy --no-document ; fi
|
||||
|
||||
# cmake build
|
||||
RUN apt-get update && apt-get install -y cmake ninja-build
|
||||
|
||||
# tools
|
||||
RUN mkdir -p $HOME/.tools
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
|
||||
runtime-setup:
|
||||
image: swift-crypto:20.04-5.3
|
||||
build:
|
||||
args:
|
||||
ubuntu_version: "focal"
|
||||
swift_version: "5.3"
|
||||
|
||||
test:
|
||||
image: swift-crypto:20.04-5.3
|
||||
environment: []
|
||||
#- SANITIZER_ARG=--sanitize=thread
|
||||
|
||||
cmake:
|
||||
image: swift-crypto:20.04-5.3
|
||||
|
||||
shell:
|
||||
image: swift-crypto:20.04-5.3
|
||||
@@ -31,6 +31,10 @@ services:
|
||||
# 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
|
||||
|
||||
|
||||
Reference in new issue
Block a user