Commit 96f9bb80 authored by Lukas Riedel's avatar Lukas Riedel

Always install Clang into DUNE env image

Specify compilers through build-arg CC and CXX of Dockerfiles
parent cbc46020
......@@ -51,6 +51,7 @@ setup:dune-env-clang:
script:
- docker build -f docker/dune-env.dockerfile
--build-arg CC=clang
--build-arg CXX=clang++
--build-arg PROCNUM=$CPUS_DIND
-t ${DUNE_ENV_IMAGE}-clang .
- docker push ${DUNE_ENV_IMAGE}-clang
......@@ -73,6 +74,8 @@ prep:update-dune-clang:
script:
- docker build -f docker/dune-env-update.dockerfile
--build-arg DUNE_ENV_IMAGE={$DUNE_ENV_IMAGE}-clang
--build-arg CC=clang
--build-arg CXX=clang++
--build-arg PROCNUM=$CPUS_DIND
-t {$DUNE_ENV_IMAGE}-clang .
- docker push {$DUNE_ENV_IMAGE}-clang
......
......@@ -3,11 +3,14 @@ FROM $DUNE_ENV_IMAGE
LABEL maintainer="lriedel@iup.uni-heidelberg.de"
# number of cores for parallel builds
ARG PROCNUM=1
# Compilers to be used
ARG CC=gcc
ARG CXX=g++
WORKDIR /opt/dune
ADD . /opt/dune/dorie/
RUN MAKE_FLAGS="-j ${PROCNUM}" \
CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release -DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" \
CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} -DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" \
./dune-common/bin/dunecontrol --only=dorie all \
&& ./dune-common/bin/dunecontrol --only=dorie exec \
"rm build-cmake/dune/dorie/impl/libdorie-impl.a build-cmake/dune/dorie/impl/CMakeFiles/dorie-impl.dir/*.cc.o"
......
......@@ -3,10 +3,13 @@ FROM $DUNE_ENV_IMAGE
LABEL maintainer="lriedel@iup.uni-heidelberg.de"
# number of cores for parallel builds
ARG PROCNUM=1
# Compilers to be used
ARG CC=gcc
ARG CXX=g++
RUN apt-get clean && apt-get update && apt-get upgrade -y && apt-get clean
WORKDIR /opt/dune
RUN ./dune-common/bin/dunecontrol update
RUN MAKE_FLAGS="-j ${PROCNUM}" \
CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release -DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" \
CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} -DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" \
./dune-common/bin/dunecontrol all
\ No newline at end of file
......@@ -2,13 +2,16 @@ FROM ubuntu:bionic
LABEL maintainer="lriedel@iup.uni-heidelberg.de"
# number of cores for parallel builds
ARG PROCNUM=1
# C++ compiler to be installed
ARG CC="gcc g++"
# Compilers to be used
ARG CC=gcc
ARG CXX=g++
RUN apt-get clean && apt-get update && apt-get install -y \
${CC} \
clang \
cmake \
doxygen \
gcc \
g++ \
gfortran \
git \
libatlas-base-dev \
......@@ -46,5 +49,5 @@ RUN git clone https://gitlab.dune-project.org/staging/dune-uggrid.git -b release
WORKDIR /opt/dune
RUN MAKE_FLAGS="-j ${PROCNUM}" \
CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release -DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" \
CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} -DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" \
./dune-common/bin/dunecontrol all
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment