Skip to content

Commit

Permalink
ENH: Run short tests during build
Browse files Browse the repository at this point in the history
Also bump Ubuntu version
  • Loading branch information
cookpa committed May 23, 2022
1 parent baa89e7 commit a69cacc
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:bionic-20200112 as builder
FROM ubuntu:bionic-20220427 as builder

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
Expand Down Expand Up @@ -26,15 +26,23 @@ RUN mkdir -p /tmp/ants/build \
&& git config --global url."https://".insteadOf git:// \
&& cmake \
-GNinja \
-DBUILD_TESTING=OFF \
-DBUILD_TESTING=ON \
-DRUN_LONG_TESTS=OFF \
-DRUN_SHORT_TESTS=ON \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_INSTALL_PREFIX=/opt/ants \
/tmp/ants/source \
&& cmake --build . --parallel \
&& cd ANTS-build \
&& cmake --install .

FROM ubuntu:bionic-20200112
# Need to set library path to run tests
ENV LD_LIBRARY_PATH="/opt/ants/lib:$LD_LIBRARY_PATH"

RUN cd /tmp/ants/build/ANTS-build \
&& cmake --build . --target test

FROM ubuntu:bionic-20220427
COPY --from=builder /opt/ants /opt/ants

LABEL maintainer="ANTsX team" \
Expand Down

0 comments on commit a69cacc

Please sign in to comment.