| #!/usr/bin/env groovy |
| |
| pipeline { |
| agent { label 'green-dragon-23' } |
| parameters { |
| string(name: 'GIT_REVISION', defaultValue: '*/master', description: 'Git revision to build') |
| string(name: 'ARTIFACT', defaultValue: 'clang-stage1-RA/latest', description: 'Compiler artifact to use for building the project') |
| string(name: 'BUILD_TYPE', defaultValue: 'Release', description: 'Default CMake build type; one of: Release, Debug, ...') |
| string(name: 'CLEAN', defaultValue: "false", description: 'Whether or not to clean the build directory before building') |
| } |
| stages { |
| stage('Checkout') { |
| steps { |
| timeout(30) { |
| dir('llvm-project') { |
| checkout([$class: 'GitSCM', branches: [[name: params.GIT_REVISION]], userRemoteConfigs: [[url: 'http://labmaster3.local/git/llvm-project.git']]]) |
| } |
| dir('llvm-zorg') { |
| checkout([$class: 'GitSCM', branches: [[name: '*/master']], userRemoteConfigs: [[url: 'http://labmaster3.local/git/llvm-zorg.git']]]) |
| } |
| } |
| } |
| } |
| stage('Fetch') { |
| steps { |
| timeout(10) { |
| sh ''' |
| python llvm-zorg/zorg/jenkins/monorepo_build.py fetch |
| ''' |
| } |
| } |
| } |
| stage('Build LLDB') { |
| steps { |
| timeout(90) { |
| sh ''' |
| set -u |
| rm -rf build.properties |
| |
| cd llvm-project |
| git tag -a -m "First Commit" first_commit 97724f18c79c7cc81ced24239eb5e883bf1398ef || true |
| |
| git_desc=$(git describe --match "first_commit") |
| |
| export GIT_DISTANCE=$(echo ${git_desc} | cut -f 2 -d "-") |
| |
| sha=$(echo ${git_desc} | cut -f 3 -d "-") |
| export GIT_SHA=${sha:1} |
| |
| cd - |
| |
| export PATH=$PATH:/usr/bin:/usr/local/bin |
| |
| python llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix build \ |
| --assertions \ |
| --projects="clang;libcxx;libcxxabi;lldb" \ |
| --cmake-type=Release \ |
| --dotest-flag="--skip-category gmodules" \ |
| --dotest-flag="--arch=x86_64" |
| ''' |
| } |
| } |
| } |
| stage('Test DWARF2') { |
| steps { |
| timeout(60) { |
| sh ''' |
| export PATH=$PATH:/usr/bin:/usr/local/bin |
| python llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix configure \ |
| --assertions \ |
| --projects="clang;libcxx;libcxxabi;lldb" \ |
| --cmake-type=Release \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="gmodules" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="watchpoint" \ |
| --dotest-flag="--arch=x86_64" \ |
| --dotest-flag="--dwarf-version=2" |
| |
| set +e |
| python llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix test |
| set -e |
| ''' |
| } |
| junit 'test/results.xml' |
| } |
| } |
| stage('Test DWARF4') { |
| steps { |
| timeout(60) { |
| sh ''' |
| export PATH=$PATH:/usr/bin:/usr/local/bin |
| python llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix configure \ |
| --assertions \ |
| --projects="clang;libcxx;libcxxabi;lldb" \ |
| --cmake-type=Release \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="gmodules" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="watchpoint" \ |
| --dotest-flag="--arch=x86_64" \ |
| --dotest-flag="--dwarf-version=4" |
| |
| set +e |
| python llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix test |
| set -e |
| ''' |
| } |
| junit 'test/results.xml' |
| } |
| } |
| stage('Test DWARF5') { |
| steps { |
| timeout(60) { |
| sh ''' |
| export PATH=$PATH:/usr/bin:/usr/local/bin |
| python llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix configure \ |
| --assertions \ |
| --projects="clang;libcxx;libcxxabi;lldb" \ |
| --cmake-type=Release \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="gmodules" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="watchpoint" \ |
| --dotest-flag="--arch=x86_64" \ |
| --dotest-flag="--dwarf-version=5" |
| |
| set +e |
| python llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix test |
| set -e |
| ''' |
| } |
| } |
| } |
| stage('Build Clang 5.0.2') { |
| steps { |
| timeout(30) { |
| dir('clang_502') { |
| checkout([$class: 'GitSCM', branches: [[name: "llvmorg-5.0.2"]], userRemoteConfigs: [[url: 'http://labmaster3.local/git/llvm-project.git']]]) |
| } |
| } |
| timeout(90) { |
| sh ''' |
| export PATH=$PATH:/usr/bin:/usr/local/bin |
| export SRC_DIR='clang_502' |
| export BUILD_DIR='clang_502_build' |
| |
| python llvm-zorg/zorg/jenkins/monorepo_build.py cmake build \ |
| --assertions \ |
| --noupload \ |
| --noinstall \ |
| --projects="clang;libcxx;libcxxabi" |
| ''' |
| } |
| } |
| } |
| stage('Test Clang 5.0.2') { |
| steps { |
| timeout(60) { |
| sh ''' |
| export PATH=$PATH:/usr/bin:/usr/local/bin |
| export LLDB_TEST_COMPILER="$WORKSPACE/clang_502_build/bin/clang" |
| python llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix configure \ |
| --assertions \ |
| --projects="clang;libcxx;libcxxabi;lldb" \ |
| --cmake-type=Release \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="gmodules" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="watchpoint" \ |
| --dotest-flag="--arch=x86_64" |
| |
| set +e |
| python llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix test |
| set -e |
| ''' |
| } |
| junit 'test/results.xml' |
| } |
| } |
| stage('Build Clang 7.0.1') { |
| steps { |
| timeout(30) { |
| dir('clang_701') { |
| checkout([$class: 'GitSCM', branches: [[name: "llvmorg-7.0.1"]], userRemoteConfigs: [[url: 'http://labmaster3.local/git/llvm-project.git']]]) |
| } |
| } |
| timeout(90) { |
| sh ''' |
| export PATH=$PATH:/usr/bin:/usr/local/bin |
| export SRC_DIR='clang_701' |
| export BUILD_DIR='clang_701_build' |
| |
| python llvm-zorg/zorg/jenkins/monorepo_build.py cmake build \ |
| --assertions \ |
| --noupload \ |
| --noinstall \ |
| --projects="clang;libcxx;libcxxabi" |
| ''' |
| } |
| } |
| } |
| stage('Test Clang 7.0.1') { |
| steps { |
| timeout(60) { |
| sh ''' |
| export PATH=$PATH:/usr/bin:/usr/local/bin |
| export LLDB_TEST_COMPILER="$WORKSPACE/clang_701_build/bin/clang" |
| python llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix configure \ |
| --assertions \ |
| --projects="clang;libcxx;libcxxabi;lldb" \ |
| --cmake-type=Release \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="gmodules" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="watchpoint" \ |
| --dotest-flag="--arch=x86_64" |
| |
| set +e |
| python llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix test |
| set -e |
| ''' |
| } |
| junit 'test/results.xml' |
| } |
| } |
| stage('Build Clang 9.0.0') { |
| steps { |
| timeout(30) { |
| dir('clang_900') { |
| checkout([$class: 'GitSCM', branches: [[name: "llvmorg-9.0.0"]], userRemoteConfigs: [[url: 'http://labmaster3.local/git/llvm-project.git']]]) |
| } |
| } |
| timeout(90) { |
| sh ''' |
| export PATH=$PATH:/usr/bin:/usr/local/bin |
| export SRC_DIR='clang_900' |
| export BUILD_DIR='clang_900_build' |
| |
| python llvm-zorg/zorg/jenkins/monorepo_build.py cmake build \ |
| --assertions \ |
| --noupload \ |
| --noinstall \ |
| --projects="clang;libcxx;libcxxabi" |
| ''' |
| } |
| } |
| } |
| stage('Test Clang 9.0.0') { |
| steps { |
| timeout(60) { |
| sh ''' |
| export PATH=$PATH:/usr/bin:/usr/local/bin |
| export LLDB_TEST_COMPILER="$WORKSPACE/clang_900_build/bin/clang" |
| python llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix configure \ |
| --assertions \ |
| --projects="clang;libcxx;libcxxabi;lldb" \ |
| --cmake-type=Release \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="gmodules" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="watchpoint" \ |
| --dotest-flag="--arch=x86_64" |
| |
| set +e |
| python llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix test |
| set -e |
| ''' |
| } |
| junit 'test/results.xml' |
| } |
| } |
| } |
| } |