Commit 937482a4 authored by Lukas Riedel's avatar Lukas Riedel

Update pipeline to include system and unit tests. Add coverage.

parent cd25523b
......@@ -81,12 +81,12 @@ prep:update-dune-clang:
# --- Build jobs ---
build:main:
build:system-tests: &build-tests
stage: build
script:
- CMAKE_FLAGS="$CMAKE_FLAGS"
$DUNECONTROL --only=dorie all
- $DUNECONTROL --only=dorie make build_tests
$DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make build_system_tests
- $DUNECONTROL --only=dorie make doc
artifacts:
name: "$CI_JOB_NAME"
......@@ -94,6 +94,14 @@ build:main:
- $CI_PROJECT_DIR/build-cmake
expire_in: 1 day
build:unit-tests:
<<: *build-tests
script:
- CMAKE_FLAGS="$CMAKE_FLAGS
-DCMAKE_BUILD_TYPE=Debug"
$DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make build_unit_tests
build:debug: &debug
stage: build
allow_failure: true
......@@ -103,7 +111,7 @@ build:debug: &debug
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_CXX_FLAGS_DEBUG='-Werror'"
$DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make dorie_mass_conservation
- $DUNECONTROL --only=dorie make build_unit_tests
build:debug-clang:
<<: *debug
......@@ -116,14 +124,14 @@ build:debug-clang:
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_CXX_FLAGS_DEBUG='-Werror'"
$DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make dorie_mass_conservation
- $DUNECONTROL --only=dorie make build_unit_tests
# --- Tests ---
test:exec_cmds: &test
test:st-exec_cmds: &test
stage: test
dependencies:
- build:main
- build:system-tests
script:
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make test_dorie_exec
......@@ -133,13 +141,13 @@ test:exec_cmds: &test
- $CI_PROJECT_DIR/build-cmake/test
expire_in: 1 day
test:ode:
test:st-ode:
<<: *test
script:
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make test_run_ode
test:parallel:
test:st-parallel:
<<: *test
tags:
- multicore
......@@ -147,24 +155,31 @@ test:parallel:
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make test_run_parallel
test:reference:
test:st-reference:
<<: *test
script:
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make test_run_ref
test:mass_conserve:
test:st-mass_conserve:
<<: *test
script:
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make test_mass_conservation
test:new-parameters:
test:unit-tests:
<<: *test
dependencies:
- build:unit-tests
script:
# install coverage reporter
- $DUNECONTROL --only=dorie bexec "run-in-dune-env python3 -m pip install gcovr"
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make test_param
- $DUNECONTROL --only=dorie make unit_tests
# report coverage
- $DUNECONTROL --only=dorie exec "gcovr"
- $DUNECONTROL --only=dorie exec "gcovr --html -o build-cmake/test/coverage.html"
coverage: '/^TOTAL.*\s+(\d+\%)$/'
# --- Deploy jobs ---
deploy:dockerhub-devel: &deploy
......@@ -202,7 +217,7 @@ deploy:sphinx-docs:
only:
- tags@dorie/dorie
dependencies:
- build:main
- build:system-tests
before_script:
# install the netfly CLI
- apt-get install -y golang-go golang-glide
......
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