Skip to content

Commit

Permalink
[WIP] Add clang-tidy to Jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
hcho3 committed Jan 30, 2019
1 parent 0e7c5e6 commit 155ef2d
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pipeline {
parallel (buildMatrix.findAll{it['enabled']}.collectEntries{ c ->
def buildName = utils.getBuildName(c)
utils.buildFactory(buildName, c, false, this.&buildPlatformCmake)
})
} + [ "clang-tidy" : { buildClangTidyJob() } ])
}
}
}
Expand Down Expand Up @@ -106,3 +106,32 @@ def buildPlatformCmake(buildName, conf, nodeReq, dockerTarget) {
}
}
}

/**
* Run a clang-tidy job on a GPU machine
*/
def buildClangTidyJob() {
def nodeReq = "linux && gpu && unrestricted"
node(nodeReq) {
unstash name: 'srcs'
echo "Running clang-tidy job..."
// Install Google Test and Python yaml
sh """
pip3 install pyyaml
rm -rf gtest
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*
"""
// Run clang-tidy job
sh """
python3 tests/ci_build/tidy.py --gtest-path=${PWD}/gtest
"""
}
}

0 comments on commit 155ef2d

Please sign in to comment.