test: add unit testing for point.h to CI workflow

This commit is contained in:
2025-11-08 21:57:23 +01:00
parent 60a210ab0f
commit aee965c84d
5 changed files with 97 additions and 2 deletions
+30 -2
View File
@@ -1,4 +1,5 @@
FROM ubuntu:24.04
# Base builder
FROM ubuntu:24.04 AS base
ENV DEBIAN_FRONTEND=noninteractive
@@ -32,6 +33,33 @@ RUN make install
WORKDIR /app
COPY src/occt/ ./src
COPY unit-test/occt/ ./unit-test
COPY test/occt/ ./test
RUN cmake -S src -B build -DCMAKE_PREFIX_PATH=/usr/local && cmake --build build
COPY test/occt/ ./test
# Unit test runner
FROM ubuntu:24.04 AS unit-testing
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
git \
catch2 \
xvfb \
&& rm -rf /var/lib/apt/lists/*
COPY --from=base /usr/local /usr/local
COPY --from=base /app/build /app/build
COPY --from=base /app/src /app/src
COPY --from=base /app/test /app/test
WORKDIR /app
RUN cmake -S test -B build/tests -DCMAKE_PREFIX_PATH=/usr/local
RUN cmake --build build/tests
CMD ["ctest", "--test-dir", "build/tests", "-V"]