Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions jenkins/github/asan.pipeline
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
pipeline {
agent {
docker {
image 'ci.trafficserver.apache.org/ats/ubuntu:23.04'
registryUrl 'https://ci.trafficserver.apache.org/'
label 'docker'
args '-v ${HOME}/ccache:/tmp/ccache:rw'
}
}
environment {
CCACHE_DIR = "/tmp/ccache"
CCACHE_BASEDIR = "${WORKSPACE}"
}
stages {
stage('Clone') {
steps {
dir('src') {
echo "${sha1}"
checkout([$class: 'GitSCM',
branches: [[name: sha1]],
extensions: [
// We have to set an idenity for the merge step because Git requires
// the user.name and user.email to be set to do a merge.
[$class: "UserIdentity",
name: "ATS CI User",
email: "noreply@trafficserver.apache.org"
],
[$class: "PreBuildMerge",
options: [
mergeTarget: "${GITHUB_PR_TARGET_BRANCH}",
fastForwardMode: "NO_FF",
mergeRemote: "origin",
mergeStrategy: "DEFAULT"
]
],
],
userRemoteConfigs: [[url: github_url, refspec: '+refs/pull/*:refs/remotes/origin/pr/*']]])
sh 'git show -n 10 --decorate --graph --oneline --no-patch'
}
echo 'Finished Cloning'
}
}
stage('Build') {
steps {
echo 'Starting build'
dir('src') {
sh '''#!/bin/bash

set -x
set -e

# We don't use c++20 features yet, but we want to make
# sure we can build with the flag set.
export CXXSTD=20

autoreconf -fiv
mkdir out_of_source_build_dir
cd out_of_source_build_dir
CC="clang" CXX="clang++" ../configure --enable-experimental-plugins --enable-example-plugins --enable-expensive-tests --prefix=/tmp/ats/ --enable-werror --enable-ccache --enable-asan
make -j4 V=1 Q=
make -j4 check VERBOSE=Y V=1
make install
/tmp/ats/bin/traffic_server -K -k -R 1
'''
}
}
}
}

post {
cleanup {
cleanWs()
}
}
}
40 changes: 29 additions & 11 deletions jenkins/github/toplevel.pipeline
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ TOP_JOB_DESC = "Builds:\\n"

String buildJob(String ghcontext, String jobName, String shard='') {
setGitHubPullRequestStatus(context: ghcontext, message: 'Building', state: 'PENDING')

if (currentBuild.description == null) {
currentBuild.description = "Builds:<br>"
}
Expand Down Expand Up @@ -40,7 +40,7 @@ String buildJob(String ghcontext, String jobName, String shard='') {

pipeline {
agent none

stages {
stage('Quick Checks') {
parallel {
Expand Down Expand Up @@ -92,7 +92,7 @@ pipeline {
}
}
}
}
}
}
}

Expand Down Expand Up @@ -120,7 +120,7 @@ pipeline {
environment name: 'GITHUB_PR_COMMENT_BODY_MATCH', value: ''
expression { GITHUB_PR_COMMENT_BODY_MATCH ==~ /.*fedora.*/ }
}
}
}
steps {
script {
result = buildJob('Fedora', 'Github_Builds/fedora')
Expand All @@ -136,7 +136,7 @@ pipeline {
environment name: 'GITHUB_PR_COMMENT_BODY_MATCH', value: ''
expression { GITHUB_PR_COMMENT_BODY_MATCH ==~ /.*debian.*/ }
}
}
}
steps {
script {
result = buildJob('Debian', 'Github_Builds/debian')
Expand All @@ -154,7 +154,7 @@ pipeline {
environment name: 'GITHUB_PR_COMMENT_BODY_MATCH', value: ''
expression { GITHUB_PR_COMMENT_BODY_MATCH ==~ /.*rocky.*/ }
}
}
}
steps {
script {
result = buildJob('Rocky', 'Github_Builds/rocky')
Expand Down Expand Up @@ -188,7 +188,7 @@ pipeline {
environment name: 'GITHUB_PR_COMMENT_BODY_MATCH', value: ''
expression { GITHUB_PR_COMMENT_BODY_MATCH ==~ /.*cmake.*/ }
}
}
}
steps {
script {
result = buildJob('CMake', 'Github_Builds/cmake')
Expand All @@ -198,14 +198,14 @@ pipeline {
}
}
}

stage('OSX Build') {
when {
anyOf {
environment name: 'GITHUB_PR_COMMENT_BODY_MATCH', value: ''
expression { GITHUB_PR_COMMENT_BODY_MATCH ==~ /.*osx.*/ }
}
}
}
steps {
script {
result = buildJob('OSX', 'Github_Builds/osx')
Expand All @@ -222,7 +222,7 @@ pipeline {
environment name: 'GITHUB_PR_COMMENT_BODY_MATCH', value: ''
expression { GITHUB_PR_COMMENT_BODY_MATCH ==~ /.*freebsd.*/ }
}
}
}
steps {
script {
result = buildJob('FreeBSD', 'Github_Builds/freebsd')
Expand All @@ -233,13 +233,30 @@ pipeline {
}
}

stage('ASan') {
when {
anyOf {
environment name: 'GITHUB_PR_COMMENT_BODY_MATCH', value: ''
expression { GITHUB_PR_COMMENT_BODY_MATCH ==~ /.*asan.*/ }
}
}
steps {
script {
result = buildJob('ASan', 'Github_Builds/asan')
if (result == 'FAILURE') {
error('ASan failed')
}
}
}
}

stage('Clang-Analyzer') {
when {
anyOf {
environment name: 'GITHUB_PR_COMMENT_BODY_MATCH', value: ''
expression { GITHUB_PR_COMMENT_BODY_MATCH ==~ /.*clang-analyzer.*/ }
}
}
}
steps {
script {
result = buildJob('Clang-Analyzer', 'Github_Builds/clang-analyzer')
Expand All @@ -249,6 +266,7 @@ pipeline {
}
}
}

stage('AuTest') {
when {
anyOf {
Expand Down