Commit 6546e7bd authored by Lukas Riedel's avatar Lukas Riedel 📝

Merge branch 'master' into h5file-cleanup

parents 8976d629 a7372802
......@@ -2,7 +2,7 @@ variables:
DUNE_CONTROL_PATH: /opt/dune:$CI_PROJECT_DIR
DUNECONTROL: ./dune-common/bin/dunecontrol
CPUS_MULTICORE: 4
CPUS_DIND: 3
CPUS_DIND: 2
DOCKER_LOGIN:
docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_PW
DUNE_ENV_IMAGE:
......@@ -10,6 +10,8 @@ variables:
CMAKE_FLAGS:
-DDUNE_PYTHON_VIRTUALENV_SETUP=True
-DDUNE_PYTHON_ALLOW_GET_PIP=True
MAKE_FLAGS:
-j $CPUS_MULTICORE
RUN_IN_DUNE_ENV: $CI_PROJECT_DIR/build-cmake/run-in-dune-env
image: $DUNE_ENV_IMAGE
......@@ -87,7 +89,7 @@ build:system-tests: &build-tests
script:
- CMAKE_FLAGS="$CMAKE_FLAGS"
$DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make build_system_tests
- $DUNECONTROL --only=dorie make $MAKE_FLAGS build_system_tests
- $DUNECONTROL --only=dorie make doc
artifacts:
name: "$CI_JOB_NAME"
......@@ -101,7 +103,7 @@ build:unit-tests:
- CMAKE_FLAGS="$CMAKE_FLAGS
-DCMAKE_BUILD_TYPE=Debug"
$DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make build_unit_tests
- $DUNECONTROL --only=dorie make $MAKE_FLAGS build_unit_tests
build:debug: &debug
stage: build
......@@ -112,7 +114,7 @@ build:debug: &debug
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_CXX_FLAGS_DEBUG='-Werror'"
$DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make build_unit_tests
- $DUNECONTROL --only=dorie make $MAKE_FLAGS build_unit_tests
build:debug-clang:
<<: *debug
......@@ -125,60 +127,32 @@ build:debug-clang:
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_CXX_FLAGS_DEBUG='-Werror'"
$DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make build_unit_tests
- $DUNECONTROL --only=dorie make $MAKE_FLAGS build_unit_tests
# --- Tests ---
test:st:exec_cmds: &test
test:system-tests: &test
stage: test
dependencies:
- build:system-tests
script:
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make test_dorie_exec
- $DUNECONTROL --only=dorie make system_tests
artifacts:
name: "$CI_JOB_NAME"
paths:
- $CI_PROJECT_DIR/build-cmake/test
expire_in: 1 day
test:st:ode:
<<: *test
script:
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make test_run_ode
test:parallel:
<<: *test
dependencies:
- build:system-tests
- build:unit-tests
tags:
- multicore
script:
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make unit_tests_parallel
- $DUNECONTROL --only=dorie make test_run_parallel
test:st:reference:
<<: *test
script:
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make test_run_ref
test:st:mass_conserve:
<<: *test
script:
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make test_mass_conservation
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"
# perform the tests
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make unit_tests
# report coverage
......@@ -186,11 +160,13 @@ test:unit-tests:
- mkdir -p dune/dorie/test/coverage
- ./run-in-dune-env gcovr
--root ../
--exclude ../dune/dorie/test
--html --html-details
-o dune/dorie/test/coverage/coverage.html
# run again for coverage report in GitLab
- ./run-in-dune-env gcovr
--root ../
--exclude ../dune/dorie/test
coverage: '/^TOTAL.*\s+(\d+\%)$/'
artifacts:
name: "$CI_JOB_NAME"
......
......@@ -145,14 +145,6 @@ If you installed [Anaconda](https://conda.io/docs/user-guide/install/download.ht
HDF5_ROOT=/usr/local
to the `CMAKE_FLAGS` in the call to `dunecontrol` above.
5. After a successful build you can call the `dorie` wrapper located in `dorie/build-cmake/bin` from anywhere on your machine, but it is more handy to add this location to your search path. You can add the directory to your `PATH` variable by calling
PATH=<path/to/>dorie/build-cmake/bin:$PATH
However, this will only last for your current terminal session. Another option is to add this path permanently in your shell configuration file.
**Installing DUNE and DORiE via `make install` into your usual work environment is strongly discouraged!**
### Experimental Features
The local operator implementing Richards equation's discretization supports
......
......@@ -3,9 +3,6 @@ add_custom_target(build_unit_tests)
add_custom_target(unit_tests
COMMAND ctest --output-on-failure --tests-regex ^ut.+$
)
add_custom_target(unit_tests_parallel
COMMAND ctest --output-on-failure --tests-regex ^par-ut.+$
)
# Add the system test build target and test command
add_custom_target(build_system_tests)
......@@ -19,7 +16,6 @@ add_custom_target(prepare_testing
)
add_dependencies(system_tests prepare_testing)
add_dependencies(unit_tests prepare_testing)
add_dependencies(unit_tests_parallel prepare_testing)
#
# .. cmake_function:: add_coverage_links
......
......@@ -34,7 +34,7 @@ add_dependencies(test_grid_creator prepare_testing)
# run two tests in parallel
dune_add_test(
NAME par-ut-test-grid-creation-1
NAME ut-test-grid-creation-1
TARGET ${gc_target}
COMMAND --allow-run-as-root ${gc_target}
MPI_RANKS 2
......@@ -42,7 +42,7 @@ dune_add_test(
CMD_ARGS ${CMAKE_CURRENT_BINARY_DIR}/gc_files_0002.ini
)
dune_add_test(
NAME par-ut-test-grid-creation-2
NAME ut-test-grid-creation-2
TARGET ${gc_target}
COMMAND --allow-run-as-root ${gc_target}
MPI_RANKS 2
......
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