Commit 91a16d12 authored by Steffen Müthing's avatar Steffen Müthing

[!15] Add images for PDELab-based modules

- Introduce a new build stage "module dependencies" for images that contain everything needed to build a specific module
- Move `dune-pdelab-deps-*` to module dependencies stage
- Add new images `dune-pdelab-{2.6,git}` containing PDELab and dune-testtools

See merge request !15
parents ba683dc0 566b66d5
......@@ -4,6 +4,7 @@ stages:
- service
- base
- core
- module dependencies
- modules
- finalize
- rollback
......@@ -35,9 +36,17 @@ stages:
DUNECI_DOCKER_CACHE_CORE: 1
CORES: 4
.module-deps-variables:
variables: &module-deps-variables
IMAGE: $CI_REGISTRY_IMAGE/${CI_JOB_NAME}
SOURCE_DIRS: dune-$MODULE-deps-$VERSION
BUILD_ARGS: --parallel
DUNECI_DOCKER_CACHE_MODULE_DEPS: 1
CORES: 4
.module-variables:
variables: &module-variables
IMAGE: $CI_REGISTRY_IMAGE/dune-$MODULE:$VERSION
IMAGE: $CI_REGISTRY_IMAGE/${CI_JOB_NAME}
SOURCE_DIRS: dune-$MODULE-$VERSION
BUILD_ARGS: --parallel
DUNECI_DOCKER_CACHE_MODULES: 1
......@@ -88,6 +97,10 @@ stages:
<<: *base
stage: core
.module-deps-image: &module-deps-image
<<: *base
stage: module dependencies
.module-image: &module-image
<<: *base
stage: modules
......@@ -267,6 +280,29 @@ dune:2.6-ubuntu-18.04-clang-6-17:
BASE_IMAGE: "ubuntu:18.04"
TOOLCHAIN: "clang-6-17"
# ---------------------------------------------------------------------
#
# images with dependencies for building a module
#
# ---------------------------------------------------------------------
dune-pdelab-deps:2.6:
<<: *module-deps-image
variables:
<<: *module-deps-variables
MODULE: pdelab
VERSION: "2.6"
dune-pdelab-deps:git:
<<: *module-deps-image
variables:
<<: *module-deps-variables
MODULE: pdelab
VERSION: "git"
# ---------------------------------------------------------------------
#
# module images
......@@ -288,19 +324,21 @@ dune-fufem:git:
MODULE: fufem
VERSION: "git"
dune-pdelab-deps:2.6:
dune-pdelab:2.6:
<<: *module-image
variables:
<<: *module-variables
MODULE: pdelab-deps
MODULE: pdelab
VERSION: "2.6"
BASE_IMAGE: "dune-pdelab-deps:2.6"
dune-pdelab-deps:git:
dune-pdelab:git:
<<: *module-image
variables:
<<: *module-variables
MODULE: pdelab-deps
MODULE: pdelab
VERSION: "git"
BASE_IMAGE: "dune-pdelab-deps:git"
# ---------------------------------------------------------------------
......
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
ARG DUNECI_PARALLEL
COPY enable-virtualenv /duneci/cmake-flags/
RUN duneci-install-module -b releases/2.6 https://gitlab.dune-project.org/pdelab/dune-pdelab.git \
&& duneci-install-module -b releases/2.6 https://gitlab.dune-project.org/quality/dune-testtools.git
if [[ ${opts_mode} == script ]] ; then
echo "Enabling Python virtualenv in build directory"
echo "This might trigger build failures if your module tries to install non-whitelisted Python packages from PyPi"
fi
CMAKE_FLAGS+=" -DDUNE_PYTHON_VIRTUALENV_SETUP=1"
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
ARG DUNECI_PARALLEL
COPY enable-virtualenv /duneci/cmake-flags/
RUN duneci-install-module https://gitlab.dune-project.org/pdelab/dune-pdelab.git \
&& duneci-install-module https://gitlab.dune-project.org/quality/dune-testtools.git
if [[ ${opts_mode} == script ]] ; then
echo "Enabling Python virtualenv in build directory"
echo "This might trigger build failures if your module tries to install non-whitelisted Python packages from PyPi"
fi
CMAKE_FLAGS+=" -DDUNE_PYTHON_VIRTUALENV_SETUP=1"
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