forked from thecharlieblake/Solvitaire
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (38 loc) · 1.91 KB
/
Dockerfile
File metadata and controls
47 lines (38 loc) · 1.91 KB
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
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
libboost-program-options-dev \
git \
python3 \
ca-certificates \
time \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /workspace
# CACHEBUST ensures COPY and all subsequent layers are never cached.
# Passed automatically by container-build.sh as a Unix timestamp.
ARG CACHEBUST=1
RUN echo "Build timestamp: $CACHEBUST"
COPY . /workspace/
# Remove any stale host build dirs (container CLI may not honour .dockerignore)
RUN rm -rf cmake-build-release cmake-build-debug cmake-build-trace build build-archive
# Two separate RUN steps so cmake configure is cached independently of compile
RUN cmake -DCMAKE_BUILD_TYPE=Release -Bcmake-build-release -H.
RUN cmake --build cmake-build-release --target solvitaire \
&& cmake --build cmake-build-release --target solvitaire-flat \
&& cmake --build cmake-build-release --target solvitaire-hash-only \
&& cmake --build cmake-build-release --target solvitaire-lru \
&& cmake --build cmake-build-release --target unit_tests
# Build trace variant (for pre-merge validation against feature/search-trace reference binary).
# cmake-build-trace uses Release + SOLVITAIRE_TRACE=ON.
# Trace variant binaries: flat and lru needed for trace_identity_* tests;
# hash-only needed for SearchTraceAgreementTest and manual collision investigation.
RUN cmake -DCMAKE_BUILD_TYPE=Release -DSOLVITAIRE_TRACE=ON -Bcmake-build-trace -H. \
&& cmake --build cmake-build-trace --target solvitaire \
&& cmake --build cmake-build-trace --target solvitaire-trace \
&& cmake --build cmake-build-trace --target solvitaire-flat-trace \
&& cmake --build cmake-build-trace --target solvitaire-hash-only-trace \
&& cmake --build cmake-build-trace --target solvitaire-lru-trace \
&& cmake --build cmake-build-trace --target unit_tests
CMD ["/workspace/cmake-build-release/bin/solvitaire"]