From 75c999b363b6cc2db6f0a423dc2c9cc4d1434019 Mon Sep 17 00:00:00 2001 From: Soeren Peters <peters@irmb.tu-bs.de> Date: Mon, 8 Mar 2021 15:51:20 +0100 Subject: [PATCH] Remove rebuild job: as the jobs are so fast with gcc and clang we will always rebuild. Remove deployment of gcc compiler warnings to sonarqube, as we are building without warnings. --- .gitlab-ci.yml | 65 ++++++++++------------------------------ sonar-project.properties | 2 -- 2 files changed, 16 insertions(+), 51 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2c0b8503c..303119798 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,7 @@ stages: cache: key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" paths: - - $BUILD_FOLDER + - $CI_PROJECT_DIR/cache artifacts: expire_in: 1 hrs @@ -33,6 +33,9 @@ stages: before_script: - export CC=gcc - export CXX=g++ + - export CCACHE_BASEDIR=$CI_PROJECT_DIR + - export CCACHE_DIR=$CI_PROJECT_DIR/cache + - ccache -s script: - $CXX --version @@ -41,8 +44,9 @@ stages: - mpirun --version - mkdir -p $CI_PROJECT_DIR/$BUILD_FOLDER - cd $CI_PROJECT_DIR/$BUILD_FOLDER + - rm -r -f ./* - cmake .. - --preset=all_make + --preset=all_make_ccache -DBUILD_WARNINGS_AS_ERRORS=ON -DCMAKE_CUDA_ARCHITECTURES=60 - cmake . -LAH @@ -64,42 +68,6 @@ clang_10: - export CC=clang - export CXX=clang++ - -############################################################################### -gcc_9_rebuild: - stage: build - - image: irmb/virtualfluids-deps-ubuntu20.04 - - tags: - - gpu - - linux - - before_script: - - export CCACHE_BASEDIR=$CI_PROJECT_DIR - - export CCACHE_DIR=$CI_PROJECT_DIR/cache - - ccache -s - - script: - - mkdir -p $CI_PROJECT_DIR/build - - cd $CI_PROJECT_DIR/build - - rm -r -f ./* - - cmake .. - --preset=all_make_ccache - -DBUILD_WARNINGS_AS_ERRORS=ON - -DCMAKE_CUDA_ARCHITECTURES=60 - - make -j4 2>&1 | tee gcc_warnings.txt - - ccache -s - - artifacts: - paths: - - build/gcc_warnings.txt - - cache: - key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" - paths: - - $CI_PROJECT_DIR/cache - ############################################################################### msvc_16: stage: build @@ -214,8 +182,7 @@ clang_build_analyzer_clang_10: - mkdir -p $CI_PROJECT_DIR/build - cd $CI_PROJECT_DIR/build - cmake .. - -DBUILD_VF_CPU=ON - -DBUILD_VF_GPU=ON + --preset=all_make -DCMAKE_CUDA_ARCHITECTURES=60 -DCMAKE_CXX_FLAGS=-ftime-trace - ClangBuildAnalyzer --start . @@ -249,8 +216,7 @@ include_what_you_use_clang_10: - mkdir -p $CI_PROJECT_DIR/build - cd $CI_PROJECT_DIR/build - cmake .. - -DBUILD_VF_CPU=ON - -DBUILD_VF_GPU=ON + --preset=all_make -DCMAKE_CUDA_ARCHITECTURES=60 -DBUILD_VF_INCLUDE_WHAT_YOU_USE=ON - make @@ -284,12 +250,12 @@ cppcheck: ############################################################################### # lizard - Cyclomatic Complexity Analyzer -# Ignore warnings is manually set to 191. This job will fail when new warnings are added. +# Allow failure for this job, as lizard is failing when warnings are found. lizard: stage: analyze - only: - - open_source@irmb/VirtualFluids_dev + # only: + # - open_source@irmb/VirtualFluids_dev image: irmb/virtualfluids-python-deps-ubuntu20.04 @@ -304,12 +270,14 @@ lizard: script: - cd $CI_PROJECT_DIR - - lizard -l cpp src/ > lizard.txt --warnings_only --ignore_warnings 400 + - lizard -l cpp src/ > lizard.txt --warnings_only artifacts: paths: - lizard.txt + allow_failure: true + ############################################################################### # code coverage gcov_gcc_9: @@ -373,9 +341,8 @@ clang-tidy: - mkdir -p $CI_PROJECT_DIR/build - cd $CI_PROJECT_DIR/build - cmake .. + --preset=cpu_make -DCMAKE_EXPORT_COMPILE_COMMANDS=ON - -DBUILD_VF_CPU=ON - -DBUILD_VF_GPU=OFF - python3 ../utilities/filterCompileCommands.py compile_commands.json - run-clang-tidy -quiet > clangtidy.txt @@ -402,7 +369,7 @@ sonar-scanner: variables: SONAR_HOST_URL: "http://gitlab-runner01.irmb.bau.tu-bs.de/sonarqube/" - needs: ["cppcheck","clang-tidy","gcov_gcc_9","gcc_9_rebuild"] + needs: ["cppcheck","clang-tidy","gcov_gcc_9"] before_script: - cd /tmp diff --git a/sonar-project.properties b/sonar-project.properties index 79510bce9..572916aab 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -27,8 +27,6 @@ sonar.cxx.clangtidy.reportPath=build/clangtidy.txt sonar.cxx.jsonCompilationDatabase=build/compile_commands.json -sonar.cxx.gcc.reportPath=build/gcc_warnings.txt - #sonar.cxx.valgrind.reportPath sonar.cxx.funccomplexity.threshold=10 -- GitLab