Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Allow static libs, re-enable testing #1665

Merged
merged 3 commits into from
Jan 24, 2024
Merged
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
3 changes: 0 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@ bin
build
*.orig
*.bak

.git
Dockerfile
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,37 @@ RUN git config --global url.'https://'.insteadOf 'git://'
COPY . /usr/local/src/ants
WORKDIR /build

ARG CC=gcc-11 CXX=g++-11
ARG CC=gcc-11 CXX=g++-11 BUILD_SHARED_LIBS=ON

RUN cmake \
-GNinja \
-DBUILD_TESTING=ON \
-DRUN_LONG_TESTS=OFF \
-DRUN_SHORT_TESTS=ON \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} \
-DCMAKE_INSTALL_PREFIX=/opt/ants \
/usr/local/src/ants
RUN cmake --build . --parallel
WORKDIR /build/ANTS-build
RUN cmake --install .

ENV PATH="/opt/ants/bin:$PATH" \
LD_LIBRARY_PATH="/opt/ants/lib:$LD_LIBRARY_PATH"

RUN cmake --build . --target test

FROM base

RUN apt-get update \
&& apt-get install -y --no-install-recommends bc \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY --from=builder /opt/ants /opt/ants
ENV PATH="/opt/ants/bin:$PATH" \
LD_LIBRARY_PATH="/opt/ants/lib:$LD_LIBRARY_PATH"

COPY --from=builder /opt/ants /opt/ants

LABEL org.opencontainers.image.authors="ANTsX team" \
org.opencontainers.image.url="https://stnava.github.io/ANTs/" \
org.opencontainers.image.source="https://github.com/ANTsX/ANTs" \
Expand Down