From 60a3096109a2eba4580bac72014c0ccd57cdcd8a Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Mon, 23 Sep 2019 13:56:06 +0300 Subject: [build] Have the bots running clang-tidy --- .gitignore | 1 + circle.yml | 45 ++++++++++++++++++++------------------------- 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/.gitignore b/.gitignore index 73e87815a6..bf6b13e007 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ xcuserdata /platform/node/test/diff /mason_packages /build +/next/build /lib /test/node_modules /test/fixtures/*/*_actual.* diff --git a/circle.yml b/circle.yml index 67a8e2b662..66ebaf0226 100644 --- a/circle.yml +++ b/circle.yml @@ -9,8 +9,6 @@ workflows: name: next-android-armeabi-v7a-release executor_name: ubuntu-disco target_is_android: true - requires: - - next-sanity-checks config_params: '-G Ninja -DCMAKE_TOOLCHAIN_FILE=/opt/android/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_CCACHE=/usr/bin/ccache -DANDROID_ABI=armeabi-v7a' - next-build-template: name: next-android-arm64-v8a-release @@ -37,8 +35,6 @@ workflows: name: next-linux-gcc8-release executor_name: ubuntu-disco target_is_linux: true - requires: - - next-sanity-checks config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8' - next-build-template: name: next-linux-gcc4.9-release @@ -60,15 +56,13 @@ workflows: name: next-linux-clang8-release executor_name: ubuntu-disco target_is_linux: true - requires: - - next-sanity-checks config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=clang-8 -DCMAKE_CXX_COMPILER=clang++-8' - next-build-template: name: next-FIXME-linux-asan executor_name: ubuntu-disco target_is_linux: true requires: - - next-linux-gcc8-debug-coverage + - next-sanity-checks config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=clang-8 -DCMAKE_CXX_COMPILER=clang++-8 -DCMAKE_BUILD_TYPE=Sanitize -DMBGL_WITH_SANITIZER=address' test_params: '|| true' - next-build-template: @@ -76,14 +70,14 @@ workflows: executor_name: ubuntu-disco target_is_linux: true requires: - - next-linux-gcc8-debug-coverage + - next-sanity-checks config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=clang-8 -DCMAKE_CXX_COMPILER=clang++-8 -DCMAKE_BUILD_TYPE=Sanitize -DMBGL_WITH_SANITIZER=thread' - next-build-template: name: next-FIXME-linux-memsan executor_name: ubuntu-disco target_is_linux: true requires: - - next-linux-gcc8-debug-coverage + - next-sanity-checks config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=clang-8 -DCMAKE_CXX_COMPILER=clang++-8 -DCMAKE_BUILD_TYPE=Sanitize -DMBGL_WITH_SANITIZER=memory' test_params: '|| true' - next-build-template: @@ -91,15 +85,13 @@ workflows: executor_name: ubuntu-disco target_is_linux: true requires: - - next-linux-gcc8-debug-coverage + - next-sanity-checks config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=clang-8 -DCMAKE_CXX_COMPILER=clang++-8 -DCMAKE_BUILD_TYPE=Sanitize -DMBGL_WITH_SANITIZER=undefined' test_params: '|| true' - next-build-template: name: next-qt5-linux-gcc5-release executor_name: ubuntu-disco target_is_linux: true - requires: - - next-sanity-checks config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER=gcc-5 -DCMAKE_CXX_COMPILER=g++-5 -DMBGL_WITH_QT=ON' - next-build-template: name: next-qt5-macos-gcc5-release @@ -113,8 +105,6 @@ workflows: name: next-macos-xcode11-release executor_name: macos-11_0_0 target_is_macos: true - requires: - - next-sanity-checks config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache' - next-build-template: name: next-macos-xcode11-debug @@ -127,8 +117,6 @@ workflows: name: next-ios-xcode11-release executor_name: macos-11_0_0 target_is_macos: true - requires: - - next-sanity-checks config_params: '-G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_SYSROOT=iphonesimulator' test_params: '-Q -N' mbgl-legacy: @@ -281,10 +269,10 @@ commands: name: Collecting artifacts when: on_fail command: | - mkdir -p /tmp/tests/coredumps - if ls core* 1> /dev/null 2>&1; then cp core* /tmp/tests/coredumps; fi mkdir -p /tmp/tests/render if [ -f mapbox-gl-js/test/integration/render-tests/index.html ]; then cp mapbox-gl-js/test/integration/render-tests/index.html /tmp/tests/render; fi + mkdir -p /tmp/tests/coredumps + if ls core* 1> /dev/null 2>&1; then cp core* /tmp/tests/coredumps; fi - store_artifacts: path: /tmp/tests destination: tests @@ -718,7 +706,15 @@ jobs: - checkout - next-prepare - next-config: - config_params: '-DMBGL_WITH_CORE_ONLY=ON' + config_params: '-G Ninja -DCMAKE_C_COMPILER=clang-8 -DCMAKE_CXX_COMPILER=clang++-8' + - run: + name: Code Generators + command: | + platform/android/scripts/generate-style-code.js + scripts/generate-file-lists.js + scripts/generate-shaders.js + scripts/generate-style-code.js + git add -A && git diff --staged --exit-code - run: name: CMake Format command: | @@ -730,13 +726,12 @@ jobs: git diff -U0 --ignore-submodules=all --no-color origin/master... *.cpp *.hpp | clang-format-diff-8 -p1 -i git diff --exit-code - run: - name: Code Generators + name: Clang Tidy command: | - platform/android/scripts/generate-style-code.js - scripts/generate-file-lists.js - scripts/generate-shaders.js - scripts/generate-style-code.js - git add -A && git diff --staged --exit-code + run-clang-tidy-8 -quiet -j24 -p build $PWD/src/.*cpp $PWD/platform/.*cpp |tee clang-tidy.log + grep -o \\[[a-z].*-.*[a-z]\] clang-tidy.log |sort |uniq -c |sort -n + mkdir -p /tmp/tests/clang-tidy + if [ -f clang-tidy.log ]; then cp clang-tidy.log /tmp/tests/clang-tidy; fi - next-save next-build-template: parameters: -- cgit v1.2.1