From 6904d12d6d17cd03c7d7deecca7b30e6b05806a8 Mon Sep 17 00:00:00 2001 From: Philippa Rubin Date: Tue, 24 Aug 2021 10:47:47 +0100 Subject: [PATCH 1/4] adding Dockerfile --- Dockerfile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8936ac5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +FROM ubuntu +# suppress input +ARG DEBIAN_FRONTEND=noninteractive + +# essential, cmake, git, boost, GMP for Bignum library +RUN apt-get update && apt-get -y install build-essential cmake git libboost-all-dev libgmp-dev + +# unittest-cpp +RUN git clone https://github.com/unittest-cpp/unittest-cpp.git +WORKDIR /unittest-cpp/builds +RUN cmake ../ +RUN cmake --build ./ +RUN cmake --build ./ --target install + +# libalgebra_tests build +RUN mkdir libalgebra_tests +WORKDIR /libalgebra_tests +COPY . . +WORKDIR /libalgebra_tests/build +RUN cmake -DCMAKE_BUILD_TYPE=Release "$@" .. +RUN cmake --build . + +# Run the tests +CMD ./test From 554bd6782c2a6d973328874392a7cb492522b867 Mon Sep 17 00:00:00 2001 From: Philippa Rubin Date: Tue, 24 Aug 2021 13:27:09 +0100 Subject: [PATCH 2/4] adding README with docker instructions --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..92cd418 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# libalgebra_tests + +A testing suite for the [libalgebra](https://github.com/terrylyons/libalgebra) C++ library. + +### Build tests + +``` +docker build -t libalgebra_tests . +``` + +### Run tests + +``` +docker run -it libalgebra_tests +``` From 4e2cde8d777288748f0421d6718d421dec7ec44c Mon Sep 17 00:00:00 2001 From: Philippa Rubin Date: Wed, 13 Oct 2021 12:52:07 +0100 Subject: [PATCH 3/4] renamed slow dockerfile --- Dockerfile => simple-Dockerfile | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Dockerfile => simple-Dockerfile (100%) diff --git a/Dockerfile b/simple-Dockerfile similarity index 100% rename from Dockerfile rename to simple-Dockerfile From c3739b74b79456f2e9769961bb93c05cc27bf12e Mon Sep 17 00:00:00 2001 From: Philippa Rubin Date: Wed, 13 Oct 2021 12:53:22 +0100 Subject: [PATCH 4/4] new dockerfile with building on entrypoint for cmake --- Dockerfile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9096932 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,35 @@ +FROM ubuntu AS builder +# suppress input +ARG DEBIAN_FRONTEND=noninteractive + +# essential, cmake, git, boost, GMP for Bignum library +RUN apt-get update && apt-get -y install build-essential cmake git libboost-all-dev libgmp-dev + +# unittest-cpp +RUN git clone https://github.com/unittest-cpp/unittest-cpp.git +WORKDIR /unittest-cpp/builds +RUN cmake ../ +RUN cmake --build ./ +RUN cmake --build ./ --target install + +# libalgebra_tests build +RUN mkdir libalgebra_tests +WORKDIR /libalgebra_tests +COPY . . +WORKDIR /libalgebra_tests/build +ENTRYPOINT cmake -DCMAKE_BUILD_TYPE=Release "$@" .. && cmake --build . + +# Run the tests +FROM builder AS tester +ENTRYPOINT cmake -DCMAKE_BUILD_TYPE=Release "$@" .. && cmake --build . && ./test + +# docker volume create libalgebra_volume +# docker build -t libalgebra . --target builder +# docker run -v libalgebra_volume:/libalgebra_tests/build -it libalgebra +# +# OR +# +# docker volume create libalgebra_tests_volume +# docker build -t libalgebra_tests . --target tester +# docker run -v libalgebra_tests_volume:/libalgebra_tests/build -it libalgebra_tests +