summaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorThomas Holder <thomas@thomas-holder.de>2019-03-02 20:12:42 +0000
committerThomas Holder <thomas@thomas-holder.de>2019-03-02 20:12:42 +0000
commit98d3b1d72e0d2ef2ecf0a5d650f6c1eb1f426377 (patch)
tree70cbea634337ab1e783c986e24c055c11c021afe /.gitlab-ci.yml
parentAfter delete, next selected layer is sibling of equal depth, with preference ... (diff)
downloadinkscape-98d3b1d72e0d2ef2ecf0a5d650f6c1eb1f426377.tar.gz
inkscape-98d3b1d72e0d2ef2ecf0a5d650f6c1eb1f426377.zip
speed up clangtidy job
Diffstat (limited to '')
-rw-r--r--.gitlab-ci.yml18
1 files changed, 18 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 948620ac1..7dd9944b7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -190,9 +190,27 @@ clangtidy:linux:
stage: build
except:
- schedules
+ - branches@inkscape/inkscape
script:
- mkdir -p build && cd build
- cmake .. -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=$PWD/install_dir/ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
+ - git fetch https://gitlab.com/inkscape/inkscape.git
+ # "borrow" a 2geom file to dump header includes
+ - git diff FETCH_HEAD --name-only | grep '^src/.*\.h$' || true | sed 's/^src/#include"../;s/$/"/' | tee ../src/2geom/geom.cpp
+ - git diff FETCH_HEAD --name-only | grep '^src/.*\.cpp$' | tee clang_tidy_files
+ - run-clang-tidy -fix -header-filter='.*' $(cat clang_tidy_files) > /dev/null
+ # revert all fixes in protected directories
+ - git checkout ../src/3rdparty/ ../src/2geom/
+ - git diff | tee clang_tidy_diff
+ - if [[ -s clang_tidy_diff ]]; then false; fi
+
+clangtidyfull:linux:
+ stage: build
+ only:
+ - branches@inkscape/inkscape
+ script:
+ - mkdir -p build && cd build
+ - cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- run-clang-tidy -fix -header-filter='.*' > /dev/null && git checkout ../src/3rdparty/ ../src/2geom/
- git diff | tee clang_tidy_diff
- if [[ -s clang_tidy_diff ]]; then false; fi