Commit 380e9be6 authored by Lukas Riedel's avatar Lukas Riedel

Refactor gitlab-ci.yml

* Add variables for CMAKE_FLAGS, MAKE_FLAGS, and dunecontrol
* rename build:execute_commands to build:exec_cmds
parent 0d2cdc33
......@@ -2,6 +2,12 @@ image: dorie/dune-env:2.5.1
variables:
DUNE_CONTROL_PATH: /opt/dune:$CI_PROJECT_DIR
DUNECONTROL: ./dune-common/bin/dunecontrol
CMAKE_FLAGS:
-DDUNE_PYTHON_VIRTUALENV_SETUP=True
-DDUNE_PYTHON_ALLOW_GET_PIP=True
MAKE_FLAGS:
-j 2
before_script:
- cd /opt/dune
......@@ -14,7 +20,9 @@ stages:
build:main:
stage: build
script:
- CMAKE_FLAGS="-DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" MAKE_FLAGS="-j 2" ./dune-common/bin/dunecontrol --only=dorie all
- CMAKE_FLAGS="$CMAKE_FLAGS"
MAKE_FLAGS="$MAKE_FLAGS"
$DUNECONTROL --only=dorie all
artifacts:
name: "$CI_JOB_NAME"
paths:
......@@ -26,9 +34,10 @@ build:update_dune:
only:
- master
script:
- ./dune-common/bin/dunecontrol update
- ./dune-common/bin/dunecontrol exec "rm -rf build-cmake"
- CMAKE_FLAGS="-DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" MAKE_FLAGS="-j 2" ./dune-common/bin/dunecontrol --module=dorie all
- $DUNECONTROL update
- CMAKE_FLAGS="$CMAKE_FLAGS"
MAKE_FLAGS="$MAKE_FLAGS"
$DUNECONTROL --module=dorie all
artifacts:
name: "$CI_JOB_NAME"
paths:
......@@ -39,20 +48,20 @@ build:debug:
stage: build
allow_failure: true
script:
- CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Debug
-DDUNE_PYTHON_VIRTUALENV_SETUP=True
-DDUNE_PYTHON_ALLOW_GET_PIP=True
-DCMAKE_CXX_FLAGS_DEBUG='-Werror'"
MAKE_FLAGS="-j 2"
./dune-common/bin/dunecontrol --only=dorie all
- CMAKE_FLAGS="
$CMAKE_FLAGS
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_CXX_FLAGS_DEBUG='-Werror'"
MAKE_FLAGS="$MAKE_FLAGS"
$DUNECONTROL --only=dorie all
test:execute_commands:
test:exec_cmds:
stage: test
dependencies:
- build:main
script:
- ./dune-common/bin/dunecontrol --only=dorie configure
- ./dune-common/bin/dunecontrol --only=dorie make test_dorie_exec
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make test_dorie_exec
artifacts:
name: "$CI_JOB_NAME"
paths:
......@@ -64,8 +73,8 @@ test:ode:
dependencies:
- build:main
script:
- ./dune-common/bin/dunecontrol --only=dorie configure
- ./dune-common/bin/dunecontrol --only=dorie make test_run_ode
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make test_run_ode
artifacts:
name: "$CI_JOB_NAME"
paths:
......@@ -79,8 +88,8 @@ test:ode-update_dune:
only:
- master
script:
- ./dune-common/bin/dunecontrol --only=dorie configure
- ./dune-common/bin/dunecontrol --only=dorie make test_run_ode
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make test_run_ode
artifacts:
name: "$CI_JOB_NAME"
paths:
......@@ -92,8 +101,8 @@ deploy:build_docs:
dependencies:
- build:main
script:
- ./dune-common/bin/dunecontrol --only=dorie configure
- ./dune-common/bin/dunecontrol --only=dorie make doc
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make doc
artifacts:
name: "$CI_JOB_NAME"
paths:
......
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