Add CI job definitions using our new templated pipelines to llvm-project, this way we can enable multi branch pipelines which trigger for changes on a given branch. By storing the Jenkinfile definitions in llvm-project, we gain the benefit of enabling Jenkins multi branch pipelines. This means in the future, expanding a job configuration to build with a new branch is as simple as updating a regular expression in Jenkins (the regular expression represents which branches should be built). The work required for enabling testing new branches becomes minimal, and furthermore we would have a great deal of confidence that job configurations across branches remain identical. I will verify these new jenkinsfiles work before deprecating the old definitions in zorg
36 lines
970 B
Groovy
36 lines
970 B
Groovy
branchName = 'main'
|
|
|
|
library identifier: "zorg-shared-lib@${branchName}",
|
|
retriever: modernSCM([
|
|
$class: 'GitSCMSource',
|
|
remote: "https://github.com/llvm/llvm-zorg.git",
|
|
credentialsId: scm.userRemoteConfigs[0].credentialsId
|
|
])
|
|
|
|
clangPipeline(
|
|
jobName: env.JOB_NAME,
|
|
zorgBranch: branchName,
|
|
stages: ['checkout', 'build'],
|
|
buildConfig: [
|
|
stage: 1,
|
|
build_type: 'cmake',
|
|
build_target: 'all',
|
|
cmake_type: 'default',
|
|
assertions: true,
|
|
timeout: 360,
|
|
incremental: false,
|
|
cmake_flags: [
|
|
"-DLLVM_ENABLE_EXPENSIVE_CHECKS=ON",
|
|
"-DLIBCXX_ENABLE_SHARED=OFF",
|
|
"-DLIBCXX_ENABLE_STATIC=OFF",
|
|
"-DLIBCXX_INCLUDE_TESTS=OFF",
|
|
"-DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF"
|
|
]
|
|
],
|
|
testConfig: [
|
|
junit_patterns: [
|
|
"clang-build/**/testresults.xunit.xml"
|
|
]
|
|
]
|
|
)
|