@@ -175,15 +175,29 @@ pipeline {
175175 }
176176 post { always { deleteDir() } }
177177 }
178- stage(' Linux Unit with MPI' ) {
179- agent { label ' linux && mpi' }
178+ stage(' Full Unit Tests' ) {
179+ agent any
180+ when {
181+ expression {
182+ ! skipRemainingStages
183+ }
184+ }
180185 steps {
181- deleteDir()
182- unstash ' MathSetup'
183- sh " echo CXX=${ MPICXX} >> make/local"
184- sh " echo CXX_TYPE=gcc >> make/local"
185- sh " echo STAN_MPI=true >> make/local"
186- runTests(" test/unit" )
186+ script {
187+ if (isUnix()) {
188+ deleteDir()
189+ unstash ' MathSetup'
190+ runTests(" test/unit/math/prim" )
191+ runTests(" test/unit/math/rev" )
192+ runTests(" test/unit" )
193+ } else {
194+ deleteDirWin()
195+ unstash ' MathSetup'
196+ runTestsWin(" test/unit/math/prim" )
197+ runTestsWin(" test/unit/math/rev" )
198+ runTestsWin(" test/unit" )
199+ }
200+ }
187201 }
188202 post { always { retry(3 ) { deleteDir() } } }
189203 }
@@ -194,7 +208,20 @@ pipeline {
194208 }
195209 }
196210 parallel {
197- stage(' Full unit with GPU' ) {
211+ stage(' MPI tests' ) {
212+ agent { label ' linux && mpi' }
213+ steps {
214+ deleteDir()
215+ unstash ' MathSetup'
216+ sh " echo CXX=${ MPICXX} >> make/local"
217+ sh " echo CXX_TYPE=gcc >> make/local"
218+ sh " echo STAN_MPI=true >> make/local"
219+ runTests(" test/unit/math/prim/functor" )
220+ runTests(" test/unit/math/rev/functor" )
221+ }
222+ post { always { retry(3 ) { deleteDir() } } }
223+ }
224+ stage(' OpenCL tests' ) {
198225 agent { label " gpu" }
199226 steps {
200227 deleteDir()
@@ -204,7 +231,13 @@ pipeline {
204231 sh " echo OPENCL_PLATFORM_ID=0>> make/local"
205232 sh " echo OPENCL_DEVICE_ID=${ OPENCL_DEVICE_ID} >> make/local"
206233 sh " make -j${ env.PARALLEL} test-headers"
207- runTests(" test/unit" )
234+ runTests(" test/unit/math/opencl" )
235+ runTests(" test/unit/math/prim/fun/gp_exp_quad_cov_test" )
236+ runTests(" test/unit/math/prim/fun/mdivide_left_tri_test" )
237+ runTests(" test/unit/math/prim/fun/mdivide_right_tri_test" )
238+ runTests(" test/unit/math/prim/fun/multiply_test" )
239+ runTests(" test/unit/math/rev/fun/mdivide_left_tri_test" )
240+ runTests(" test/unit/math/rev/fun/multiply_test" )
208241 }
209242 post { always { retry(3 ) { deleteDir() } } }
210243 }
@@ -238,14 +271,28 @@ pipeline {
238271 stage(' Threading tests' ) {
239272 agent any
240273 steps {
241- deleteDir()
242- unstash ' MathSetup'
243- sh " echo CXX=${ env.CXX} -Werror > make/local"
244- sh " echo CPPFLAGS+=-DSTAN_THREADS >> make/local"
245- sh " export STAN_NUM_THREADS=4"
246- runTests(" test/unit -f thread" )
247- sh " find . -name *_test.xml | xargs rm"
248- runTests(" test/unit -f map_rect" )
274+ script {
275+ if (isUnix()) {
276+ deleteDir()
277+ unstash ' MathSetup'
278+ sh " echo CXX=${ env.CXX} -Werror > make/local"
279+ sh " echo CPPFLAGS+=-DSTAN_THREADS >> make/local"
280+ sh " export STAN_NUM_THREADS=4"
281+ runTests(" test/unit -f thread" )
282+ sh " find . -name *_test.xml | xargs rm"
283+ runTests(" test/unit -f map_rect" )
284+ sh " find . -name *_test.xml | xargs rm"
285+ runTests(" test/unit -f reduce_sum" )
286+ } else {
287+ deleteDirWin()
288+ unstash ' MathSetup'
289+ bat " echo CXX=${ env.CXX} -Werror > make/local"
290+ bat " echo CXXFLAGS+=-DSTAN_THREADS >> make/local"
291+ runTestsWin(" test/unit -f thread" , false )
292+ runTestsWin(" test/unit -f map_rect" , false )
293+ runTestsWin(" test/unit -f reduce_sum" , false )
294+ }
295+ }
249296 }
250297 post { always { retry(3 ) { deleteDir() } } }
251298 }
@@ -259,17 +306,6 @@ pipeline {
259306 runTestsWin(" test/unit" , false )
260307 }
261308 }
262- stage(' Windows Threading' ) {
263- agent { label ' windows' }
264- steps {
265- deleteDirWin()
266- unstash ' MathSetup'
267- bat " echo CXX=${ env.CXX} -Werror > make/local"
268- bat " echo CXXFLAGS+=-DSTAN_THREADS >> make/local"
269- runTestsWin(" test/unit -f thread" )
270- runTestsWin(" test/unit -f map_rect" )
271- }
272- }
273309 }
274310 }
275311 stage(' Additional merge tests' ) {
0 commit comments