[green dragon] add lldb windows/ubuntu jobs (#185488)
* Add LLDB jobs for windows and ubuntu 2404
This commit is contained in:
117
.ci/green-dragon/lldb-ubuntu.groovy
Normal file
117
.ci/green-dragon/lldb-ubuntu.groovy
Normal file
@@ -0,0 +1,117 @@
|
||||
pipeline {
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
buildDiscarder(logRotator(numToKeepStr: '30'))
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
|
||||
parameters {
|
||||
string(name: 'LABEL', defaultValue: params.LABEL ?: 'linux-x86_64', description: 'Node label to run on')
|
||||
|
||||
string(name: 'BUILD_TYPE', defaultValue: params.BUILD_TYPE ?: 'Release', description: 'Default CMake build type; one of: Release, Debug, ...')
|
||||
}
|
||||
|
||||
agent {
|
||||
node {
|
||||
label params.LABEL
|
||||
}
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Setup Docker') {
|
||||
steps {
|
||||
withCredentials([string(credentialsId: 'aws_account', variable: 'AWS_ACCOUNT_ID')]) {
|
||||
script {
|
||||
env.AWS_DEFAULT_REGION = 'us-west-2'
|
||||
env.DOCKER_SERVER = "${AWS_ACCOUNT_ID}.dkr.ecr.${env.AWS_DEFAULT_REGION}.amazonaws.com"
|
||||
def tag = (params.LABEL == 'linux-aarch64')
|
||||
? 'main-ci-ecr-8ce5c7b:swift-ci-ubuntu2404-aarch64'
|
||||
: 'main-ci-ecr-8ce5c7b:swift-ci-ubuntu2404'
|
||||
env.DOCKER_IMAGE = "${env.DOCKER_SERVER}/${tag}"
|
||||
}
|
||||
sh "aws ecr get-login-password --region ${env.AWS_DEFAULT_REGION} | docker login --username AWS --password-stdin ${env.DOCKER_SERVER} 2>/dev/null"
|
||||
sh "docker pull ${env.DOCKER_IMAGE}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
timeout(30) {
|
||||
dir('llvm-project') {
|
||||
checkout scm
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Print Machine Info') {
|
||||
steps {
|
||||
sh """
|
||||
docker run --rm \\
|
||||
${env.DOCKER_IMAGE} \\
|
||||
bash -c "cmake --version; ninja --version; python3 --version; swig -version"
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build and Test') {
|
||||
steps {
|
||||
timeout(240) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
writeFile file: 'build.sh', text: '''#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
/usr/bin/cmake -G Ninja \
|
||||
-S /workspace/llvm-project/llvm \
|
||||
-B /workspace/llvm-build \
|
||||
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
|
||||
-DLLDB_ENABLE_CURSES=ON \
|
||||
-DLLDB_ENABLE_LIBXML2=ON \
|
||||
-DLLDB_ENABLE_LUA=OFF \
|
||||
-DLLDB_ENABLE_LZMA=OFF \
|
||||
-DLLDB_ENABLE_PYTHON=FORCE_ON \
|
||||
-DLLDB_ENABLE_SWIG=FORCE_ON \
|
||||
-DLLVM_BUILD_TOOLS=TRUE \
|
||||
-DLLVM_ENABLE_ASSERTIONS:BOOL=TRUE \
|
||||
-DLLVM_ENABLE_LIBEDIT=FORCE_ON \
|
||||
-DLLVM_ENABLE_LIBXML2=FORCE_ON \
|
||||
-DLLVM_BUILD_UTILS=TRUE \
|
||||
-DLLVM_ENABLE_PROJECTS="clang;lldb" \
|
||||
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind;compiler-rt" \
|
||||
-DLLVM_OPTIMIZED_TABLEGEN:BOOL=TRUE \
|
||||
-DLLVM_TARGETS_TO_BUILD=Native \
|
||||
-DLLVM_USE_SPLIT_DWARF=TRUE \
|
||||
"-DLLVM_LIT_ARGS=-v --time-tests --param color_output --xunit-xml-output=/workspace/llvm-build/test/results.xml" \
|
||||
-DLLDB_ENFORCE_STRICT_TEST_REQUIREMENTS=ON
|
||||
|
||||
ninja -C /workspace/llvm-build check-lldb
|
||||
'''
|
||||
sh """
|
||||
mkdir -p llvm-build/test
|
||||
chmod -R 777 llvm-build
|
||||
chmod +x build.sh
|
||||
docker run --rm \\
|
||||
--security-opt=no-new-privileges \\
|
||||
--cap-add=SYS_PTRACE \\
|
||||
--security-opt seccomp=unconfined \\
|
||||
-e BUILD_TYPE=${params.BUILD_TYPE} \\
|
||||
-v "\${WORKSPACE}:/workspace" \\
|
||||
${env.DOCKER_IMAGE} \\
|
||||
bash /workspace/build.sh
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
junit allowEmptyResults: true, testResults: 'llvm-build/test/results.xml'
|
||||
}
|
||||
cleanup {
|
||||
deleteDir()
|
||||
}
|
||||
}
|
||||
}
|
||||
101
.ci/green-dragon/lldb-windows.groovy
Normal file
101
.ci/green-dragon/lldb-windows.groovy
Normal file
@@ -0,0 +1,101 @@
|
||||
pipeline {
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
buildDiscarder(logRotator(numToKeepStr: '30'))
|
||||
skipDefaultCheckout()
|
||||
}
|
||||
|
||||
parameters {
|
||||
string(name: 'LABEL', defaultValue: params.LABEL ?: 'windows-server-2019', description: 'Node label to run on')
|
||||
|
||||
string(name: 'BUILD_TYPE', defaultValue: params.BUILD_TYPE ?: 'Release', description: 'Default CMake build type; one of: Release, Debug, ...')
|
||||
}
|
||||
|
||||
agent {
|
||||
node {
|
||||
label params.LABEL
|
||||
}
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Pull Docker Image') {
|
||||
steps {
|
||||
bat 'docker pull swiftlang/swift-ci:lldb-windowsservercore-1809'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
timeout(30) {
|
||||
dir('llvm-project') {
|
||||
checkout scm
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Print Machine Info') {
|
||||
steps {
|
||||
bat '''
|
||||
docker run --rm ^
|
||||
swiftlang/swift-ci:lldb-windowsservercore-1809 ^
|
||||
powershell -Command "cmake --version; ninja --version; python --version; swig -version"
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build and Test') {
|
||||
steps {
|
||||
timeout(240) {
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
writeFile file: 'build.bat', text: '''@echo off
|
||||
call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat" || exit /b 1
|
||||
|
||||
cmake -G Ninja ^
|
||||
-S llvm ^
|
||||
-B ..\\llvm-build\\ ^
|
||||
-DCMAKE_BUILD_TYPE=%BUILD_TYPE% ^
|
||||
-DCMAKE_INSTALL_PREFIX=..\\llvm-install\\base ^
|
||||
-DCMAKE_TOOLCHAIN_FILE=C:\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake ^
|
||||
-DLLVM_ENABLE_PROJECTS="clang;lldb" ^
|
||||
-DLLVM_ENABLE_ASSERTIONS=ON ^
|
||||
-DLLVM_ENABLE_LIBEDIT=OFF ^
|
||||
-DLLVM_OPTIMIZED_TABLEGEN=ON ^
|
||||
-DLLVM_BUILD_TOOLS=ON ^
|
||||
-DLLVM_BUILD_UTILS=ON ^
|
||||
-DLLVM_ENABLE_LIBXML2=FORCE_ON ^
|
||||
-DLLDB_ENABLE_SWIG=ON ^
|
||||
-DLLDB_ENABLE_PYTHON=ON ^
|
||||
-DLLDB_ENABLE_LUA=OFF ^
|
||||
-DLLDB_ENABLE_LIBXML2=ON ^
|
||||
-DLLVM_TARGETS_TO_BUILD=Native ^
|
||||
-DLLVM_LIT_ARGS="-v --time-tests --xunit-xml-output=C:\\workspace\\llvm-build\\test\\results.xml" ^
|
||||
-DPython3_EXECUTABLE="C:\\Program Files\\Python313\\python.exe" || exit /b 1
|
||||
|
||||
if not exist ..\\llvm-build\\test mkdir ..\\llvm-build\\test
|
||||
|
||||
ninja check-lldb -C ..\\llvm-build || exit /b 1
|
||||
'''
|
||||
bat '''
|
||||
docker run --rm ^
|
||||
-e BUILD_TYPE=%BUILD_TYPE% ^
|
||||
-v "%CD%:C:\\workspace" ^
|
||||
-w "C:\\workspace\\llvm-project" ^
|
||||
swiftlang/swift-ci:lldb-windowsservercore-1809 ^
|
||||
cmd /C C:\\workspace\\build.bat
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
junit allowEmptyResults: true, testResults: 'llvm-build/test/results.xml'
|
||||
}
|
||||
cleanup {
|
||||
deleteDir()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user