Skip to content

Commit ba5cbbc

Browse files
committed
Allow only running one compiler
1 parent 254f05f commit ba5cbbc

1 file changed

Lines changed: 66 additions & 20 deletions

File tree

Jenkinsfile-bleeding-edge-monthly

Lines changed: 66 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ utils = new org.stan.Utils()
88
def runTests(String testPath, boolean jumbo = false) {
99
try {
1010
if (jumbo && !params.disableJumbo) {
11-
sh "python3 runTests.py -j${env.PARALLEL} ${testPath} --jumbo --debug"
11+
sh "python3 runTests.py -j${PARALLEL} ${testPath} --jumbo --debug"
1212
} else {
13-
sh "python3 runTests.py -j${env.PARALLEL} ${testPath}"
13+
sh "python3 runTests.py -j${PARALLEL} ${testPath}"
1414
}
1515
}
1616
finally { junit 'test/**/*.xml' }
@@ -39,7 +39,6 @@ pipeline {
3939
preserveStashes(buildCount: 7)
4040
}
4141
parameters {
42-
booleanParam(defaultValue: false, name: 'buildDocker', description: 'Build docker image with latest gcc, clang')
4342
string(defaultValue: 'develop', name: 'cmdstan_pr',
4443
description: "CmdStan PR to test against. Will check out this PR in the downstream Stan repo. Example: PR-123")
4544
string(defaultValue: 'develop', name: 'stan_pr',
@@ -48,17 +47,21 @@ pipeline {
4847
description: "Math PR to test against. Will check out this PR in the downstream Math repo. Example: PR-123")
4948
string(defaultValue: 'master', name: 'stanc3_pr',
5049
description: "Stanc3 PR to test against. Will check out this PR in the downstream Math repo. Example: PR-123")
50+
booleanParam(defaultValue: true, name: 'run_gcc', description: "Run GCC?")
51+
booleanParam(defaultValue: true, name: 'run_clang', description: "Run clang?")
5152
booleanParam(defaultValue: true, description: 'Run Full Unit Tests', name: 'run_full_unit_tests')
5253
booleanParam(defaultValue: true, description: 'Run CmdStan & Math tests', name: 'run_cmdstan_math_tests')
53-
string(name: 'custom_gcc_tag', description: "Example: 13.3.0 | See: https://api.github.com/repos/gcc-mirror/gcc/tags")
54-
string(name: 'custom_llvm_tag', description: "Example: 19.1.0-rc4 | See: https://api.github.com/repos/llvm/llvm-project/tags")
54+
55+
booleanParam(defaultValue: false, name: 'buildDocker', description: 'Build docker image with latest gcc, clang')
5556
booleanParam(defaultValue: true, name: 'build_gcc', description: "Build gcc part ?")
57+
string(name: 'custom_gcc_tag', description: "Example: 13.3.0 | See: https://api.github.com/repos/gcc-mirror/gcc/tags")
5658
booleanParam(defaultValue: true, name: 'build_llvm', description: "build llvm part ?")
59+
string(name: 'custom_llvm_tag', description: "Example: 19.1.0-rc4 | See: https://api.github.com/repos/llvm/llvm-project/tags")
60+
5761
}
5862
environment {
5963
STAN_NUM_THREADS = 4
6064
N_TESTS = 100
61-
PARALLEL = 4
6265
GCC = 'g++'
6366
}
6467
stages {
@@ -240,6 +243,12 @@ pipeline {
240243
}
241244
parallel {
242245
stage('Rev/Fwd Unit Tests - CLANG') {
246+
when {
247+
beforeAgent true
248+
expression {
249+
params.run_clang
250+
}
251+
}
243252
agent {
244253
docker {
245254
image 'stanorg/ci:bleeding-edge-compilers'
@@ -261,6 +270,12 @@ pipeline {
261270
post { always { retry(3) { deleteDir() } } }
262271
}
263272
stage('Mix Unit Tests - CLANG') {
273+
when {
274+
beforeAgent true
275+
expression {
276+
params.run_clang
277+
}
278+
}
264279
agent {
265280
docker {
266281
image 'stanorg/ci:bleeding-edge-compilers'
@@ -281,6 +296,12 @@ pipeline {
281296
post { always { retry(3) { deleteDir() } } }
282297
}
283298
stage('Prim Unit Tests - CLANG') {
299+
when {
300+
beforeAgent true
301+
expression {
302+
params.run_clang
303+
}
304+
}
284305
agent {
285306
docker {
286307
image 'stanorg/ci:bleeding-edge-compilers'
@@ -304,6 +325,12 @@ pipeline {
304325
post { always { retry(3) { deleteDir() } } }
305326
}
306327
stage('Rev/Fwd Unit Tests - GCC') {
328+
when {
329+
beforeAgent true
330+
expression {
331+
params.run_gcc
332+
}
333+
}
307334
agent {
308335
docker {
309336
image 'stanorg/ci:bleeding-edge-compilers'
@@ -325,6 +352,12 @@ pipeline {
325352
post { always { retry(3) { deleteDir() } } }
326353
}
327354
stage('Mix Unit Tests - GCC') {
355+
when {
356+
beforeAgent true
357+
expression {
358+
params.run_gcc
359+
}
360+
}
328361
agent {
329362
docker {
330363
image 'stanorg/ci:bleeding-edge-compilers'
@@ -345,6 +378,12 @@ pipeline {
345378
post { always { retry(3) { deleteDir() } } }
346379
}
347380
stage('Prim Unit Tests - GCC') {
381+
when {
382+
beforeAgent true
383+
expression {
384+
params.run_gcc
385+
}
386+
}
348387
agent {
349388
docker {
350389
image 'stanorg/ci:bleeding-edge-compilers'
@@ -377,6 +416,12 @@ pipeline {
377416
}
378417
parallel {
379418
stage("Model end-to-end - CLANG") {
419+
when {
420+
beforeAgent true
421+
expression {
422+
params.run_clang
423+
}
424+
}
380425
agent {
381426
docker {
382427
image 'stanorg/ci:bleeding-edge-compilers'
@@ -410,8 +455,8 @@ pipeline {
410455
make print-compiler-flags
411456
make -j4 examples/bernoulli/bernoulli; ./bin/stanc --version; cd ..
412457
echo "STANCFLAGS += --O1" >> cmdstan/make/local
413-
./runPerformanceTests.py -j${env.PARALLEL} --overwrite-golds --runs=0 --tests-file all.tests --num-samples=20
414-
./runPerformanceTests.py -j${env.PARALLEL} --runs=0 ../stanc3/test/integration/good
458+
./runPerformanceTests.py -j${PARALLEL} --overwrite-golds --runs=0 --tests-file all.tests --num-samples=20
459+
./runPerformanceTests.py -j${PARALLEL} --runs=0 ../stanc3/test/integration/good
415460
"""
416461
}
417462

@@ -429,6 +474,12 @@ pipeline {
429474
post { always { sh "rm -rf ${env.WORKSPACE}/compile-end-to-end-O=1/*" }}
430475
}
431476
stage("Model end-to-end - GCC") {
477+
when {
478+
beforeAgent true
479+
expression {
480+
params.run_gcc
481+
}
482+
}
432483
agent {
433484
docker {
434485
image 'stanorg/ci:bleeding-edge-compilers'
@@ -462,8 +513,8 @@ pipeline {
462513
make print-compiler-flags
463514
make -j4 examples/bernoulli/bernoulli; ./bin/stanc --version; cd ..
464515
echo "STANCFLAGS += --O1" >> cmdstan/make/local
465-
./runPerformanceTests.py -j${env.PARALLEL} --overwrite-golds --runs=0 --tests-file all.tests --num-samples=20
466-
./runPerformanceTests.py -j${env.PARALLEL} --runs=0 ../stanc3/test/integration/good
516+
./runPerformanceTests.py -j${PARALLEL} --overwrite-golds --runs=0 --tests-file all.tests --num-samples=20
517+
./runPerformanceTests.py -j${PARALLEL} --runs=0 ../stanc3/test/integration/good
467518
"""
468519
}
469520

@@ -484,15 +535,10 @@ pipeline {
484535
}
485536

486537
}
487-
//post {
488-
// always {
489-
// node("linux") {
490-
// recordIssues enabledForFailure: false, tool: clang()
491-
// }
492-
// }
493-
// success { script { utils.mailBuildResults("SUCCESSFUL") } }
494-
// unstable { script { utils.mailBuildResults("UNSTABLE") } }
495-
// failure { script { utils.mailBuildResults("FAILURE") } }
496-
//}
538+
post {
539+
success { script { utils.mailBuildResults("SUCCESSFUL") } }
540+
unstable { script { utils.mailBuildResults("UNSTABLE") } }
541+
failure { script { utils.mailBuildResults("FAILURE") } }
542+
}
497543
}
498544

0 commit comments

Comments
 (0)