1
0
Fork 0

fixed paths, moved package versions to separate file

This commit is contained in:
Christian Kühnel 2020-03-23 17:22:49 +01:00
parent 00ee4eab8a
commit 57a57ec1fc

View file

@ -41,14 +41,18 @@ pipeline {
currentBuild.displayName += " D${REV_ID}" currentBuild.displayName += " D${REV_ID}"
currentBuild.description = "<a href='https://reviews.llvm.org/D${REV_ID}'>D${REV_ID}</a>" currentBuild.description = "<a href='https://reviews.llvm.org/D${REV_ID}'>D${REV_ID}</a>"
} }
// Report versions of the installed packages. sh """
sh ''' rm -rf ${RESULT_DIR}
echo Versions of various tools: mkdir -p ${RESULT_DIR}
clang --version """
clang-tidy --version // Report versions of the installed packages.
ld.lld --version sh """
dpkg -l echo Versions of various tools: > ${RESULT_DIR}/package_version.log
''' clang --version >> ${RESULT_DIR}/package_version.log
clang-tidy --version >> ${RESULT_DIR}/package_version.log
ld.lld --version >> ${RESULT_DIR}/package_version.log
dpkg -l >> ${RESULT_DIR}/package_version.log
"""
} }
} }
stage("git checkout") stage("git checkout")
@ -64,61 +68,70 @@ pipeline {
{ {
git url: 'https://github.com/google/llvm-premerge-checks.git' git url: 'https://github.com/google/llvm-premerge-checks.git'
} }
sh """
rm -rf ${RESULT_DIR}
mkdir -p ${RESULT_DIR}
"""
} }
} }
stage('CMake') { stage('CMake') {
steps { steps {
script { dir("${LLVM_DIR}")
success = false {
failure_message = "Failed to run cmake" script {
} success = false
sh "${SCRIPT_DIR}/run_cmake.py --projects detect" failure_message = "Failed to run cmake"
script { }
success = true sh "${SCRIPT_DIR}/run_cmake.py --projects detect"
failure_message = "" script {
success = true
failure_message = ""
}
} }
} }
} }
/* /*
stage('ninja all') { stage('ninja all') {
steps { steps {
script { dir("${LLVM_DIR}")
try { {
sh(script: "${SCRIPT_DIR}/run_ninja.sh all") script {
} catch (e) { try {
success = false; sh(script: "${SCRIPT_DIR}/run_ninja.sh all")
failure_message = "'ninja all' failed" // append as build might already be broken } catch (e) {
echo e.toString() success = false;
failure_message = "'ninja all' failed" // append as build might already be broken
echo e.toString()
}
} }
} }
} }
} }
stage('ninja check-all') { stage('ninja check-all') {
steps { steps {
script { dir("${LLVM_DIR}")
try { {
sh(script: "${SCRIPT_DIR}/run_ninja.sh check-all") script {
} catch (e) { try {
success = false; sh(script: "${SCRIPT_DIR}/run_ninja.sh check-all")
failure_message += "\n'ninja check-all' failed" // append as build might already be broken } catch (e) {
echo e.toString() success = false;
failure_message += "\n'ninja check-all' failed" // append as build might already be broken
echo e.toString()
}
} }
} }
} }
} }
stage('linters') { stage('linters') {
steps { steps {
script { dir("${LLVM_DIR}")
try { {
sh(script: "${SCRIPT_DIR}/lint.sh")
} catch (e) { script {
success = false; try {
failure_message += "\nFailed to run linters" // append as build might already be broken sh(script: "${SCRIPT_DIR}/lint.sh")
echo e.toString() } catch (e) {
success = false;
failure_message += "\nFailed to run linters" // append as build might already be broken
echo e.toString()
}
} }
} }
} }