Skip to content

Commit 8ad5c98

Browse files
committed
jenkins: do deeper submodule clones, normalize across platforms
1 parent cc5119b commit 8ad5c98

1 file changed

Lines changed: 12 additions & 16 deletions

File tree

Jenkinsfile

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,19 @@ LDFLAGS_OPENCL=-L/usr/local/cuda/targets/x86_64-linux/lib
150150
def integration_tests_flags = params.compile_all_models ? '--no-ignore-models' : ''
151151
def runIntegration = { args ->
152152
def pre = args.pre ?: ''
153+
deleteDir()
154+
checkout scmGit(userRemoteConfigs: [[url: 'https://github.com/stan-dev/performance-tests-cmdstan']],
155+
extensions: [cloneOption(shallow: true, depth: 2), submodule(recursiveSubmodules: true, shallow: true, depth: 32)])
156+
dir('stanc3') {
157+
checkout scmGit(userRemoteConfigs: [[url: 'https://github.com/stan-dev/stanc3']],
158+
extensions: [cloneOption(shallow: true, depth: 8)])
159+
}
160+
checkoutPR('cmdstan', params.cmdstan_pr)
153161
dir('cmdstan/stan') {
154162
checkout scm
155-
writeFile(file: 'make/local', text: stanc3_bin_url) // only used on linux
163+
writeFile(file: 'make/local', text: stanc3_bin_url)
156164
}
157-
writeFile(file: 'cmdstan/make/local', text: args.local)
165+
writeFile(file: 'cmdstan/make/local', text: args.local+"\n$stanc3_bin_url")
158166
batsh pre + """
159167
make -C cmdstan -j\$PARALLEL build
160168
python3 ./runPerformanceTests.py -j\$PARALLEL $integration_tests_flags --runs=0 stanc3/test/integration/good
@@ -172,32 +180,20 @@ LDFLAGS_OPENCL=-L/usr/local/cuda/targets/x86_64-linux/lib
172180
parallel linux: {
173181
runPod(image: image, checkout: false, cpus: 16, memory: '128Gi') {
174182
stage('Integration Linux') {
175-
checkout scmGit(userRemoteConfigs: [[url: 'https://github.com/stan-dev/performance-tests-cmdstan']],
176-
extensions: [cloneOption(shallow: true, depth: 2), submodule(recursiveSubmodules: true, shallow: true, depth: 2)])
177-
/* not sure why only linux does these: */
178-
dir('stanc3') {
179-
checkout scmGit(userRemoteConfigs: [[url: 'https://github.com/stan-dev/stanc3']],
180-
extensions: [cloneOption(shallow: true, depth: 2)])
181-
}
182-
checkoutPR('cmdstan', params.cmdstan_pr)
183-
runIntegration(local: "O=0\nCXX=${LINUX_CXX}\n$stanc3_bin_url")
183+
runIntegration(local: "O=0\nCXX=${LINUX_CXX}")
184184
}
185185
}
186186
}, mac: {
187187
if (!params.downstream && (env.BRANCH_NAME == 'develop' || env.BRANCH_NAME == 'master') || params.run_tests_all_os) {
188188
node('macos') {
189189
stage('Integration Mac') {
190-
checkout scmGit(userRemoteConfigs: [[url: 'https://github.com/stan-dev/performance-tests-cmdstan']],
191-
extensions: [cleanBeforeCheckout(), cloneOption(shallow: true, depth: 2), submodule(recursiveSubmodules: true, shallow: true, depth: 2)])
192-
runIntegration(local: "O=0\nCXX=${MAC_CXX}\n")
190+
runIntegration(local: "O=0\nCXX=${MAC_CXX}")
193191
}
194192
}
195193
}
196194
}, windows: {
197195
node('windows') {
198196
stage('Integration Windows') {
199-
checkout scmGit(userRemoteConfigs: [[url: 'https://github.com/stan-dev/performance-tests-cmdstan']],
200-
extensions: [cleanBeforeCheckout(), cloneOption(shallow: true, depth: 2), submodule(recursiveSubmodules: true, shallow: true, depth: 2)])
201197
withEnv(["PATH+TBB=${WORKSPACE}\\cmdstan\\stan\\lib\\stan_math\\lib\\tbb"]) {
202198
runIntegration(local: "CXX=${WIN_CXX}\nPRECOMPILED_HEADERS=true\n", pre: WINSETENV)
203199
}

0 commit comments

Comments
 (0)