Docker: Add tests for older GCC version

This commit is contained in:
Ole Schütt 2019-01-01 22:13:41 +00:00 committed by Ole Schütt
parent bef87870d5
commit a5eacee289
8 changed files with 124 additions and 9 deletions

View file

@ -0,0 +1,19 @@
FROM ubuntu:18.04
# author: Ole Schuett
WORKDIR /workspace
COPY ./scripts/install_basics.sh .
RUN ./install_basics.sh
COPY ./scripts/install_ubuntu_toolchain.sh .
RUN ./install_ubuntu_toolchain.sh 4.8
COPY ./scripts/install_regtest.sh .
RUN ./install_regtest.sh local ssmp
COPY ./scripts/ci_entrypoint.sh ./scripts/test_regtest.sh ./
CMD ["./ci_entrypoint.sh", "./test_regtest.sh", "local", "ssmp"]
#EOF

View file

@ -0,0 +1,19 @@
FROM ubuntu:18.04
# author: Ole Schuett
WORKDIR /workspace
COPY ./scripts/install_basics.sh .
RUN ./install_basics.sh
COPY ./scripts/install_ubuntu_toolchain.sh .
RUN ./install_ubuntu_toolchain.sh 5
COPY ./scripts/install_regtest.sh .
RUN ./install_regtest.sh local ssmp
COPY ./scripts/ci_entrypoint.sh ./scripts/test_regtest.sh ./
CMD ["./ci_entrypoint.sh", "./test_regtest.sh", "local", "ssmp"]
#EOF

View file

@ -0,0 +1,19 @@
FROM ubuntu:18.04
# author: Ole Schuett
WORKDIR /workspace
COPY ./scripts/install_basics.sh .
RUN ./install_basics.sh
COPY ./scripts/install_ubuntu_toolchain.sh .
RUN ./install_ubuntu_toolchain.sh 6
COPY ./scripts/install_regtest.sh .
RUN ./install_regtest.sh local ssmp
COPY ./scripts/ci_entrypoint.sh ./scripts/test_regtest.sh ./
CMD ["./ci_entrypoint.sh", "./test_regtest.sh", "local", "ssmp"]
#EOF

View file

@ -0,0 +1,19 @@
FROM ubuntu:18.04
# author: Ole Schuett
WORKDIR /workspace
COPY ./scripts/install_basics.sh .
RUN ./install_basics.sh
COPY ./scripts/install_ubuntu_toolchain.sh .
RUN ./install_ubuntu_toolchain.sh 7
COPY ./scripts/install_regtest.sh .
RUN ./install_regtest.sh local ssmp
COPY ./scripts/ci_entrypoint.sh ./scripts/test_regtest.sh ./
CMD ["./ci_entrypoint.sh", "./test_regtest.sh", "local", "ssmp"]
#EOF

View file

@ -0,0 +1,19 @@
FROM ubuntu:18.04
# author: Ole Schuett
WORKDIR /workspace
COPY ./scripts/install_basics.sh .
RUN ./install_basics.sh
COPY ./scripts/install_ubuntu_toolchain.sh .
RUN ./install_ubuntu_toolchain.sh 8
COPY ./scripts/install_regtest.sh .
RUN ./install_regtest.sh local ssmp
COPY ./scripts/ci_entrypoint.sh ./scripts/test_regtest.sh ./
CMD ["./ci_entrypoint.sh", "./test_regtest.sh", "local", "ssmp"]
#EOF

View file

@ -8,7 +8,7 @@ COPY ./scripts/install_basics.sh .
RUN ./install_basics.sh
COPY ./scripts/install_ubuntu_toolchain.sh .
RUN ./install_ubuntu_toolchain.sh
RUN ./install_ubuntu_toolchain.sh 8
COPY ./scripts/install_regtest.sh .
RUN ./install_regtest.sh local ssmp

View file

@ -13,6 +13,7 @@ apt-get install -y --no-install-recommends \
unzip \
less \
make \
cmake \
rsync
rm -rf /var/lib/apt/lists/*

View file

@ -2,17 +2,38 @@
# author: Ole Schuett
if (( $# != 1 )) ; then
echo "Usage: install_ubuntu_toolchain.sh <GCC_VERSION>"
exit 1
fi
GCC_VERSION=$1
# install Ubuntu packages
apt-get update
apt-get install -y --no-install-recommends \
build-essential \
gfortran \
gcc-${GCC_VERSION} \
g++-${GCC_VERSION} \
gfortran-${GCC_VERSION} \
pkg-config \
fftw3-dev \
libopenblas-dev \
liblapack-dev \
libint-dev
libint-dev \
libgsl-dev \
libhdf5-dev
rm -rf /var/lib/apt/lists/*
# create links
ln -sf gcc-${GCC_VERSION} /usr/bin/gcc
ln -sf g++-${GCC_VERSION} /usr/bin/g++
ln -sf gfortran-${GCC_VERSION} /usr/bin/gfortran
# json-fortran does not compile with gcc 4.8.5.
if [[ "$GCC_VERSION" == "4.8" ]] ; then
EXTRA_TOOLCHAIN_OPTIONS="--with-sirius=no --with-json-fortran=no"
fi
# build toolchain relying mostly on ubuntu packages
cp -r /workspace/cp2k/tools/toolchain /opt/cp2k-toolchain/
cd /opt/cp2k-toolchain/
@ -25,13 +46,11 @@ cd /opt/cp2k-toolchain/
--with-openblas=system \
--with-reflapack=system \
--with-libint=system \
--with-gsl=system \
--with-hdf5=system \
--with-libxc=install \
--with-libxsmm=install \
--with-sirius=no \
--with-gsl=no \
--with-spglib=no \
--with-hdf5=no \
--with-json-fortran=no
${EXTRA_TOOLCHAIN_OPTIONS}
rm -rf ./build
#EOF