Skip to content

Commit

Permalink
#349: remove redundant code from dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
cz4rs committed Nov 20, 2024
1 parent 50d8d8f commit cff6d43
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 122 deletions.
26 changes: 3 additions & 23 deletions ci/docker/ubuntu-18.04-clang-cpp.dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

ARG arch=amd64
ARG distro=18.04
FROM ${arch}/ubuntu:${distro} as base
FROM ${arch}/ubuntu:${distro} AS base

ARG proxy=""
ARG compiler=clang-7
Expand Down Expand Up @@ -64,29 +64,9 @@ ENV MPI_EXTRA_FLAGS="" \
PATH=/usr/lib/ccache/:$PATH \
CMAKE_EXE_LINKER_FLAGS="-pthread"

FROM base as build
FROM base AS build
COPY . /checkpoint

ARG MAGISTRATE_DOXYGEN_ENABLED
ARG MAGISTRATE_TESTS_ENABLED
ARG MAGISTRATE_EXAMPLES_ENABLED
ARG MAGISTRATE_WARNINGS_AS_ERRORS
ARG MAGISTRATE_MPI_ENABLED
ARG MAGISTRATE_ASAN_ENABLED
ARG MAGISTRATE_UBSAN_ENABLED
ARG MAGISTRATE_SERIALIZATION_ERROR_CHECKING_ENABLED

ENV MAGISTRATE_DOXYGEN_ENABLED=${MAGISTRATE_DOXYGEN_ENABLED} \
MAGISTRATE_TESTS_ENABLED=${MAGISTRATE_TESTS_ENABLED} \
MAGISTRATE_EXAMPLES_ENABLED=${MAGISTRATE_EXAMPLES_ENABLED} \
MAGISTRATE_WARNINGS_AS_ERRORS=${MAGISTRATE_WARNINGS_AS_ERRORS} \
MAGISTRATE_MPI_ENABLED=${MAGISTRATE_MPI_ENABLED} \
MAGISTRATE_ASAN_ENABLED=${MAGISTRATE_ASAN_ENABLED} \
MAGISTRATE_UBSAN_ENABLED=${MAGISTRATE_UBSAN_ENABLED} \
MAGISTRATE_SERIALIZATION_ERROR_CHECKING_ENABLED=${MAGISTRATE_SERIALIZATION_ERROR_CHECKING_ENABLED} \
CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}

RUN /checkpoint/ci/build_cpp.sh /checkpoint /build

FROM build as test
FROM build AS test
RUN /checkpoint/ci/test_cpp.sh /checkpoint /build
26 changes: 3 additions & 23 deletions ci/docker/ubuntu-18.04-gnu-cpp.dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

ARG arch=amd64
ARG distro=18.04
FROM ${arch}/ubuntu:${distro} as base
FROM ${arch}/ubuntu:${distro} AS base

ARG proxy=""
ARG compiler=gcc-8
Expand Down Expand Up @@ -72,29 +72,9 @@ RUN apt-get update -y -q && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

FROM base as build
FROM base AS build
COPY . /checkpoint

ARG MAGISTRATE_DOXYGEN_ENABLED
ARG MAGISTRATE_TESTS_ENABLED
ARG MAGISTRATE_EXAMPLES_ENABLED
ARG MAGISTRATE_WARNINGS_AS_ERRORS
ARG MAGISTRATE_MPI_ENABLED
ARG MAGISTRATE_ASAN_ENABLED
ARG MAGISTRATE_UBSAN_ENABLED
ARG MAGISTRATE_SERIALIZATION_ERROR_CHECKING_ENABLED

ENV MAGISTRATE_DOXYGEN_ENABLED=${MAGISTRATE_DOXYGEN_ENABLED} \
MAGISTRATE_TESTS_ENABLED=${MAGISTRATE_TESTS_ENABLED} \
MAGISTRATE_EXAMPLES_ENABLED=${MAGISTRATE_EXAMPLES_ENABLED} \
MAGISTRATE_WARNINGS_AS_ERRORS=${MAGISTRATE_WARNINGS_AS_ERRORS} \
MAGISTRATE_MPI_ENABLED=${MAGISTRATE_MPI_ENABLED} \
MAGISTRATE_ASAN_ENABLED=${MAGISTRATE_ASAN_ENABLED} \
MAGISTRATE_UBSAN_ENABLED=${MAGISTRATE_UBSAN_ENABLED} \
MAGISTRATE_SERIALIZATION_ERROR_CHECKING_ENABLED=${MAGISTRATE_SERIALIZATION_ERROR_CHECKING_ENABLED} \
CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}

RUN /checkpoint/ci/build_cpp.sh /checkpoint /build

FROM build as test
FROM build AS test
RUN /checkpoint/ci/test_cpp.sh /checkpoint /build
26 changes: 3 additions & 23 deletions ci/docker/ubuntu-18.04-intel-cpp.dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

ARG compiler=icc-18
FROM lifflander1/${compiler} as base
FROM lifflander1/${compiler} AS base

ARG proxy=""

Expand Down Expand Up @@ -65,29 +65,9 @@ ENV MPI_EXTRA_FLAGS="" \
PATH=/usr/lib/ccache/:$PATH \
LD_LIBRARY_PATH=/opt/intel/ld_library_path

FROM base as build
FROM base AS build
COPY . /checkpoint

ARG MAGISTRATE_DOXYGEN_ENABLED
ARG MAGISTRATE_TESTS_ENABLED
ARG MAGISTRATE_EXAMPLES_ENABLED
ARG MAGISTRATE_WARNINGS_AS_ERRORS
ARG MAGISTRATE_MPI_ENABLED
ARG MAGISTRATE_ASAN_ENABLED
ARG MAGISTRATE_UBSAN_ENABLED
ARG MAGISTRATE_SERIALIZATION_ERROR_CHECKING_ENABLED

ENV MAGISTRATE_DOXYGEN_ENABLED=${MAGISTRATE_DOXYGEN_ENABLED} \
MAGISTRATE_TESTS_ENABLED=${MAGISTRATE_TESTS_ENABLED} \
MAGISTRATE_EXAMPLES_ENABLED=${MAGISTRATE_EXAMPLES_ENABLED} \
MAGISTRATE_WARNINGS_AS_ERRORS=${MAGISTRATE_WARNINGS_AS_ERRORS} \
MAGISTRATE_MPI_ENABLED=${MAGISTRATE_MPI_ENABLED} \
MAGISTRATE_ASAN_ENABLED=${MAGISTRATE_ASAN_ENABLED} \
MAGISTRATE_UBSAN_ENABLED=${MAGISTRATE_UBSAN_ENABLED} \
MAGISTRATE_SERIALIZATION_ERROR_CHECKING_ENABLED=${MAGISTRATE_SERIALIZATION_ERROR_CHECKING_ENABLED} \
CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}

RUN /checkpoint/ci/build_cpp.sh /checkpoint /build

FROM build as test
FROM build AS test
RUN /checkpoint/ci/test_cpp.sh /checkpoint /build
9 changes: 2 additions & 7 deletions ci/docker/ubuntu-20.04-gnu-docs.dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

ARG arch=amd64
FROM ${arch}/ubuntu:20.04 as base
FROM ${arch}/ubuntu:20.04 AS base

ARG proxy=""
ARG compiler=gcc-8
Expand Down Expand Up @@ -59,14 +59,9 @@ ENV MPI_EXTRA_FLAGS="" \
CXX=mpicxx \
PATH=/usr/lib/ccache/:$PATH

FROM base as build
FROM base AS build
COPY . /checkpoint

ARG token
ARG MAGISTRATE_DOXYGEN_ENABLED
ARG CMAKE_BUILD_TYPE

ENV MAGISTRATE_DOXYGEN_ENABLED=${MAGISTRATE_DOXYGEN_ENABLED} \
CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}

RUN /checkpoint/ci/build_cpp.sh /checkpoint /build "${token}"
26 changes: 3 additions & 23 deletions ci/docker/ubuntu-20.04-nvidia-cpp.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ARG compiler=11.2.2
ARG arch=amd64
ARG ubuntu=20.04
FROM --platform=${arch} nvidia/cuda:${compiler}-devel-ubuntu${ubuntu} as base
FROM --platform=${arch} nvidia/cuda:${compiler}-devel-ubuntu${ubuntu} AS base

ARG proxy=""

Expand Down Expand Up @@ -62,29 +62,9 @@ COPY ./ci/deps/kokkos-kernels.sh kokkos-kernels.sh
RUN ./kokkos-kernels.sh 4.1.00 /pkgs
ENV KOKKOS_KERNELS_ROOT=/pkgs/kokkos-kernels/install

FROM base as build
FROM base AS build
COPY . /checkpoint

ARG MAGISTRATE_DOXYGEN_ENABLED
ARG MAGISTRATE_TESTS_ENABLED
ARG MAGISTRATE_EXAMPLES_ENABLED
ARG MAGISTRATE_WARNINGS_AS_ERRORS
ARG MAGISTRATE_MPI_ENABLED
ARG MAGISTRATE_ASAN_ENABLED
ARG MAGISTRATE_UBSAN_ENABLED
ARG MAGISTRATE_SERIALIZATION_ERROR_CHECKING_ENABLED

ENV MAGISTRATE_DOXYGEN_ENABLED=${MAGISTRATE_DOXYGEN_ENABLED} \
MAGISTRATE_TESTS_ENABLED=${MAGISTRATE_TESTS_ENABLED} \
MAGISTRATE_EXAMPLES_ENABLED=${MAGISTRATE_EXAMPLES_ENABLED} \
MAGISTRATE_WARNINGS_AS_ERRORS=${MAGISTRATE_WARNINGS_AS_ERRORS} \
MAGISTRATE_MPI_ENABLED=${MAGISTRATE_MPI_ENABLED} \
MAGISTRATE_ASAN_ENABLED=${MAGISTRATE_ASAN_ENABLED} \
MAGISTRATE_UBSAN_ENABLED=${MAGISTRATE_UBSAN_ENABLED} \
MAGISTRATE_SERIALIZATION_ERROR_CHECKING_ENABLED=${MAGISTRATE_SERIALIZATION_ERROR_CHECKING_ENABLED} \
CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}

RUN /checkpoint/ci/build_cpp.sh /checkpoint /build

FROM build as test
FROM build AS test
RUN /checkpoint/ci/test_cpp.sh /checkpoint /build
26 changes: 3 additions & 23 deletions ci/docker/ubuntu-22.04-clang-cpp.dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

ARG arch=amd64
ARG distro=22.04
FROM ${arch}/ubuntu:${distro} as base
FROM ${arch}/ubuntu:${distro} AS base

ARG proxy=""
ARG compiler=clang-13
Expand Down Expand Up @@ -66,29 +66,9 @@ ENV MPI_EXTRA_FLAGS="" \
PATH=/usr/lib/ccache/:$PATH \
CMAKE_EXE_LINKER_FLAGS="-pthread"

FROM base as build
FROM base AS build
COPY . /checkpoint

ARG MAGISTRATE_DOXYGEN_ENABLED
ARG MAGISTRATE_TESTS_ENABLED
ARG MAGISTRATE_EXAMPLES_ENABLED
ARG MAGISTRATE_WARNINGS_AS_ERRORS
ARG MAGISTRATE_MPI_ENABLED
ARG MAGISTRATE_ASAN_ENABLED
ARG MAGISTRATE_UBSAN_ENABLED
ARG MAGISTRATE_SERIALIZATION_ERROR_CHECKING_ENABLED

ENV MAGISTRATE_DOXYGEN_ENABLED=${MAGISTRATE_DOXYGEN_ENABLED} \
MAGISTRATE_TESTS_ENABLED=${MAGISTRATE_TESTS_ENABLED} \
MAGISTRATE_EXAMPLES_ENABLED=${MAGISTRATE_EXAMPLES_ENABLED} \
MAGISTRATE_WARNINGS_AS_ERRORS=${MAGISTRATE_WARNINGS_AS_ERRORS} \
MAGISTRATE_MPI_ENABLED=${MAGISTRATE_MPI_ENABLED} \
MAGISTRATE_ASAN_ENABLED=${MAGISTRATE_ASAN_ENABLED} \
MAGISTRATE_UBSAN_ENABLED=${MAGISTRATE_UBSAN_ENABLED} \
MAGISTRATE_SERIALIZATION_ERROR_CHECKING_ENABLED=${MAGISTRATE_SERIALIZATION_ERROR_CHECKING_ENABLED} \
CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}

RUN /checkpoint/ci/build_cpp.sh /checkpoint /build

FROM build as test
FROM build AS test
RUN /checkpoint/ci/test_cpp.sh /checkpoint /build

0 comments on commit cff6d43

Please sign in to comment.