Skip to content

Commit

Permalink
Run clang-tidy in CUDA 9.2 container
Browse files Browse the repository at this point in the history
  • Loading branch information
hcho3 committed Feb 4, 2019
1 parent 0c6e507 commit 3c065b1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
19 changes: 4 additions & 15 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -115,23 +115,12 @@ def buildClangTidyJob() {
node(nodeReq) {
unstash name: 'srcs'
echo "Running clang-tidy job..."
// Invoke command inside docker
// Install Google Test and Python yaml
dockerTarget = "gpu"
dockerArgs = "--build-arg CUDA_VERSION=9.2"
sh """
pip3 install pyyaml
rm -rf gtest googletest-release-1.7.0
wget -nc https://github.com/google/googletest/archive/release-1.7.0.zip
jar -xf release-1.7.0.zip
mv googletest-release-1.7.0 gtest && cd gtest
cmake . && make
mkdir lib && mv libgtest.a lib
cd ..
rm -rf release-1.7.0.zip*
"""
// Run clang-tidy job
sh """#!/bin/bash
source tests/ci_build/setup_cuda_path.sh
python3 tests/ci_build/tidy.py --gtest-path=${WORKSPACE}/gtest
${dockerRun} ${dockerTarget} ${dockerArgs} tests/ci_build/clang-tidy.sh ${WORKSPACE}/gtest
"""
}
}
Expand Down
17 changes: 17 additions & 0 deletions tests/ci_build/clang-tidy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

gtest_path=$1

pip3 install pyyaml

rm -rf gtest googletest-release-1.7.0
wget -nc https://github.com/google/googletest/archive/release-1.7.0.zip
unzip -n release-1.7.0.zip
mv googletest-release-1.7.0 gtest && cd gtest
cmake . && make
mkdir lib && mv libgtest.a lib
cd ..
rm -rf release-1.7.0.zip*

source tests/ci_build/setup_cuda_path.sh
python3 tests/ci_build/tidy.py --gtest-path=${gtest_path}

0 comments on commit 3c065b1

Please sign in to comment.