Skip to content

Commit

Permalink
Docker: Add tests for older GCC version
Browse files Browse the repository at this point in the history
  • Loading branch information
oschuett committed Jan 1, 2019
1 parent bef8787 commit a5eacee
Show file tree
Hide file tree
Showing 8 changed files with 124 additions and 9 deletions.
19 changes: 19 additions & 0 deletions tools/docker/Dockerfile.test_gcc4.8
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions tools/docker/Dockerfile.test_gcc5
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions tools/docker/Dockerfile.test_gcc6
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions tools/docker/Dockerfile.test_gcc7
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions tools/docker/Dockerfile.test_gcc8
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion tools/docker/Dockerfile.test_ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tools/docker/scripts/install_basics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ apt-get install -y --no-install-recommends \
unzip \
less \
make \
cmake \
rsync
rm -rf /var/lib/apt/lists/*

Expand Down
35 changes: 27 additions & 8 deletions tools/docker/scripts/install_ubuntu_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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

0 comments on commit a5eacee

Please sign in to comment.