blob: 2cf23a04dde45fc8e9dd0ef463a0bea25092caa0 [file] [log] [blame]
#!/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(90) {
sh '''
python llvm-zorg/zorg/jenkins/monorepo_build.py fetch
'''
}
}
}
stage('Clang Build') {
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 cmake build \
--assertions \
--noupload \
--projects="clang;libcxx;libcxxabi" \
--cmake-flag="-DLLVM_INSTALL_UTILS=On" \
--cmake-flag="-DLLVM_INSTALL_TOOLCHAIN_ONLY=Off" \
--cmake-flag="-DLLVM_TARGETS_TO_BUILD=X86"
'''
}
}
}
stage('Ninja Standalone Build (build tree)') {
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
export LLDB_STANDALONE_TYPE="build-tree"
python $WORKSPACE/llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-standalone build \
--assertions \
--cmake-type=Release
'''
}
}
}
stage('Ninja Standalone Build (install tree)') {
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
export LLDB_STANDALONE_TYPE="install-tree"
python $WORKSPACE/llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-standalone build \
--assertions \
--cmake-type=Release
'''
}
}
}
stage('Xcode Standalone Build (build tree)') {
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 $WORKSPACE/llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-xcode build \
--assertions \
--cmake-type=Release
'''
}
}
}
stage('Xcode Standalone Test (build tree)') {
steps {
timeout(30) {
sh '''
set -u
export PATH=$PATH:/usr/bin:/usr/local/bin
python $WORKSPACE/llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-xcode test \
--assertions \
--cmake-type=Release
'''
}
}
}
}
post {
changed {
emailext subject: '$DEFAULT_SUBJECT',
presendScript: '$DEFAULT_PRESEND_SCRIPT',
postsendScript: '$DEFAULT_POSTSEND_SCRIPT',
recipientProviders: [
[$class: 'CulpritsRecipientProvider'],
[$class: 'DevelopersRecipientProvider'],
[$class: 'RequesterRecipientProvider'],
],
replyTo: '$DEFAULT_REPLYTO',
to: '$DEFAULT_RECIPIENTS',
body:'$DEFAULT_CONTENT'
}
}
}