message: Try to execute tests on windows as well
diff: @@ -12,11 +12,17 @@ def checkout_pr(String repo, String pr) {
  """
  }
  -pipeline {
  - agent any
  - options {
  - disableConcurrentBuilds()
  +def runTests(String prefix = "") {
  + unstash 'CmdStanSetup'
  + writeFile(file: "make/local", text: "CC = ${env.CXX}")
  + """ make -j${env.PARALLEL} build
  + ${prefix}runCmdStanTests.py src/test/interface
  + """
  }
  +
  +pipeline {
  + agent none
  + options { skipDefaultCheckout() }
  parameters {
  string(defaultValue: '', name: 'stan_pr',
  description: "Stan PR to test against. Will check out this PR in the downstream Stan repo.")
  @@ -25,10 +31,10 @@ pipeline {
  }
  stages {
  stage('Clean & Setup') {
  + agent any
  steps {
  + retry(3) { checkout scm }
  sh 'git clean -xffd'
  - sh 'git submodule update --init --recursive'
  - sh 'make stan-revert'
  script {
  if (params.stan_pr != '') {
  checkout_pr("stan", params.stan_pr)
  @@ -37,26 +43,37 @@ pipeline {
  checkout_pr("math", params.math_pr)
  }
  }
  - sh "echo 'CC=${env.CXX}' > make/local"
  - sh "echo 'CXXFLAGS += -Werror' >> make/local"
  - sh "echo 'MAKEVARS=-j{env.PARALLEL}' >> make/local"
  + stash 'CmdStanSetup'
  }
  + post { always { deleteDir() }}
  }
  - stage('Interface tests') {
  - steps { sh './runCmdStanTests.py src/test/interface' }
  + stage('Parallel tests') {
  + failFast true
  + parallel {
  + stage('Windows interface tests') {
  + agent { label 'windows' }
  + steps { bat runTests() }
  + post { always { deleteDir() }}
  + }
  + stage('Non-windows interface tests') {
  + agent any
  + steps {
  + sh runTests("./")
  + warnings consoleParsers: [[parserName: 'GNU C Compiler 4 (gcc)']], failedTotalAll: '0', usePreviousBuildAsReference: false, canRunOnFailed: true
  + warnings consoleParsers: [[parserName: 'Clang (LLVM based)']], failedTotalAll: '0', usePreviousBuildAsReference: false, canRunOnFailed: true
  + }
  + post { always { deleteDir() } }
  }
  stage('Manual') {
  + agent any
  steps {
  + unstash 'CmdStanSetup'
  sh 'make manual'
  archiveArtifacts 'doc/*'
  }
  + post { always { deleteDir() }}
  }
  }
  - post {
  - always {
  - warnings consoleParsers: [[parserName: 'GNU C Compiler 4 (gcc)']], failedTotalAll: '0', usePreviousBuildAsReference: false, canRunOnFailed: true
  - warnings consoleParsers: [[parserName: 'Clang (LLVM based)']], failedTotalAll: '0', usePreviousBuildAsReference: false, canRunOnFailed: true
  - deleteDir()
  }
  }
  }
  