[tidy] Switched to Travis CI
Fixes https://github.com/mapbox/mapbox-gl-native/issues/5341.
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
Checks: 'modernize-*,misc-static-assert,llvm-namespace-comment,-clang-analyzer-security.insecureAPI.rand,-clang-analyzer-core.uninitialized.UndefReturn'
|
||||
HeaderFilterRegex: 'mbgl'
|
||||
Checks: 'modernize-*,misc-static-assert,llvm-namespace-comment,-clang-analyzer-security.insecureAPI.rand,-clang-analyzer-core.uninitialized.UndefReturn,-clang-analyzer-core.StackAddressEscape,-clang-analyzer-core.CallAndMessage'
|
||||
HeaderFilterRegex: '\/mbgl\/'
|
||||
|
||||
2
.mason
2
.mason
Submodule .mason updated: 0d06890655...56e8cd4b81
11
.travis.yml
11
.travis.yml
@@ -104,6 +104,17 @@ matrix:
|
||||
env: BUILDTYPE=Release _CXX=clang++-3.5 _CC=clang-3.5
|
||||
addons: *clang35
|
||||
|
||||
# Clang 3.5 - tidy
|
||||
- os: linux
|
||||
sudo: required
|
||||
dist: trusty
|
||||
language: cpp
|
||||
compiler: "tidy-clang35-release"
|
||||
env: BUILDTYPE=Release _CXX=clang++-3.5 _CC=clang-3.5
|
||||
addons: *clang35
|
||||
script:
|
||||
- make tidy
|
||||
|
||||
# Qt 4 - Release
|
||||
- os: linux
|
||||
sudo: false
|
||||
|
||||
4
Makefile
4
Makefile
@@ -306,12 +306,12 @@ compdb-macos: platform/macos/platform.gyp $(MACOS_OUTPUT_PATH)/config.gypi
|
||||
tidy: compdb tidy-$(HOST_PLATFORM)
|
||||
|
||||
tidy-linux:
|
||||
if test -z $(CLANG_TIDY); then .mason/mason install clang-tidy 3.8; fi
|
||||
if test -z $(CLANG_TIDY); then .mason/mason install clang-tidy 3.8.0; fi
|
||||
deps/ninja/ninja-linux -C $(LINUX_OUTPUT_PATH)/$(BUILDTYPE) headers
|
||||
scripts/clang-tidy.sh $(LINUX_OUTPUT_PATH)/$(BUILDTYPE)
|
||||
|
||||
tidy-macos:
|
||||
if test -z $(CLANG_TIDY); then .mason/mason install clang-tidy 3.8; fi
|
||||
if test -z $(CLANG_TIDY); then .mason/mason install clang-tidy 3.8.0; fi
|
||||
deps/ninja/ninja-macos -C $(MACOS_OUTPUT_PATH)/$(BUILDTYPE) headers
|
||||
scripts/clang-tidy.sh $(MACOS_OUTPUT_PATH)/$(BUILDTYPE)
|
||||
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
format_version: 1.1.0
|
||||
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
|
||||
|
||||
trigger_map:
|
||||
- pattern: "*"
|
||||
is_pull_request_allowed: true
|
||||
workflow: primary
|
||||
|
||||
workflows:
|
||||
primary:
|
||||
steps:
|
||||
- script:
|
||||
title: Check for skipping CI
|
||||
inputs:
|
||||
- content: |-
|
||||
#!/bin/bash
|
||||
if [[ -n "$(echo $GIT_CLONE_COMMIT_MESSAGE_SUBJECT | sed -n '/\[skip ci\]/p')" ||
|
||||
-n "$(echo $GIT_CLONE_COMMIT_MESSAGE_SUBJECT | sed -n '/\[ci skip\]/p')" ||
|
||||
-n "$(echo $GIT_CLONE_COMMIT_MESSAGE_BODY | sed -n 's/\[skip ci\]/p')" ||
|
||||
-n "$(echo $GIT_CLONE_COMMIT_MESSAGE_BODY | sed -n 's/\[ci skip\]/p')" ]]; then
|
||||
envman add --key SKIPCI --value true
|
||||
else
|
||||
envman add --key SKIPCI --value false
|
||||
fi
|
||||
- script:
|
||||
title: Run build script
|
||||
run_if: '{{enveq "SKIPCI" "false"}}'
|
||||
inputs:
|
||||
- content: |-
|
||||
#!/bin/bash
|
||||
set -eu -o pipefail
|
||||
export BUILDTYPE=Release
|
||||
make compdb
|
||||
make tidy
|
||||
- is_debug: 'no'
|
||||
- slack:
|
||||
title: Post to Slack
|
||||
run_if: '{{enveq "SKIPCI" "false"}}'
|
||||
inputs:
|
||||
- webhook_url: "$SLACK_HOOK_URL"
|
||||
- channel: "#gl-bots"
|
||||
- from_username: 'Bitrise clang-tidy'
|
||||
- from_username_on_error: 'Bitrise clang-tidy'
|
||||
- message: '<${BITRISE_BUILD_URL}|Build #${BITRISE_BUILD_NUMBER}>
|
||||
for <https://github.com/mapbox/mapbox-gl-native/compare/${BITRISE_GIT_BRANCH}|mapbox/mapbox-gl-native@${BITRISE_GIT_BRANCH}>
|
||||
by ${GIT_CLONE_COMMIT_COMMITER_NAME}
|
||||
passed'
|
||||
- message_on_error: '<${BITRISE_BUILD_URL}|Build #${BITRISE_BUILD_NUMBER}>
|
||||
for <https://github.com/mapbox/mapbox-gl-native/compare/${BITRISE_GIT_BRANCH}|mapbox/mapbox-gl-native@${BITRISE_GIT_BRANCH}>
|
||||
by ${GIT_CLONE_COMMIT_COMMITER_NAME}
|
||||
failed'
|
||||
- icon_url: https://bitrise-public-content-production.s3.amazonaws.com/slack/bitrise-slack-icon-128.png
|
||||
- icon_url_on_error: https://bitrise-public-content-production.s3.amazonaws.com/slack/bitrise-slack-error-icon-128.png
|
||||
@@ -5,7 +5,7 @@ set -o pipefail
|
||||
|
||||
export PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason"
|
||||
|
||||
CLANG_TIDY=${CLANG_TIDY:-$(mason prefix clang-tidy 3.8)/bin/clang-tidy}
|
||||
CLANG_TIDY=${CLANG_TIDY:-$(mason prefix clang-tidy 3.8.0)/bin/clang-tidy}
|
||||
|
||||
command -v ${CLANG_TIDY} >/dev/null 2>&1 || {
|
||||
echo "Can't find ${CLANG_TIDY} in PATH."
|
||||
@@ -18,9 +18,10 @@ command -v ${CLANG_TIDY} >/dev/null 2>&1 || {
|
||||
cd $1
|
||||
|
||||
function check_tidy() {
|
||||
echo "Checking $0..."
|
||||
OUTPUT=$(${CLANG_TIDY} -p=$PWD $0 2>/dev/null)
|
||||
if [[ -n $OUTPUT ]]; then
|
||||
echo "Error: A clang-tidy warning/error happened:"
|
||||
echo "Caught clang-tidy warning/error:"
|
||||
echo -e "$OUTPUT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user