-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathDockerTestFile
28 lines (21 loc) · 1.18 KB
/
DockerTestFile
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
ARG ABLATE_DEPENDENCY_IMAGE=ghcr.io/ubchrest/ablate/ablate-dependencies-clang:latest
FROM $ABLATE_DEPENDENCY_IMAGE
# Install testing dependencies
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get -y install doxygen python3-inflection python3-yaml
# provide hook to disable tensorflow
ARG ENABLE_TENSOR_FLOW=1
ENV TENSORFLOW_DIR=${ENABLE_TENSOR_FLOW:+${TENSORFLOW_DIR}}
ENV TF_ENABLE_ONEDNN_OPTS=0
# Copy over the source
COPY . /source
WORKDIR /source
# Before building ablate, make sure it is in the correct format
# Build & clean up the intermediate files to prevent file size bloat
run cmake --preset=local-ablate-opt && cmake --build --preset=ablate-format-check && cmake --build --preset=ablate-test-only-build -j $(nproc) && find . -name CMakeFiles -type d -prune -exec rm -rf {} \;
# Rerun Cmake to make sure that the version is available to the testing pipeline
run cmake --preset=local-ablate-opt
# Build the custom documentation components
run python3 /source/docs/ablateDevGenerator.py --rootDir=/source/ --ablateExe=/source/cmake-build-opt-ablate/ablate
# Specify Entry Point for tests
CMD bash -c "echo 'Running Tests for ${PETSC_ARCH}' && ctest --preset=pipeline-testing-fast"