Added iwyu jobs

This commit is contained in:
Johannes Lenzen
2021-01-05 11:09:54 +01:00
parent 87f2365d20
commit bd0ac33bb4
6 changed files with 63 additions and 3 deletions

2
.gitignore vendored
View File

@@ -6,3 +6,5 @@ build*
.settings .settings
# ignore mac temporal files # ignore mac temporal files
.DS_Store .DS_Store
.idea
cmake-build*/

View File

@@ -321,6 +321,22 @@ test-release-clang-cpp14:
#----------- Job Informations:
# Type: Build: release
# OS: Linux
# Compiler: clang
# Language: cpp14
build-release-clang-cpp14:
stage: build
script: "CI/ci-linux-build.sh clang cpp14 release IWYU"
image: graphics.rwth-aachen.de:4567/docker/docker/docker-openmesh-container
tags: [Docker]
artifacts:
paths:
- build-clang-cpp14-release-Vector-Checks/compile_commands.json
- build-clang-cpp14-release-Vector-Checks/iwyu.dump
# ----------------- # -----------------
# MAC tasks # MAC tasks
# ----------------- # -----------------

View File

@@ -31,7 +31,25 @@ cd build-$BUILDPATH-Vector-Checks
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON $OPTIONS ../ cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON $OPTIONS ../
#build it if [ "$IWYU" == "IWYU" ]; then
make $MAKE_OPTIONS # do iwyu check
if echo $(iwyu --version) | grep -q "0.11"
then
# support older tool version
iwyu_tool -j 4 -p . -- \
--mapping_file=/usr/share/include-what-you-use/gcc.libc.imp \
--mapping_file=/usr/share/include-what-you-use/clang-6.intrinsics.imp \
| tee iwyu.dump
else
# current tool version
iwyu_tool -j 4 -p . -- \
-Xiwyu --mapping_file=/usr/share/include-what-you-use/gcc.libc.imp \
-Xiwyu --mapping_file=/usr/share/include-what-you-use/clang-6.intrinsics.imp \
| tee iwyu.dump
fi
else
# build it
make $MAKE_OPTIONS
fi
cd .. cd ..

View File

@@ -3,6 +3,7 @@
COMPILER=$1 COMPILER=$1
LANGUAGE=$2 LANGUAGE=$2
BUILD_TYPE=$3 BUILD_TYPE=$3
IWYU=$4
# Exit script on any error # Exit script on any error
set -e set -e
@@ -57,3 +58,9 @@ else
export BUILD_TYPE=debug export BUILD_TYPE=debug
BUILDPATH="$BUILDPATH-debug" BUILDPATH="$BUILDPATH-debug"
fi fi
if [ "$IWYU" == "IWYU" ]; then
echo "Include what you use enabled.";
BUILDPATH="$BUILDPATH-iwyu"
OPTIONS="$OPTIONS -DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
fi

View File

@@ -0,0 +1,15 @@
#----------- Job Informations:
# Type: Build: {{BUILDTYPE}}
# OS: Linux
# Compiler: {{COMPILER}}
# Language: {{LANGUAGE}}
build-{{BUILDTYPE}}-{{COMPILER}}-{{LANGUAGE}}:
stage: build
script: "CI/ci-linux-build.sh {{COMPILER}} {{LANGUAGE}} {{BUILDTYPE}} IWYU"
image: graphics.rwth-aachen.de:4567/docker/docker/docker-openmesh-container
tags: [Docker]
artifacts:
paths:
- build-{{COMPILER}}-{{LANGUAGE}}-{{BUILDTYPE}}-Vector-Checks/compile_commands.json
- build-{{COMPILER}}-{{LANGUAGE}}-{{BUILDTYPE}}-Vector-Checks/iwyu.dump

View File

@@ -16,3 +16,5 @@ cppcheck:
{linux-template-job.yml, COMPILER=clang, LANGUAGE=cpp11} {linux-template-job.yml, COMPILER=clang, LANGUAGE=cpp11}
{linux-template-job.yml, COMPILER=gcc, LANGUAGE=cpp14} {linux-template-job.yml, COMPILER=gcc, LANGUAGE=cpp14}
{linux-template-job.yml, COMPILER=clang, LANGUAGE=cpp14} {linux-template-job.yml, COMPILER=clang, LANGUAGE=cpp14}
{linux-iwyu-job.yml, BUILDTYPE=release, COMPILER=clang, LANGUAGE=cpp14}