Commit 6984a41a authored by Ansgar Burchardt's avatar Ansgar Burchardt

build DUNE modules in parallel when building Docker images

parent 354e9990
...@@ -98,21 +98,21 @@ dune:2.5: ...@@ -98,21 +98,21 @@ dune:2.5:
dune:git: dune:git:
stage: stage2 stage: stage2
script: script:
- ./bin/duneci-build-docker-image --no-cache duneci/dune:git dune-git - ./bin/duneci-build-docker-image --parallel --no-cache duneci/dune:git dune-git
only: only:
- master@ansgar/dune-docker - master@ansgar/dune-docker
dune-fufem:2.4: dune-fufem:2.4:
stage: stage3 stage: stage3
script: script:
- ./bin/duneci-build-docker-image duneci/dune-fufem:2.4 dune-fufem - ./bin/duneci-build-docker-image --parallel duneci/dune-fufem:2.4 dune-fufem
only: only:
- master@ansgar/dune-docker - master@ansgar/dune-docker
dune-fufem:git: dune-fufem:git:
stage: stage3 stage: stage3
script: script:
- ./bin/duneci-build-docker-image --no-cache duneci/dune-fufem:git dune-fufem-git - ./bin/duneci-build-docker-image --parallel --no-cache duneci/dune-fufem:git dune-fufem-git
only: only:
- master@ansgar/dune-docker - master@ansgar/dune-docker
......
...@@ -27,8 +27,14 @@ if [[ $# -lt 2 ]]; then ...@@ -27,8 +27,14 @@ if [[ $# -lt 2 ]]; then
usage usage
fi fi
parallel=
while :; do while :; do
case "${1}" in case "${1}" in
--parallel)
parallel=1
shift
;;
-*) -*)
docker_opts+=("${1}") docker_opts+=("${1}")
shift shift
...@@ -41,6 +47,10 @@ done ...@@ -41,6 +47,10 @@ done
image="${1}"; shift image="${1}"; shift
if [[ -n "${parallel}" -a -v DUNECI_PARALLEL ]]; then
docker_opts+=(--build-arg=DUNECI_PARALLEL="${DUNECI_PARALLEL}")
fi
builddir="build/${image##*/}" builddir="build/${image##*/}"
if [[ -e ${builddir} ]]; then if [[ -e ${builddir} ]]; then
echo "E: ${builddir} already exists" >&2 echo "E: ${builddir} already exists" >&2
......
FROM duneci/dune:git FROM duneci/dune:git
ARG DUNECI_PARALLEL
USER duneci USER duneci
WORKDIR /duneci/modules WORKDIR /duneci/modules
......
FROM duneci/dune:2.4 FROM duneci/dune:2.4
ARG DUNECI_PARALLEL
USER root USER root
WORKDIR / WORKDIR /
......
FROM duneci/base:9 FROM duneci/base:9
ARG DUNECI_PARALLEL
USER duneci USER duneci
RUN duneci-install-module https://gitlab.dune-project.org/core/dune-common.git \ RUN duneci-install-module https://gitlab.dune-project.org/core/dune-common.git \
......
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