diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 205a2e3..d9f4baf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 1096dd3..ed46443 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -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 $ - DEPENDS testTug -) +add_custom_target( + check + COMMAND $ + DEPENDS testTug) diff --git a/utils/ci.Dockerfile b/utils/ci.Dockerfile new file mode 100644 index 0000000..30ddc7a --- /dev/null +++ b/utils/ci.Dockerfile @@ -0,0 +1,4 @@ +FROM alpine + MAINTAINER Max Luebke + +RUN apk add --no-cache build-base openmp cmake git eigen-dev