-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (25 loc) · 1.07 KB
/
Dockerfile
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
# syntax=docker/dockerfile:experimental
FROM debian:bookworm-slim as base
RUN apt-get update && apt-get install -y cmake build-essential ninja-build libserd-dev zlib1g-dev valgrind git
# not sure what version the apt catch2 is, but it doesn't have the same headers
# as the latest version. So doing a manual build then.
RUN git clone https://github.com/catchorg/Catch2 dep && \
cd dep && \
git checkout v3.3.2 && \
mkdir build && cd build && \
cmake -G Ninja .. && \
cmake --build . && \
cmake --install . && \
cd ../../ && \
rm -rf dep
FROM base as ci
RUN mkdir /dldi
COPY . /dldi
WORKDIR /dldi
ENV build_type=Release
RUN cmake --preset=$build_type && cmake --build --preset=$build_type
RUN cd $build_type && ctest -j $(nproc) \
--overwrite MemoryCheckSuppressionFile=/dldi/valgrind.suppressions.$build_type \
--overwrite MemoryCheckCommandOptions="--error-exitcode=1 --leak-check=full --show-leak-kinds=all --errors-for-leak-kinds=all --track-origins=yes --verbose --dsymutil=yes" \
-T memcheck --output-on-failure --short-progress --error-exitcode=1 \
--timeout 500