Commit d7eae279 authored by Lukas Riedel's avatar Lukas Riedel

Merge branch 'master' into feature/parallel-solve

parents 72fc5f03 dc29eddc
......@@ -3,8 +3,10 @@ build-cmake/
# Exclude generated files
doc/manual/config-file.rst
doc/default_files/config.ini
doc/cookbook/1-infiltration-sand/config.ini
doc/cookbook/3-random-field/*.ini
python/dorie/wrapper/pf_from_file.py
python/dorie/wrapper/test_dorie.py
python/dorie/dorie/cli/cmds.py
test/maps/cell_ids.h5
......
variables:
DUNE_CONTROL_PATH: /opt/dune:$CI_PROJECT_DIR
DUNE_DIR: /opt/dune
DUNE_CONTROL_PATH: $DUNE_DIR:$CI_PROJECT_DIR
DUNECONTROL: ./dune-common/bin/dunecontrol
CPUS_MULTICORE: 4
CPUS_DIND: 2
......@@ -10,7 +11,8 @@ variables:
BASE_IMAGE: dorie/dune-env
# Use semantic versioning (not the version of DUNE) and bump according to
# to whether changes are backwards-compatible or not.
IMAGE_VERSION: "1.2"
# NOTE: Update the default value in the Dockerfiles accordingly!
IMAGE_VERSION: "1.3"
DUNE_ENV_IMAGE: ${BASE_IMAGE}:img-v${IMAGE_VERSION}
CMAKE_FLAGS:
......@@ -22,10 +24,38 @@ variables:
-j $CPUS_MULTICORE
RUN_IN_DUNE_ENV: $CI_PROJECT_DIR/build-cmake/run-in-dune-env
# Documentation server configuration
DOC_HOST: root@hermes.iup.uni-heidelberg.de
DOC_PORT: 2345 # ... forwards to utopia_doc_server container. root ok ;)
DOC_REMOTE_BASE_DIR: /var/dorie_doc
DOC_REMOTE_PATH: $DOC_REMOTE_BASE_DIR/$CI_COMMIT_REF_SLUG
image: $DUNE_ENV_IMAGE
# Move into top-level DUNE directory
before_script:
- cd /opt/dune
- cd $DUNE_DIR
# Provide SSH access via the SSH_PRIVATE_KEY and SSH_KNOWN_HOSTS variables
.ssh-access: &ssh_access
before_script:
# Run ssh-agent (inside the build environment)
- eval $(ssh-agent -s)
# Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
# We're using tr to fix line endings which makes ed25519 keys work
# without extra base64 encoding.
# https://gitlab.com/gitlab-examples/ssh-private-key/issues/1#note_48526556
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
# Create the SSH directory and give it the right permissions
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
# Add the known hosts lists to ensure this ssh connection is the right one
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
stages:
- setup
......@@ -95,12 +125,16 @@ prep:update-dune-clang:
# --- Build jobs ---
build:system-tests: &build-tests
stage: build
tags:
- multicore
# Reduce concurrent jobs due to RAM limitations
variables:
MAKE_FLAGS: -j 2
script:
- CMAKE_FLAGS="$CMAKE_FLAGS"
- CMAKE_FLAGS="$CMAKE_FLAGS -DCOVERAGE_REPORT=On"
$DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make $MAKE_FLAGS dorie-rfg
- $DUNECONTROL --only=dorie make $MAKE_FLAGS build_system_tests
- $DUNECONTROL --only=dorie make doc
artifacts:
name: "$CI_JOB_NAME"
paths:
......@@ -110,27 +144,34 @@ build:system-tests: &build-tests
build:unit-tests:
<<: *build-tests
script:
- CMAKE_FLAGS="$CMAKE_FLAGS
-DCMAKE_BUILD_TYPE=Debug"
- CMAKE_FLAGS="$CMAKE_FLAGS -DCOVERAGE_REPORT=On
-DCMAKE_BUILD_TYPE=None"
$DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make $MAKE_FLAGS build_unit_tests
build:debug: &debug
stage: build
tags:
- multicore
allow_failure: true
script:
before_script:
- cd $DUNE_DIR
- CMAKE_FLAGS="
$CMAKE_FLAGS
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_CXX_FLAGS_DEBUG='-Werror'"
$DUNECONTROL --only=dorie configure
script:
- $DUNECONTROL --only=dorie make $MAKE_FLAGS dorie-rfg
- $DUNECONTROL --only=dorie make $MAKE_FLAGS build_unit_tests
- $DUNECONTROL --only=dorie make $MAKE_FLAGS richards_d2_r1 transport_d2_r0_t0
build:debug-clang:
<<: *debug
image: ${DUNE_ENV_IMAGE}-clang
script:
before_script:
- cd $DUNE_DIR
# Choose Clang compiler explicitly
- CMAKE_FLAGS="
$CMAKE_FLAGS
-DCMAKE_BUILD_TYPE=Debug
......@@ -138,59 +179,88 @@ build:debug-clang:
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_CXX_FLAGS_DEBUG='-Werror'"
$DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make $MAKE_FLAGS dorie-rfg
- $DUNECONTROL --only=dorie make $MAKE_FLAGS build_unit_tests
build:docs:
stage: build
script:
- CMAKE_FLAGS="$CMAKE_FLAGS"
$DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make doc
artifacts:
name: "$CI_JOB_NAME"
paths:
- $CI_PROJECT_DIR/build-cmake/doc
expire_in: 1 day
# --- Tests ---
test:system-tests: &test
stage: test
dependencies:
- build:system-tests
needs: ["build:system-tests"]
variables:
GCOVR_PATHS:
--root $CI_PROJECT_DIR
--exclude $CI_PROJECT_DIR/dune/dorie/test
--exclude $CI_PROJECT_DIR/plugins
script:
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make system_tests
# Run coverage utility (will also run after failed job)
after_script:
- source $CI_PROJECT_DIR/build-cmake/activate
- pip3 install gcovr
- cd $CI_PROJECT_DIR/build-cmake
- mkdir coverage
- gcovr $GCOVR_PATHS --html --html-details -o coverage/report.html
# run again for coverage report in GitLab
- gcovr $GCOVR_PATHS
coverage: '/^TOTAL.*\s+(\d+\%)$/'
artifacts:
name: "$CI_JOB_NAME"
paths:
- $CI_PROJECT_DIR/build-cmake/test
- $CI_PROJECT_DIR/build-cmake/coverage
expire_in: 1 day
test:unit-tests:
<<: *test
dependencies:
- build:unit-tests
needs: ["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
- cd $CI_PROJECT_DIR/build-cmake
- mkdir -p dune/dorie/test/coverage
- ./run-in-dune-env gcovr
--root ../
--exclude ../dune/dorie/test
--exclude ../plugins
--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
--exclude ../plugins
coverage: '/^TOTAL.*\s+(\d+\%)$/'
artifacts:
name: "$CI_JOB_NAME"
paths:
- $CI_PROJECT_DIR/build-cmake/dune/dorie/test
- $CI_PROJECT_DIR/build-cmake/coverage
expire_in: 1 day
test:examples:
stage: test
dependencies:
- build:system-tests
needs: ["build:system-tests"]
only:
- schedules
- master@dorie/dorie
script:
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make example_tests
artifacts:
name: "$CI_JOB_NAME"
paths:
- $CI_PROJECT_DIR/build-cmake/doc
expire_in: 1 day
test:python-tests:
<<: *test
dependencies: []
# TODO: Make empty once https://gitlab.com/gitlab-org/gitlab/issues/30631
# is resolved
needs: ["build:docs"] # Any quick job from previous stage
script:
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make test_python
......@@ -212,9 +282,12 @@ deploy:dockerhub-devel: &deploy
- $DOCKER_LOGIN
script:
- docker build -f docker/dorie.dockerfile
--build-arg DUNE_ENV_IMAGE=$DUNE_ENV_IMAGE --build-arg PROCNUM=$CPUS_DIND
--build-arg BASE_IMG_VERSION=$IMAGE_VERSION --build-arg PROCNUM=$CPUS_DIND
-t dorie/dorie:devel .
- docker push dorie/dorie:devel
environment:
name: docker/devel
url: https://hub.docker.com/r/dorie/dorie
deploy:dockerhub-stable:
<<: *deploy
......@@ -222,29 +295,55 @@ deploy:dockerhub-stable:
- tags@dorie/dorie
script:
- docker build -f docker/dorie.dockerfile
--build-arg DUNE_ENV_IMAGE=$DUNE_ENV_IMAGE --build-arg PROCNUM=$CPUS_DIND
--build-arg BASE_IMG_VERSION=$IMAGE_VERSION --build-arg PROCNUM=$CPUS_DIND
-t dorie/dorie:$CI_COMMIT_TAG .
- docker push dorie/dorie:$CI_COMMIT_TAG
environment:
name: docker/$CI_COMMIT_TAG
url: https://hub.docker.com/r/dorie/dorie
deploy:sphinx-docs:
deploy:docs:
stage: deploy
only:
- tags@dorie/dorie
- branches@dorie/dorie
dependencies:
- build:system-tests
before_script:
# install the netfly CLI
- apt-get install -y golang-go golang-glide
- go get -d github.com/netlify/netlifyctl
- cd $HOME/go/src/github.com/netlify/netlifyctl/
- make deps build
- go install
- cd $HOME/go/bin
script:
- ./netlifyctl deploy
-A $NETFLY_DEPLOY_TOKEN
-s $NETFLY_SITE_ID
-P $CI_PROJECT_DIR/build-cmake/doc/html
- build:docs
needs: ["build:docs"]
<<: *ssh_access
script:
# Create the directory on the remote, removing any prior version
- echo "Creating remote directory $DOC_REMOTE_PATH ..."
- ssh -p $DOC_PORT $DOC_HOST "rm -rf $DOC_REMOTE_PATH"
- ssh -p $DOC_PORT $DOC_HOST "mkdir -p $DOC_REMOTE_PATH/doxygen/"
# Copy sphinx & doxygen HTML documentation to remote
- cd build-cmake/doc
- echo "Uploading documentation to $DOC_REMOTE_PATH/ ..."
- scp -P $DOC_PORT -pr html $DOC_HOST:$DOC_REMOTE_PATH/
- scp -P $DOC_PORT -pr doxygen/html $DOC_HOST:$DOC_REMOTE_PATH/doxygen/
environment:
name: docs/$CI_COMMIT_REF_NAME
url: https://hermes.iup.uni-heidelberg.de/dorie_doc/$CI_COMMIT_REF_SLUG/html/
on_stop: deploy:stop_docs
# This job is called when the environment is stopped, which automatically
# happens when the respective branch is deleted
deploy:stop_docs:
stage: deploy
when: manual
variables:
# Stop GitLab from checking out the commit again (branch is deleted)
GIT_STRATEGY: none
dependencies: []
needs: ["build:docs"]
<<: *ssh_access
script:
- echo "Removing remote directory $DOC_REMOTE_PATH ..."
- ssh -p $DOC_PORT $DOC_HOST "rm -rf $DOC_REMOTE_PATH"
environment:
name: sphinx-docs
url: https://dorie-doc.netlify.com/
name: docs/$CI_COMMIT_REF_NAME
action: stop
(One-sentence description of what kind of bug you would like to report)
_One-sentence description of what kind of bug you would like to report_
#### Summary
(Summarise the encountered bug concisely)
### Summary
_Summarise the encountered bug concisely_
#### Steps to reproduce
(How can this be reproduced? If you can, point to specific files/configurations where the bug occurs)
### Steps to reproduce
_How can this be reproduced? If you can, point to specific files/configurations where the bug occurs_
#### What is the current _bug_ behaviour?
(More about the behaviour of the bug)
### What is the current _bug_ behaviour?
_More about the behaviour of the bug_
#### What is the expected _correct_ behaviour?
(Which behaviour would you have expected?)
### What is the expected _correct_ behaviour?
_Which behaviour would you have expected?_
#### Relevant logs, screenshots, files...?
(Anything that helps reproducing the bug)
### Relevant logs, screenshots, files...?
_Anything that helps reproducing the bug_
<!-- Put very long log outputs within the <pre></pre> tags below -->
<!-- If this doesn't apply, delete the whole <details></details> block -->
......@@ -28,8 +28,21 @@
</pre>
</details>
#### Reproducing input
_Do you have input files reproducing the problem? Insert them here:_
#### Ideas how to fix this?
(Add them here, if you have any.)
| Input data | |
| - | - |
| Simulation Case | _Description goes here_ |
| PFG config file | _if any_ |
| Grid mapping file | _if any_ |
| GMSH grid file | _if any_ |
| Boundary Condition file | |
| Parameterization file | |
| Run config file | |
/label ~bug
\ No newline at end of file
### Ideas how to fix this?
_Add them here, if you have any._
/label ~Bug
<!-- _Set the title to: "Patch Release: X.Y.Z" -->
<!-- Replace X.Y.Z with the actual version numbers everywhere -->
We're releasing patch version `X.Y.Z` for branch `X.Y-stable`! :tada:
### 1 — List of MRs to be Included
List the MRs and the commit SHA of their respective merge commits here.
Placing them in chronological order here ensures fewer issues when
cherry-picking them!
The MRs are indicated by the ~"Pick into X.Y" label.
| MR | Merge Commit SHA |
| -- | ---------------- |
| ! | ... |
### 2 — On GitLab
Use the "patch-release" template for creating a new Merge Request.
- [ ] [Create a branch][new branch] `X.Y-patch` from `X.Y-stable`
- [ ] [Create a Merge Request][new mr] with source branch `X.Y-patch` and
target branch `X.Y-stable`: !
- [ ] Merge this MR: !
- [ ] [Create tag][new tag] `X.Y.Z` from branch `X.Y-stable`
- Message:
```
Version X.Y.Z (YYYY-MM-DD)
```
- Release Notes:
```
# Version X.Y.Z (YYYY-MM-DD)
-> Copy appropriate entries from MR changelog here <-
```
- [ ] Update "Release" [project badge][badge] <!-- only if applicable -->
### 3 — On Docker Hub
- [ ] Update [description on DockerHub][DockerHub description]
- [ ] Push new `latest` tag to DockerHub <!-- only if applicable -->
### 4 — All done? :white_check_mark:
Close this issue!
/label ~Release
[new branch]: https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/-/branches/new
[new mr]: https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/merge_requests/new
[new tag]: https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/-/tags/new
[DockerHub description]: https://hub.docker.com/r/dorie/dorie
[badge]: https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/edit
......@@ -8,7 +8,7 @@
### Related issues
See #...
See #
<!--
PLEASE READ THIS
......
<!-- _Set the title to: "Release: X.Y.0" -->
<!-- Replace X.Y with the actual version numbers everywhere -->
We're rolling out version `X.Y.0`! :tada:
### 1 — In the Code
- [ ] [Create branch][new branch] `X.Y-release` from `master`.
- [ ] *(Insert MR here)*: Merge `X.Y-release` into `master`. Use the
`pre-release` MR description template.
### 2 — On GitLab
- [ ] [Create branch][new branch] `X.Y-stable` from `master`
- [ ] [Create label][new label] ~"Pick into X.Y"
- [ ] [Create tag][new tag] `X.Y.0` from branch `X.Y-stable`
- Message:
```
Version X.Y.0 (YYYY-MM-DD)
```
- Release Notes:
```
# Version X.Y.0 (YYYY-MM-DD)
-> Insert version changelog here! <-
```
Shortcut to the most up-to-date [CHANGELOG.md][changelog]
- [ ] Update "Release" [project badge][badge] <!-- only if applicable -->
### 3 — In the Code
- [ ] *(Insert MR here)*: Merge `X.Y-release` into `master`. Use the
`post-release` description template.
### 4 — On Docker Hub
- [ ] Update [description on DockerHub][DockerHub description]
- [ ] Push new `latest` tag to DockerHub <!-- only if applicable -->
### 5 — All done? :white_check_mark:
Close this issue!
/label ~Release
[new branch]: https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/-/branches/new
[new tag]: https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/-/tags/new
[changelog]: https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/blob/master/CHANGELOG.md
[new label]: https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/-/labels/new
[DockerHub description]: https://hub.docker.com/r/dorie/dorie
[badge]: https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/edit
### What does this MR do?
_Fill this in_
### Is there something that needs to be double checked?
<!-- Is there something a reviewer should look out for _especially_? -->
_Fill this in_
### Can this MR be accepted?
- [ ] Implemented ...
- [ ] Added test to ...
- ...
- [ ] Pipeline passing
- [ ] ...
- [ ] Added/Updated tests:
- [ ] ...
- [ ] Added/Updated documentation
- [ ] Pipeline passing <!-- please check for new warnings -->