[zorg] r369273 - [lldb] Checking LLDB pipelines

Jonas Devlieghere via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 09:09:06 PDT 2019


Author: jdevlieghere
Date: Mon Aug 19 09:09:06 2019
New Revision: 369273

URL: http://llvm.org/viewvc/llvm-project?rev=369273&view=rev
Log:
[lldb] Checking LLDB pipelines

Added:
    zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake
    zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake-sanitized
Modified:
    zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake-matrix
    zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake-standalone

Added: zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake?rev=369273&view=auto
==============================================================================
--- zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake (added)
+++ zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake Mon Aug 19 09:09:06 2019
@@ -0,0 +1,85 @@
+#!/usr/bin/env groovy
+pipeline {
+    agent { label 'green-dragon-24' }
+    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 {
+                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 Host Compiler') {
+        steps {
+        	timeout(10) {
+                    sh '''
+        			python llvm-zorg/zorg/jenkins/monorepo_build.py fetch
+        			'''
+        		}
+            }
+        }
+        stage('Build') {
+            steps {
+                timeout(60) {
+                    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 build \
+                      --assertions \
+                      --projects="clang;libcxx;libcxxabi;compiler-rt;lld;lldb;debuginfo-tests"  \
+                      --cmake-flag="-DPYTHON_LIBRARY=/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7.dylib" \
+                      --cmake-flag="-DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/include/python3.7m" \
+                      --cmake-flag="-DPYTHON_LIBRARY_DEBUG=/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7.dylib" \
+                      --cmake-flag="-DPYTHON_EXECUTABLE=/usr/local/Cellar/python/3.7.0/bin/python3.7" \
+                      --compiler-flag="-Wdocumentation" \
+                      --cmake-type=Release
+                    '''
+                }
+            }
+        }
+        stage('Test') {
+            steps {
+                timeout(30) {
+                    sh '''
+                    set -u
+                    export PATH=$PATH:/usr/bin:/usr/local/bin
+
+                    rm -rf test/results.xml
+
+                    python llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake testlong
+                    '''
+                }
+            }
+        }
+    }
+    post {
+        always {
+            scanForIssues tool: clang()
+            junit 'test/results.xml'
+        }
+    }
+}

Modified: zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake-matrix
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake-matrix?rev=369273&r1=369272&r2=369273&view=diff
==============================================================================
--- zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake-matrix (original)
+++ zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake-matrix Mon Aug 19 09:09:06 2019
@@ -1,150 +1,194 @@
 #!/usr/bin/env groovy
+
 pipeline {
-    agent {label 'green-dragon-23'}
+    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('Subversion Checkout') {
+        stage('Checkout') {
             steps {
-                timeout(activity: true, time: 30) {
-                    checkout([$class: 'SubversionSCM',
-                              locations: [
-                                  [local: 'llvm.src',
-                                   remote: 'http://llvm.org/svn/llvm-project/llvm/trunk'],
-                                  [local: 'lldb.src',
-                                   remote: 'http://llvm.org/svn/llvm-project/lldb/trunk'],
-                                  [local: 'clang.src',
-                                   remote: 'http://llvm.org/svn/llvm-project/cfe/trunk'],
-                                  [local: 'debuginfo-tests.src',
-                                   remote: 'http://llvm.org/svn/llvm-project/debuginfo-tests/trunk'],
-                                  [cancelProcessOnExternalsFail: true,
-                                   credentialsId: '', depthOption: 'infinity',
-                                   ignoreExternalsOption: true, local: 'libcxx.src',
-                                   remote: 'http://llvm.org/svn/llvm-project/libcxx/trunk']],
-                              quietOperation: false,
-                              workspaceUpdater: [$class: 'UpdateUpdater']])
+                dir('llvm-project') {
+                    checkout([$class: 'GitSCM', branches: [[name: params.GIT_REVISION]], userRemoteConfigs: [[url: 'http://labmaster3.local/git/llvm-project.git']]])
                 }
-            }
-        }
-        stage('Build LLDB') {
-            steps {
-                timeout(activity: true, time: 30) {
-                    sh '''
-                       set -u
-                       export
-                       python $SCRIPT_PATH/build.py fetch
-                       '''
-                    sh '''
-                       bash $SCRIPT_PATH/lldb-cmake-matrix-stage1.sh
-                       '''
-                }
-            }
-        }
-        stage('Clang 5.0.2') {
-            steps {
-                timeout(activity: true, time: 30) {
-                    checkout([$class: 'SubversionSCM',
-                              locations: [
-                                  [local: 'src/history/clang-5.0.2',
-                                   remote: 'http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_502/final'],
-                                  [local: 'src/history/clang-5.0.2/tools/clang',
-                                   remote: 'http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_502/final'],
-                                  [local: 'src/history/clang-5.0.2/projects/libcxx',
-                                   remote: 'http://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_502/final']],
-                              quietOperation: false,
-                              workspaceUpdater: [$class: 'UpdateUpdater']])
-                }
-                timeout(activity: true, time: 30) {
-                    sh '''
-                       export HISTORIC_COMPILER=clang-5.0.2
-                       bash ${SCRIPT_PATH}/lldb-cmake-matrix-stage2.sh
-                       '''
-                    junit 'test-clang-5.0.2/results.xml'
+                dir('llvm-zorg') {
+                    checkout([$class: 'GitSCM', branches: [[name: '*/master']], userRemoteConfigs: [[url: 'http://labmaster3.local/git/llvm-zorg.git']]])
                 }
             }
         }
-        stage('Clang 6.0.1') {
+        stage('Fetch') {
             steps {
-                timeout(activity: true, time: 30) {
-                    checkout([$class: 'SubversionSCM',
-                              locations: [
-                                  [local: 'src/history/clang-6.0.1',
-                                   remote: 'http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_601/final'],
-                                  [local: 'src/history/clang-6.0.1/tools/clang',
-                                   remote: 'http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_601/final'],
-                                  [local: 'src/history/clang-6.0.1/projects/libcxx',
-                                   remote: 'http://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_601/final']],
-                              quietOperation: false,
-                              workspaceUpdater: [$class: 'UpdateUpdater']])
-                }
-                timeout(activity: true, time: 30) {
+                timeout(10) {
                     sh '''
-                       export HISTORIC_COMPILER=clang-6.0.1
-                       bash ${SCRIPT_PATH}/lldb-cmake-matrix-stage2.sh
-                       '''
-                    junit 'test-clang-6.0.1/results.xml'
-                }
+                        python llvm-zorg/zorg/jenkins/monorepo_build.py fetch
+                    '''
+                    }
             }
         }
-        stage('Clang 7.0.1') {
-            steps {
-                timeout(activity: true, time: 30) {
-                    checkout([$class: 'SubversionSCM',
-                              locations: [
-                                  [local: 'src/history/clang-7.0.1',
-                                   remote: 'http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_701/final'],
-                                  [local: 'src/history/clang-7.0.1/tools/clang',
-                                   remote: 'http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_701/final'],
-                                  [local: 'src/history/clang-7.0.1/projects/libcxx',
-                                   remote: 'http://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_701/final']],
-                              quietOperation: false,
-                              workspaceUpdater: [$class: 'UpdateUpdater']])
-                }
-                timeout(activity: true, time: 30) {
-                    sh '''
-                       export HISTORIC_COMPILER=clang-7.0.1
-                       bash ${SCRIPT_PATH}/lldb-cmake-matrix-stage2.sh
-                       '''
-                    junit 'test-clang-7.0.1/results.xml'
-                }
-            }
-        }
-        stage('Upstream Clang + DWARF 2') {
-            steps {
-                timeout(activity: true, time: 30) {
-                    sh '''
-                       export DWARF_VERSION=2
-                       bash ${SCRIPT_PATH}/lldb-cmake-matrix-dwarf.sh
-                       '''
-                    junit 'test-dwarf2/results.xml'
-                }
-            }
-        }
-        stage('Upstream Clang + DWARF 4') {
-            steps {
-                timeout(activity: true, time: 30) {
-                    sh '''
-                       export DWARF_VERSION=4
-                       bash ${SCRIPT_PATH}/lldb-cmake-matrix-dwarf.sh
-                       '''
-                    junit 'test-dwarf4/results.xml'
-                }
-            }
-        }
-        stage('Upstream Clang + DWARF 5') {
+        stage('Build LLDB') {
             steps {
-                timeout(activity: true, time: 30) {
+                timeout(60) {
                     sh '''
-                       export DWARF_VERSION=5
-                       bash ${SCRIPT_PATH}/lldb-cmake-matrix-dwarf.sh
-                       '''
-// Commented out to avoid distraction while most of the tests fail.
-//                    junit(healthScaleFactor: 0.0,
-//                          testResults: 'test-dwarf5/results.xml')
+                    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 build \
+                      --assertions \
+                      --projects="clang;libcxx;libcxxabi;lldb"  \
+                      --cmake-type=Release \
+                      --dotest-flag="--skip-category gmodules" \
+                      --dotest-flag="--arch=x86_64"
+                    '''
+                }
+            }
+        }
+        stage('Build Clang 5.0.2') {
+            steps {
+                dir('clang_502') {
+                    checkout([$class: 'GitSCM', branches: [[name: "llvmorg-5.0.2"]], userRemoteConfigs: [[url: 'http://labmaster3.local/git/llvm-project.git']]])
+                }
+                timeout(60) {
+                    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 6.0.1') {
+            steps {
+                dir('clang_601') {
+                    checkout([$class: 'GitSCM', branches: [[name: "llvmorg-6.0.1"]], userRemoteConfigs: [[url: 'http://labmaster3.local/git/llvm-project.git']]])
+                }
+                timeout(60) {
+                    sh '''
+                    export PATH=$PATH:/usr/bin:/usr/local/bin
+                    export SRC_DIR='clang_601'
+                    export BUILD_DIR='clang_601_build'
+
+                    python llvm-zorg/zorg/jenkins/monorepo_build.py cmake build \
+                      --assertions \
+                      --noupload \
+                      --noinstall \
+                      --projects="clang;libcxx;libcxxabi"
+                    '''
+                }
+            }
+        }
+        stage('Test Clang 6.0.1') {
+            steps {
+                timeout(60) {
+                    sh '''
+                    export PATH=$PATH:/usr/bin:/usr/local/bin
+                    export LLDB_TEST_COMPILER="$WORKSPACE/clang_601_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 {
+                dir('clang_701') {
+                    checkout([$class: 'GitSCM', branches: [[name: "llvmorg-7.0.1"]], userRemoteConfigs: [[url: 'http://labmaster3.local/git/llvm-project.git']]])
+                }
+                timeout(60) {
+                    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'
             }
         }
     }

Added: zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake-sanitized
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake-sanitized?rev=369273&view=auto
==============================================================================
--- zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake-sanitized (added)
+++ zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake-sanitized Mon Aug 19 09:09:06 2019
@@ -0,0 +1,84 @@
+#!/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 {
+                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 Host Compiler') {
+        steps {
+        	timeout(10) {
+                    sh '''
+        			python llvm-zorg/zorg/jenkins/monorepo_build.py fetch
+        			'''
+        		}
+            }
+        }
+        stage('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 lldb-cmake-sanitized build \
+                      --assertions \
+                      --projects="clang;libcxx;libcxxabi;lld;lldb"  \
+                      --cmake-type=Release
+                    '''
+                }
+            }
+        }
+        stage('Test') {
+            steps {
+                timeout(30) {
+                    sh '''
+                    set -u
+                    export PATH=$PATH:/usr/bin:/usr/local/bin
+
+                    rm -rf test/results.xml
+
+                    # Running too many asanified threads is too stressful for the kernel and we get >90% system time.
+                    export MAX_PARALLEL_TESTS=$(sysctl hw.physicalcpu |awk '{print $2}')
+
+                    python llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-sanitized test
+                    '''
+                }
+            }
+        }
+    }
+
+    post {
+        always {
+            scanForIssues tool: clang()
+            junit 'test/results.xml'
+        }
+    }
+}

Modified: zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake-standalone
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake-standalone?rev=369273&r1=369272&r2=369273&view=diff
==============================================================================
--- zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake-standalone (original)
+++ zorg/trunk/zorg/jenkins/jobs/jobs/lldb-cmake-standalone Mon Aug 19 09:09:06 2019
@@ -2,331 +2,145 @@
 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('Subversion Checkout') {
+        stage('Checkout') {
             steps {
-                timeout(activity: true, time: 30) {
-                    checkout([$class: 'SubversionSCM',
-                              locations: [
-                                  [local: 'llvm.src',
-                                   remote: 'http://llvm.org/svn/llvm-project/llvm/trunk'],
-                                  [local: 'lldb.src',
-                                   remote: 'http://llvm.org/svn/llvm-project/lldb/trunk'],
-                                  [local: 'clang.src',
-                                   remote: 'http://llvm.org/svn/llvm-project/cfe/trunk'],
-                                  [local: 'libcxx.src',
-                                   remote: 'http://llvm.org/svn/llvm-project/libcxx/trunk']],
-                              quietOperation: false,
-                              workspaceUpdater: [$class: 'UpdateUpdater']])
+                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('Setup LLDB') {
+        stage('Fetch') {
             steps {
-                timeout(activity: true, time: 30) {
-                    sh '''
-                       set -u
-                       export
-                       python $SCRIPT_PATH/build.py fetch
-                       '''
+              timeout(90) {
+                  sh '''
+                  python llvm-zorg/zorg/jenkins/monorepo_build.py fetch
+                  '''
+                }
+            }
+        }
+        stage('Clang Build') {
+            steps {
+                timeout(90) {
                     sh '''
-set -eux
-
-# Avoid the python in /usr/local/bin.
-PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/jbin
-
-if [ -z "WORKSPACE" ]; then
-    echo "WORKSPACE is not set."
-    exit 1
-fi
-
-SRC="$WORKSPACE"
-BUILD="$WORKSPACE/lldb-build"
-TEST="$WORKSPACE/test"
-RESULTS="$WORKSPACE/results"
-DEST="$RESULTS/llvm"
+                    set -u
+                    rm -rf build.properties
 
-LLVM_SRC="$SRC/llvm"
-LLDB_SRC="$SRC/llvm/tools/lldb"
-TESTCASES_DIR="$LLDB_SRC/test/testcases"
-LOGS_DIR="$TEST/logs"
-RESULTS_FILE="$TEST/results.xml"
+                    cd llvm-project
+                    git tag -a -m "First Commit" first_commit 97724f18c79c7cc81ced24239eb5e883bf1398ef || true
 
-CC="$WORKSPACE/host-compiler/bin/clang"
-CXX="$WORKSPACE/host-compiler/bin/clang++"
+                    git_desc=$(git describe --match "first_commit")
 
-TOOLS="clang lldb"
-PROJECTS=""
+                    export GIT_DISTANCE=$(echo ${git_desc} | cut -f 2 -d "-")
 
+                    sha=$(echo ${git_desc} | cut -f 3 -d "-")
+                    export GIT_SHA=${sha:1}
 
-echo "@@@ Clean @@@"
+                    cd -
 
-CLEAN_DIRS="$TEST $DEST $LOGS_DIR $RESULTS $BUILD/lldb-test-build.noindex"
+                    export PATH=$PATH:/usr/bin:/usr/local/bin
 
-if [ "$CLEAN" = "true" ]; then
-  CLEAN_DIRS="$BUILD $CLEAN_DIRS"
-fi
-
-for dir in $CLEAN_DIRS; do
-  if [ -d $dir ]; then
-    rm -rf $dir
-  fi
-  mkdir -p $dir
-done
-
-MODULE_CACHE=$(xcrun clang -fmodules -x c - -o /dev/null '-###' 2>&1 | grep -Eo '\\-fmodules-cache-path=[^"]+' | cut -d'=' -f2)
-if [ -d $MODULE_CACHE ]; then
-  rm -rf $MODULE_CACHE
-fi
-rm -rf $BUILD/*/module.cache
-
-rm -f $WORKSPACE/*.tgz
-
-echo "@@@@@@"
+                    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"
+                    '''
+                }
+            }
+        }
+        stage('Ninja Standalone Build (build tree)') {
+            steps {
+                timeout(90) {
+                    sh '''
+                    set -u
+                    rm -rf build.properties
 
-mkdir -p $BUILD
-cd $BUILD
+                    cd llvm-project
+                    git tag -a -m "First Commit" first_commit 97724f18c79c7cc81ced24239eb5e883bf1398ef || true
 
-echo "@@@ Setup @@@"
+                    git_desc=$(git describe --match "first_commit")
 
-{ /usr/local/bin/lldbsign unlock; } 2>/dev/null
+                    export GIT_DISTANCE=$(echo ${git_desc} | cut -f 2 -d "-")
 
-echo "@@@@@@"
+                    sha=$(echo ${git_desc} | cut -f 3 -d "-")
+                    export GIT_SHA=${sha:1}
 
-set +x
-echo "@@@ Environment @@@"
-env | sort
-echo "@@@@@@"
-set -eux
+                    cd -
 
-python $SCRIPT_PATH/build.py derive-llvm+clang+libcxx
-rsync -auvh --delete --exclude=.svn/ ${WORKSPACE}/lldb.src/ ${WORKSPACE}/lldb
+                    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('Build+Install LLVM, Clang, libcxx (Ninja, RelWithDebInfo)') {
+        stage('Ninja Standalone Build (install tree)') {
             steps {
-                timeout(activity: true, time: 30) {
+                timeout(90) {
                     sh '''
-set -eux
+                    set -u
+                    rm -rf build.properties
 
-# Avoid the python in /usr/local/bin.
-PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/jbin
+                    cd llvm-project
+                    git tag -a -m "First Commit" first_commit 97724f18c79c7cc81ced24239eb5e883bf1398ef || true
 
-if [ -z "WORKSPACE" ]; then
-    echo "WORKSPACE is not set."
-    exit 1
-fi
-
-SRC="$WORKSPACE"
-TEST="$WORKSPACE/test"
-DEST="$WORKSPACE/llvm-installtree"
-LLVM_SRC="$SRC/llvm"
-LLDB_SRC="$SRC/lldb"
-
-mkdir -p llvm-buildtree
-cd llvm-buildtree
-
-echo FIXME: The module map in an install tree seems to still have problems.
-
-echo "@@@ CMake @@@"
-cmake $LLVM_SRC \
-    -C$LLDB_SRC/cmake/caches/Apple-lldb-base.cmake \
-    -DCMAKE_INSTALL_PREFIX="" \
-    -DLLVM_INSTALL_UTILS=On \
-    -DLLVM_INSTALL_TOOLCHAIN_ONLY=Off \
-    -DLLVM_ENABLE_MODULES=Off \
-    -DLLVM_VERSION_PATCH=99 \
-    -DPYTHON_EXECUTABLE=/usr/bin/python2.7 \
-    -DPYTHON_LIBRARY=/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib \
-    -DPYTHON_INCLUDE_DIR=/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 \
-    -DPYTHON_LIBRARY_DEBUG=/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib \
-    -G Ninja
-echo "@@@@@@"
-
-echo "@@@ Build @@@"
-ninja
-echo "@@@@@@"
-
-echo "@@@ Install @@@"
-DESTDIR=$DEST ninja install
-echo "@@@@@@"
-                       '''
-                }
-            }
-        }
-        stage('Build+Test against build-tree (Ninja, Release)') {
-            steps {
-                timeout(activity: true, time: 30) {
-                    sh '''
-set -eux
+                    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}
 
-# Avoid the python in /usr/local/bin.
-PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/jbin
+                    cd -
 
-if [ -z "WORKSPACE" ]; then
-    echo "WORKSPACE is not set."
-    exit 1
-fi
-
-SRC="$WORKSPACE"
-BUILD="$WORKSPACE/lldb-against-buildtree"
-TEST="$WORKSPACE/test"
-DEST="$WORKSPACE/lldb-install"
-LLDB_SRC="$SRC/lldb"
-
-mkdir -p $BUILD
-cd $BUILD
-
-echo "@@@ CMake @@@"
-cmake -L $LLDB_SRC \
-    -C$LLDB_SRC/cmake/caches/Apple-lldb-macOS.cmake \
-    -DCMAKE_BUILD_TYPE=Release \
-    -DLLVM_VERSION_PATCH=99 \
-    -DLLVM_DIR=${WORKSPACE}/llvm-buildtree/lib/cmake/llvm \
-    -DClang_DIR=${WORKSPACE}/llvm-buildtree/lib/cmake/clang \
-    -DPYTHON_EXECUTABLE=/usr/bin/python2.7 \
-    -DPYTHON_LIBRARY=/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib \
-    -DPYTHON_INCLUDE_DIR=/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 \
-    -DPYTHON_LIBRARY_DEBUG=/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib \
-     -G Ninja
-echo "@@@@@@"
-
-echo "@@@ Build @@@"
-ninja
-echo "@@@@@@"
-
-echo "@@@ Test @@@"
-/usr/bin/env TERM=vt100 ninja -v check-lldb
-echo "@@@@@@"
+                    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('Build against install-tree (Ninja, Release)') {
+        stage('Xcode Standalone Build (build tree)') {
             steps {
-                timeout(activity: true, time: 30) {
+                timeout(90) {
                     sh '''
-set -eux
+                    set -u
+                    rm -rf build.properties
 
-# Avoid the python in /usr/local/bin.
-PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/jbin
+                    cd llvm-project
+                    git tag -a -m "First Commit" first_commit 97724f18c79c7cc81ced24239eb5e883bf1398ef || true
 
-if [ -z "WORKSPACE" ]; then
-    echo "WORKSPACE is not set."
-    exit 1
-fi
-
-SRC="$WORKSPACE"
-BUILD="$WORKSPACE/lldb-against-installtree"
-TEST="$WORKSPACE/test"
-DEST="$WORKSPACE/lldb-install"
-LLDB_SRC="$SRC/lldb"
-
-mkdir -p $BUILD
-cd $BUILD
-
-echo "@@@ CMake @@@"
-cmake -L $LLDB_SRC \
-    -C$LLDB_SRC/cmake/caches/Apple-lldb-macOS.cmake \
-    -DCMAKE_BUILD_TYPE=Release \
-    -DLLVM_ENABLE_MODULES=Off \
-    -DLLVM_VERSION_PATCH=99 \
-    -DLLVM_EXTERNAL_LIT=${WORKSPACE}/llvm-buildtree/bin/llvm-lit \
-    -DLLVM_DIR=${WORKSPACE}/llvm-installtree/lib/cmake/llvm \
-    -DClang_DIR=${WORKSPACE}/llvm-installtree/lib/cmake/clang \
-    -DPYTHON_EXECUTABLE=/usr/bin/python2.7 \
-    -DPYTHON_LIBRARY=/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib \
-    -DPYTHON_INCLUDE_DIR=/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 \
-    -DPYTHON_LIBRARY_DEBUG=/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib \
-    -G Ninja
-echo "@@@@@@"
-
-echo "@@@ Compile @@@"
-ninja
-echo "@@@@@@"
+                    git_desc=$(git describe --match "first_commit")
 
-                       '''
-                }
-            }
-        }
-        stage('Build+Test against build-tree (Xcode, Debug)') {
-            steps {
-                timeout(activity: true, time: 30) {
-                    sh '''
-set -eux
+                    export GIT_DISTANCE=$(echo ${git_desc} | cut -f 2 -d "-")
 
+                    sha=$(echo ${git_desc} | cut -f 3 -d "-")
+                    export GIT_SHA=${sha:1}
 
-# Avoid the python in /usr/local/bin.
-PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/jbin
+                    cd -
 
-if [ -z "WORKSPACE" ]; then
-    echo "WORKSPACE is not set."
-    exit 1
-fi
-
-SRC="$WORKSPACE"
-BUILD="$WORKSPACE/lldb-xcode-against-buildtree"
-TEST="$WORKSPACE/test"
-DEST="$WORKSPACE/lldb-install"
-LLDB_SRC="$SRC/lldb"
-
-mkdir -p $BUILD
-cd $BUILD
-
-echo "@@@ CMake @@@"
-cmake -L $LLDB_SRC \
-    -C$LLDB_SRC/cmake/caches/Apple-lldb-Xcode.cmake \
-    -DLLVM_VERSION_PATCH=99 \
-    -DLLVM_DIR=${WORKSPACE}/llvm-buildtree/lib/cmake/llvm \
-    -DClang_DIR=${WORKSPACE}/llvm-buildtree/lib/cmake/clang \
-    -DPYTHON_EXECUTABLE=/usr/bin/python2.7 \
-    -DPYTHON_LIBRARY=/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib \
-    -DPYTHON_INCLUDE_DIR=/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 \
-    -DPYTHON_LIBRARY_DEBUG=/System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib \
-     -G Xcode
-echo "@@@@@@"
-
-echo "@@@ Build @@@"
-cmake --build . --config Debug
-echo "@@@@@@"
-
-echo "@@@ Test @@@"
-cmake --build . --config Debug --target lldb-test-deps
-cd ${BUILD}/lit && /usr/bin/env TERM=vt100 /usr/bin/python2.7 ${WORKSPACE}/llvm-buildtree/bin/llvm-lit --verbose --param build_mode=Debug ${BUILD}/lit
-echo "@@@@@@"
+                    export PATH=$PATH:/usr/bin:/usr/local/bin
 
-                       '''
-                }
-            }
-        }
-        stage('Cleanup') {
-            steps {
-                timeout(activity: true, time: 30) {
-                    sh '''
-set -eux
-# Avoid the python in /usr/local/bin.
-PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/jbin
-
-if [ -z "WORKSPACE" ]; then
-    echo "WORKSPACE is not set."
-    exit 1
-fi
-
-SRC="$WORKSPACE"
-BUILD="$WORKSPACE/lldb-build"
-
-# Delete directories that would get deleted first thing by the next build anyway.
-rm -rf $BUILD/*/lldb-test-build.noindex $BUILD/*/module.cache
-                       '''
+                    python $WORKSPACE/llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-xcode build \
+                      --assertions \
+                      --cmake-type=Release
+                    '''
                 }
             }
         }




More information about the llvm-commits mailing list