Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
```
24 changes: 24 additions & 0 deletions simple-Dockerfile
Original file line number Diff line number Diff line change
@@ -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