Demo entry 6687203

llvm-jenkins-pipeline-build

   

Submitted by justasic on Dec 26, 2017 at 23:36
Language: C++. Code size: 3.2 kB.

node {
    stage('Cleanup')
    {
        cleanWs()
    }
    stage('Clone')
    {
        checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CloneOption', noTags: false, reference: '', shallow: true]], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.llvm.org/git/llvm.git']]])
        dir('tools') {
        		checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CloneOption', noTags: true, reference: '', shallow: true], [$class: 'RelativeTargetDirectory', relativeTargetDir: 'clang']], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.llvm.org/git/clang.git']]])
                checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CloneOption', noTags: true, reference: '', shallow: true], [$class: 'RelativeTargetDirectory', relativeTargetDir: 'lld']], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.llvm.org/git/lld.git']]])
        		dir('clang/tools') {
        				checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CloneOption', noTags: true, reference: '', shallow: true], [$class: 'RelativeTargetDirectory', relativeTargetDir: 'extra']], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.llvm.org/git/clang-tools-extra.git']]])
        		}
        }
        dir('projects') {
        		checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CloneOption', noTags: true, reference: '', shallow: true], [$class: 'RelativeTargetDirectory', relativeTargetDir: 'compiler-rt']], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.llvm.org/git/compiler-rt.git']]])
        		checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CloneOption', noTags: true, reference: '', shallow: true], [$class: 'RelativeTargetDirectory', relativeTargetDir: 'libcxx']], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.llvm.org/git/libcxx.git']]])
        		checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CloneOption', noTags: true, reference: '', shallow: true], [$class: 'RelativeTargetDirectory', relativeTargetDir: 'libcxxabi']], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.llvm.org/git/libcxxabi.git']]])
        }
    }
    stage('Build')
    {
        sh 'mkdir -p build install'
        dir('build')
        {
            sh '/usr/bin/cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=OFF -DCMAKE_INSTALL_PREFIX="../install/" ..'
            sh 'make -j10'
        }
    }
    stage('Install')
    {
        dir('build')
        {
            sh 'make install'
        }
    }
    stage('Archiving')
    {
        sh 'tar -cJvf llvm-`date +%F`.tar.xz install/'
        archiveArtifacts artifacts: 'llvm-*.tar.xz', onlyIfSuccessful: true
    }
}

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).