[build] Add clang-tidy to Travis
This commit is contained in:
@@ -95,6 +95,12 @@ matrix:
|
||||
addons:
|
||||
apt:
|
||||
packages: [ 'lib32stdc++6' ]
|
||||
- os: linux
|
||||
env: FLAVOR=linux CXX=clang++-3.8 BUILDTYPE=Release ACTION=tidy AWS_ACCESS_KEY_ID=
|
||||
addons:
|
||||
apt:
|
||||
sources: [ 'ubuntu-toolchain-r-test', 'llvm-toolchain-precise' ]
|
||||
packages: [ 'clang-tidy-3.8', 'libgcc-4.9-dev', 'libstdc++-4.9-dev', 'libstdc++6', 'libllvm3.4', 'libclang-common-3.8-dev', 'libclang1-3.8', 'liblldb-3.8', 'libllvm3.8', 'lldb-3.8', 'llvm-3.8', 'llvm-3.8-dev', 'llvm-3.8-runtime', 'xutils-dev', 'libxxf86vm-dev', 'x11proto-xf86vidmode-dev', 'mesa-utils' ]
|
||||
|
||||
env:
|
||||
global:
|
||||
@@ -121,7 +127,7 @@ install:
|
||||
- ./scripts/${FLAVOR}/install.sh
|
||||
|
||||
script:
|
||||
- ./scripts/${FLAVOR}/run.sh
|
||||
- ./scripts/${FLAVOR}/${ACTION:-run}.sh
|
||||
|
||||
after_failure:
|
||||
- "[ -f ./scripts/${FLAVOR}/after_failure.sh ] && ./scripts/${FLAVOR}/after_failure.sh"
|
||||
|
||||
3
Makefile
3
Makefile
@@ -67,6 +67,9 @@ run-linux: linux ; (cd build/linux-x86_64/$(BUILDTYPE) && ./mapbox-gl)
|
||||
run-valgrind-linux: linux
|
||||
(cd build/linux-x86_64/$(BUILDTYPE) && valgrind --leak-check=full --suppressions=../../../scripts/valgrind.sup ./mapbox-gl)
|
||||
|
||||
|
||||
.PHONY: config compdb tidy
|
||||
config: ; $(RUN) config
|
||||
# Generates a compilation database with ninja for use in clang tooling
|
||||
compdb: ; $(RUN) Ninja/compdb
|
||||
tidy: ; $(RUN) tidy
|
||||
|
||||
17
scripts/linux/tidy.sh
Executable file
17
scripts/linux/tidy.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
# Ensure mason is on the PATH
|
||||
export PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason"
|
||||
|
||||
BUILDTYPE=${BUILDTYPE:-Release}
|
||||
|
||||
export CLANG_TIDY=clang-tidy-3.8
|
||||
|
||||
mapbox_time "config" \
|
||||
make config
|
||||
|
||||
mapbox_time "tidy" \
|
||||
make tidy
|
||||
@@ -65,6 +65,8 @@ config/%.gypi: $(SUBMODULES) configure $(CONFIGURE_FILES)
|
||||
@printf "$(TEXT_BOLD)$(COLOR_GREEN)* Recreating project...$(FORMAT_END)\n"
|
||||
$(QUIET)$(ENV) ./scripts/flock.py build/Configure.lock ./configure config/$*.gypi
|
||||
|
||||
.PHONY: config
|
||||
config: config/$(HOST_SLUG).gypi
|
||||
|
||||
#### Build files ###############################################################
|
||||
|
||||
|
||||
Reference in New Issue
Block a user