mirror of
https://git.gfz-potsdam.de/naaice/tug.git
synced 2025-12-15 10:28:23 +01:00
Refactor testDiffusion.cpp and Diffusion.hpp to improve code readability and maintainability. Remove unnecessary exception throwing and replace with assert statements for invalid arguments.
51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
image: gcc:14
|
|
|
|
before_script:
|
|
- apt-get update && apt-get install -y cmake ninja-build libeigen3-dev git
|
|
|
|
stages:
|
|
- test
|
|
- static_analyze
|
|
- doc
|
|
|
|
test:
|
|
stage: test
|
|
script:
|
|
- mkdir build && cd build
|
|
- cmake -DCMAKE_BUILD_TYPE=Debug -DTUG_ENABLE_TESTING=ON -G Ninja ..
|
|
- ninja
|
|
- ctest --output-junit test_results.xml
|
|
artifacts:
|
|
when: always
|
|
paths:
|
|
- build/test_results.xml
|
|
reports:
|
|
junit: build/test_results.xml
|
|
|
|
pages:
|
|
stage: doc
|
|
image: python:slim
|
|
before_script:
|
|
- apt-get update && apt-get install --no-install-recommends -y graphviz imagemagick doxygen make
|
|
- pip install --upgrade pip && pip install Sphinx Pillow breathe sphinx-rtd-theme m2r2
|
|
- mkdir public
|
|
script:
|
|
- pushd docs_sphinx
|
|
- make html
|
|
- popd && mv docs_sphinx/_build/html/* public/
|
|
artifacts:
|
|
paths:
|
|
- public
|
|
rules:
|
|
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
|
|
|
lint:
|
|
stage: static_analyze
|
|
before_script:
|
|
- apk add clang-extra-tools openmp-dev
|
|
script:
|
|
- mkdir lint && cd lint
|
|
- cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-checks=cppcoreguidelines-*,clang-analyzer-*,performance-*" -DTUG_ENABLE_TESTING=OFF ..
|
|
- make tug
|
|
when: manual
|