Merge branch 'main' of git.gfz-potsdam.de:naaice/tug

This commit is contained in:
Marco De Lucia 2023-07-21 13:20:49 +02:00
commit c8163bb596
3 changed files with 20 additions and 15 deletions

View File

@ -1,4 +1,4 @@
image: sobc/gitlab-ci
image: git.gfz-potsdam.de:5000/naaice/tug:ci
stages:
- build
@ -6,8 +6,6 @@ stages:
- static_analyze
build_release:
before_script:
- apt-get update && apt-get install -y libeigen3-dev git
stage: build
artifacts:
paths:
@ -24,11 +22,11 @@ test:
- ./build/test/testTug
lint:
before_script:
- apt-get update && apt-get install -y libeigen3-dev
stage: static_analyze
before_script:
- apk add clang-extra-tools
script:
- mkdir lint && cd lint
- cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-checks=cppcoreguidelines-*,clang-analyzer-*,performance-*,readability-*, modernize-*" -DTUG_ENABLE_TESTING=OFF ..
- cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-checks=cppcoreguidelines-*,clang-analyzer-*,performance-*, modernize-*" -DTUG_ENABLE_TESTING=OFF ..
- make tug
when: manual

View File

@ -1,17 +1,20 @@
include(FetchContent)
find_library(DOCTEST_LIB doctest)
FetchContent_Declare(
if(NOT DOCTEST_LIB)
include(FetchContent)
FetchContent_Declare(
DocTest
GIT_REPOSITORY https://github.com/doctest/doctest.git
GIT_TAG v2.4.9
)
GIT_TAG v2.4.9)
FetchContent_MakeAvailable(DocTest)
FetchContent_MakeAvailable(DocTest)
endif()
add_executable(testTug setup.cpp testBoundaryCondition.cpp testDiffusion.cpp)
target_link_libraries(testTug doctest tug)
add_custom_target(check
COMMAND $<TARGET_FILE:testTug>
DEPENDS testTug
)
add_custom_target(
check
COMMAND $<TARGET_FILE:testTug>
DEPENDS testTug)

4
utils/ci.Dockerfile Normal file
View File

@ -0,0 +1,4 @@
FROM alpine
MAINTAINER Max Luebke <mluebke@uni-potsdam.de>
RUN apk add --no-cache build-base openmp cmake git eigen-dev