| #!/usr/bin/env groovy |
| |
| pipeline { |
| options { |
| disableConcurrentBuilds() |
| } |
| |
| parameters { |
| string(name: 'LABEL', defaultValue: params.LABEL ?: 'macos-x86_64', description: 'Node label to run on') |
| |
| string(name: 'GIT_SHA', defaultValue: params.GIT_REVISION ?: '*/main', description: 'Git commit to build.') |
| |
| string(name: 'BUILD_TYPE', defaultValue: params.BUILD_TYPE ?: 'Release', description: 'Default CMake build type; one of: Release, Debug, ...') |
| |
| booleanParam(name: 'CLEAN', defaultValue: params.CLEAN ?: false, description: 'Wipe the build directory?') |
| } |
| |
| agent { |
| node { |
| label params.LABEL |
| } |
| } |
| environment { |
| MATRIX_COMMON_BUILD_PARAMETERS = '--cmake-flag=-DLLVM_TARGETS_TO_BUILD=X86' |
| PATH="$PATH:/usr/bin:/usr/local/bin" |
| } |
| stages { |
| stage('Checkout') { |
| steps { |
| timeout(30) { |
| dir('llvm-project') { |
| checkout([$class: 'GitSCM', branches: [ |
| [name: params.GIT_SHA] |
| ], userRemoteConfigs: [ |
| [url: 'https://github.com/llvm/llvm-project.git'] |
| ], extensions: [ |
| [$class: 'CloneOption', |
| noTags: true, timeout: 30] |
| ]]) |
| } |
| dir('llvm-zorg') { |
| checkout([$class: 'GitSCM', branches: [ |
| [name: '*/main'] |
| ], userRemoteConfigs: [ |
| [url: 'https://github.com/llvm/llvm-zorg.git'] |
| ], extensions: [ |
| [$class: 'CloneOption', |
| reference: '/Users/Shared/llvm-zorg.git'] |
| ]]) |
| } |
| } |
| } |
| } |
| stage('Setup Venv') { |
| steps { |
| sh ''' |
| # Non-incremental, so always delete. |
| rm -rf venv |
| python3 -m venv venv |
| set +u |
| source ./venv/bin/activate |
| pip install -r ./llvm-zorg/zorg/jenkins/jobs/requirements.txt |
| set -u |
| ''' |
| } |
| } |
| stage('Build LLDB') { |
| steps { |
| timeout(90) { |
| sh ''' |
| set -u |
| rm -rf build.properties |
| |
| source ./venv/bin/activate |
| |
| 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 - |
| |
| rm -rf lldb-build/bin/debugserver |
| |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake build \ |
| $MATRIX_COMMON_BUILD_PARAMETERS \ |
| --assertions \ |
| --projects="clang;lldb" \ |
| --runtimes="libcxx;libcxxabi;libunwind" \ |
| --cmake-type=Release \ |
| --dotest-flag="--skip-category gmodules" \ |
| --dotest-flag="--arch=x86_64" |
| ''' |
| script { |
| def LLDB = new org.swift.LLDB() |
| LLDB.LLDB_prepare() |
| } |
| } |
| } |
| } |
| stage('Test DWARF2') { |
| steps { |
| timeout(60) { |
| sh ''' |
| source ./venv/bin/activate |
| |
| export PATH=$PATH:/usr/bin:/usr/local/bin |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix configure \ |
| $MATRIX_COMMON_BUILD_PARAMETERS \ |
| --assertions \ |
| --lldb-test-compiler="$WORKSPACE/lldb-build/bin/clang" \ |
| --projects="clang;lldb" \ |
| --runtimes="libcxx;libcxxabi;libunwind" \ |
| --cmake-type=Release \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="gmodules" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="watchpoint" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="llgs" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="debugserver" \ |
| --dotest-flag="--arch=x86_64" \ |
| --dotest-flag="--dwarf-version=2" |
| |
| # Give the system some time to recover. |
| sleep 120 |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix test || echo "** check-lldb failed with errors" |
| ''' |
| } |
| junit 'test/results.xml' |
| } |
| } |
| stage('Test DWARF4') { |
| steps { |
| timeout(60) { |
| sh ''' |
| source ./venv/bin/activate |
| |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix configure \ |
| $MATRIX_COMMON_BUILD_PARAMETERS \ |
| --lldb-test-compiler="$WORKSPACE/lldb-build/bin/clang" \ |
| --assertions \ |
| --projects="clang;lldb" \ |
| --runtimes="libcxx;libcxxabi;libunwind" \ |
| --cmake-type=Release \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="gmodules" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="watchpoint" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="llgs" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="debugserver" \ |
| --dotest-flag="--arch=x86_64" \ |
| --dotest-flag="--dwarf-version=4" |
| |
| # Give the system some time to recover. |
| sleep 120 |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix test || echo "** check-lldb failed with errors" |
| ''' |
| } |
| junit 'test/results.xml' |
| } |
| } |
| stage('Test DWARF5') { |
| steps { |
| timeout(60) { |
| sh ''' |
| source ./venv/bin/activate |
| |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix configure \ |
| $MATRIX_COMMON_BUILD_PARAMETERS \ |
| --lldb-test-compiler="$WORKSPACE/lldb-build/bin/clang" \ |
| --assertions \ |
| --projects="clang;lldb" \ |
| --runtimes="libcxx;libcxxabi;libunwind" \ |
| --cmake-type=Release \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="gmodules" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="watchpoint" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="llgs" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="debugserver" \ |
| --dotest-flag="--arch=x86_64" \ |
| --dotest-flag="--dwarf-version=5" |
| |
| # Give the system some time to recover. |
| sleep 120 |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix test || echo "** check-lldb failed with errors" |
| ''' |
| } |
| junit 'test/results.xml' |
| } |
| } |
| stage('Build Clang 17.0.6') { |
| steps { |
| timeout(30) { |
| dir('clang_1706') { |
| checkout([$class: 'GitSCM', branches: [ |
| [name: "llvmorg-17.0.6"] |
| ], userRemoteConfigs: [ |
| [url: 'https://github.com/llvm/llvm-project.git'] |
| ], extensions: [ |
| [$class: 'CloneOption', timeout: 30, |
| timeout: 30] |
| ]]) |
| } |
| } |
| timeout(90) { |
| sh ''' |
| export PATH=$PATH:/usr/bin:/usr/local/bin |
| export SRC_DIR='clang_1706' |
| export BUILD_DIR='clang_1706_build' |
| |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py cmake build \ |
| $MATRIX_COMMON_BUILD_PARAMETERS \ |
| --assertions \ |
| --noupload \ |
| --noinstall \ |
| --projects="clang" \ |
| --runtimes="libcxx;libcxxabi;libunwind" |
| ''' |
| } |
| } |
| } |
| stage('Test Clang 17.0.6') { |
| steps { |
| timeout(60) { |
| sh ''' |
| source ./venv/bin/activate |
| |
| build_dir=$WORKSPACE/clang_1706_build |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix configure \ |
| $MATRIX_COMMON_BUILD_PARAMETERS \ |
| --assertions \ |
| --lldb-test-compiler="$build_dir/bin/clang" \ |
| --projects="clang;lldb" \ |
| --runtimes="libcxx;libcxxabi;libunwind" \ |
| --cmake-type=Release \ |
| --dotest-flag="--libcxx-include-dir=$build_dir/include/c++/v1/" \ |
| --dotest-flag="--libcxx-library-dir=$build_dir/lib/" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="gmodules" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="watchpoint" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="llgs" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="debugserver" \ |
| --dotest-flag="--arch=x86_64" |
| |
| # Give the system some time to recover. |
| sleep 120 |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix test || echo "** check-lldb failed with errors" |
| ''' |
| } |
| junit 'test/results.xml' |
| } |
| } |
| stage('Build Clang 15.0.1') { |
| steps { |
| timeout(30) { |
| dir('clang_1501') { |
| checkout([$class: 'GitSCM', branches: [ |
| [name: "llvmorg-15.0.1"] |
| ], userRemoteConfigs: [ |
| [url: 'https://github.com/llvm/llvm-project.git'] |
| ], extensions: [ |
| [$class: 'CloneOption', timeout: 30, |
| timeout: 30] |
| ]]) |
| } |
| } |
| timeout(90) { |
| sh ''' |
| source ./venv/bin/activate |
| |
| export SRC_DIR='clang_1501' |
| export BUILD_DIR='clang_1501_build' |
| |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py cmake build \ |
| $MATRIX_COMMON_BUILD_PARAMETERS \ |
| --assertions \ |
| --noupload \ |
| --noinstall \ |
| --projects="clang;libcxx;libcxxabi" |
| ''' |
| } |
| } |
| } |
| stage('Test Clang 15.0.1') { |
| steps { |
| timeout(60) { |
| sh ''' |
| source ./venv/bin/activate |
| |
| build_dir=$WORKSPACE/clang_1501_build |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix configure \ |
| $MATRIX_COMMON_BUILD_PARAMETERS \ |
| --assertions \ |
| --lldb-test-compiler="$build_dir/bin/clang" \ |
| --projects="clang;lldb" \ |
| --runtimes="libcxx;libcxxabi;libunwind" \ |
| --cmake-type=Release \ |
| --dotest-flag="--libcxx-include-dir=$build_dir/include/c++/v1/" \ |
| --dotest-flag="--libcxx-library-dir=$build_dir/lib/" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="gmodules" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="watchpoint" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="llgs" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="debugserver" \ |
| --dotest-flag="--arch=x86_64" |
| |
| # Give the system some time to recover. |
| sleep 120 |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix test || echo "** check-lldb failed with errors" |
| ''' |
| } |
| junit 'test/results.xml' |
| } |
| } |
| stage('Build Clang 13.0.0') { |
| steps { |
| timeout(30) { |
| dir('clang_1300') { |
| checkout([$class: 'GitSCM', branches: [ |
| [name: "llvmorg-13.0.0"] |
| ], userRemoteConfigs: [ |
| [url: 'https://github.com/llvm/llvm-project.git'] |
| ], extensions: [ |
| [$class: 'CloneOption', timeout: 30, |
| timeout: 30] |
| ]]) |
| } |
| } |
| timeout(90) { |
| sh ''' |
| source ./venv/bin/activate |
| |
| export SRC_DIR='clang_1300' |
| export BUILD_DIR='clang_1300_build' |
| |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py cmake build \ |
| $MATRIX_COMMON_BUILD_PARAMETERS \ |
| --assertions \ |
| --noupload \ |
| --noinstall \ |
| --projects="clang;libcxx;libcxxabi" |
| ''' |
| } |
| } |
| } |
| stage('Test Clang 13.0.0') { |
| steps { |
| timeout(60) { |
| sh ''' |
| source ./venv/bin/activate |
| |
| build_dir=$WORKSPACE/clang_1300_build |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix configure \ |
| $MATRIX_COMMON_BUILD_PARAMETERS \ |
| --assertions \ |
| --lldb-test-compiler="$build_dir/bin/clang" \ |
| --projects="clang;lldb" \ |
| --runtimes="libcxx;libcxxabi;libunwind" \ |
| --cmake-type=Release \ |
| --dotest-flag="--libcxx-include-dir=$build_dir/include/c++/v1/" \ |
| --dotest-flag="--libcxx-library-dir=$build_dir/lib/" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="gmodules" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="watchpoint" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="llgs" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="debugserver" \ |
| --dotest-flag="--arch=x86_64" |
| |
| # Give the system some time to recover. |
| sleep 120 |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix test || echo "** check-lldb failed with errors" |
| ''' |
| } |
| junit 'test/results.xml' |
| } |
| } |
| stage('Build Clang 11.0.1') { |
| steps { |
| timeout(30) { |
| dir('clang_1101') { |
| checkout([$class: 'GitSCM', branches: [ |
| [name: "llvmorg-11.0.1"] |
| ], userRemoteConfigs: [ |
| [url: 'https://github.com/llvm/llvm-project.git'] |
| ], extensions: [ |
| [$class: 'CloneOption', timeout: 30, |
| timeout: 30] |
| ]]) |
| } |
| } |
| timeout(90) { |
| sh ''' |
| source ./venv/bin/activate |
| |
| export SRC_DIR='clang_1101' |
| export BUILD_DIR='clang_1101_build' |
| |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py cmake build \ |
| $MATRIX_COMMON_BUILD_PARAMETERS \ |
| --assertions \ |
| --noupload \ |
| --noinstall \ |
| --projects="clang;libcxx;libcxxabi" |
| ''' |
| } |
| } |
| } |
| stage('Test Clang 11.0.1') { |
| steps { |
| timeout(60) { |
| sh ''' |
| source ./venv/bin/activate |
| |
| build_dir=$WORKSPACE/clang_1101_build |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix configure \ |
| $MATRIX_COMMON_BUILD_PARAMETERS \ |
| --assertions \ |
| --lldb-test-compiler="$build_dir/bin/clang" \ |
| --projects="clang;lldb" \ |
| --runtimes="libcxx;libcxxabi;libunwind" \ |
| --cmake-type=Release \ |
| --dotest-flag="--libcxx-include-dir=$build_dir/include/c++/v1/" \ |
| --dotest-flag="--libcxx-library-dir=$build_dir/lib/" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="gmodules" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="watchpoint" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="llgs" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="debugserver" \ |
| --dotest-flag="--arch=x86_64" |
| |
| # Give the system some time to recover. |
| sleep 120 |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix test || echo "** check-lldb failed with errors" |
| ''' |
| } |
| 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: 'https://github.com/llvm/llvm-project.git'] |
| ], extensions: [ |
| [$class: 'CloneOption', timeout: 30, |
| timeout: 30] |
| ]]) |
| } |
| } |
| timeout(90) { |
| sh ''' |
| source ./venv/bin/activate |
| |
| export SRC_DIR='clang_900' |
| export BUILD_DIR='clang_900_build' |
| |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py cmake build \ |
| $MATRIX_COMMON_BUILD_PARAMETERS \ |
| --assertions \ |
| --noupload \ |
| --noinstall \ |
| --projects="clang;libcxx;libcxxabi" |
| ''' |
| } |
| } |
| } |
| stage('Test Clang 9.0.0') { |
| steps { |
| timeout(60) { |
| sh ''' |
| source ./venv/bin/activate |
| |
| build_dir=$WORKSPACE/clang_900_build |
| |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix configure \ |
| $MATRIX_COMMON_BUILD_PARAMETERS \ |
| --assertions \ |
| --lldb-test-compiler="$build_dir/bin/clang" \ |
| --projects="clang;lldb" \ |
| --runtimes="libcxx;libcxxabi;libunwind" \ |
| --cmake-type=Release \ |
| --dotest-flag="--libcxx-include-dir=$build_dir/include/c++/v1/" \ |
| --dotest-flag="--libcxx-library-dir=$build_dir/lib/" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="gmodules" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="watchpoint" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="llgs" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="debugserver" \ |
| --dotest-flag="--arch=x86_64" |
| |
| # Give the system some time to recover. |
| sleep 120 |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix test || echo "** check-lldb failed with errors" |
| ''' |
| } |
| 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: 'https://github.com/llvm/llvm-project.git'] |
| ], extensions: [ |
| [$class: 'CloneOption', timeout: 30, |
| timeout: 30] |
| ]]) |
| } |
| } |
| timeout(90) { |
| sh ''' |
| source ./venv/bin/activate |
| |
| export SRC_DIR='clang_701' |
| export BUILD_DIR='clang_701_build' |
| |
| source ./venv/bin/activate |
| |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py cmake build \ |
| $MATRIX_COMMON_BUILD_PARAMETERS \ |
| --assertions \ |
| --noupload \ |
| --noinstall \ |
| --projects="clang;libcxx;libcxxabi" |
| ''' |
| } |
| } |
| } |
| stage('Test Clang 7.0.1') { |
| steps { |
| timeout(60) { |
| sh ''' |
| source ./venv/bin/activate |
| |
| build_dir=$WORKSPACE/clang_701_build |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix configure \ |
| $MATRIX_COMMON_BUILD_PARAMETERS \ |
| --assertions \ |
| --lldb-test-compiler="$build_dir/bin/clang" \ |
| --projects="clang;lldb" \ |
| --runtimes="libcxx;libcxxabi;libunwind" \ |
| --cmake-type=Release \ |
| --dotest-flag="--libcxx-include-dir=$build_dir/include/c++/v1/" \ |
| --dotest-flag="--libcxx-library-dir=$build_dir/lib/" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="gmodules" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="watchpoint" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="llgs" \ |
| --dotest-flag="--skip-category" \ |
| --dotest-flag="debugserver" \ |
| --dotest-flag="--arch=x86_64" |
| |
| # Give the system some time to recover. |
| sleep 120 |
| python3 llvm-zorg/zorg/jenkins/monorepo_build.py lldb-cmake-matrix test || echo "** check-lldb failed with errors" |
| ''' |
| } |
| junit 'test/results.xml' |
| } |
| } |
| } |
| } |