Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/header_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Header checks

on:
pull_request:
branches: [ develop, master ]
push:
branches: [ develop, master ]
paths-ignore:
- 'doygen/**'
- 'hooks/**'
- 'licenses/**'
- 'LICENSE.md'
- 'README.md'
- 'RELEASE-NOTES.txt'

jobs:
windows:
name: Windows
runs-on: windows-latest

steps:
- uses: n1hility/cancel-previous-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
workflow: c-cpp.yml
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master' && github.ref != 'refs/heads/develop'"

- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '2.x'

- name: Print g++/mingw32-make version and path
run: |
g++ --version
Get-Command g++ | Select-Object -ExpandProperty Definition
mingw32-make --version
Get-Command mingw32-make | Select-Object -ExpandProperty Definition
shell: powershell

- name: Build Math libs
shell: powershell
run: mingw32-make -f make/standalone math-libs

- name: Run header tests
shell: powershell
run: make -j2 test-headers

opencl:
name: OpenCL
runs-on: ubuntu-latest

steps:
- uses: n1hility/cancel-previous-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
workflow: c-cpp.yml
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master' && github.ref != 'refs/heads/develop'"

- uses: actions/checkout@v2

- name: Run header tests
run: |
echo "STAN_OPENCL=true" > make/local
make -j2 test-headers
79 changes: 24 additions & 55 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ pipeline {
string(defaultValue: '', name: 'stan_pr', description: 'PR to test Stan upstream against e.g. PR-630')
booleanParam(defaultValue: false, name: 'withRowVector', description: 'Run additional distribution tests on RowVectors (takes 5x as long)')
booleanParam(defaultValue: false, name: 'gpu_async', description: 'Run the OpenCL tests on both a sync (AMD) GPU and an async (NVIDIA) one.')
booleanParam(defaultValue: false, name: 'run_win_tests', description: 'Run full unit tests on Windows.')
}
options {
skipDefaultCheckout()
Expand Down Expand Up @@ -220,6 +221,7 @@ pipeline {
!skipRemainingStages
}
}
failFast true
parallel {
stage('MPI tests') {
agent { label 'linux && mpi' }
Expand All @@ -243,7 +245,6 @@ pipeline {
sh "echo STAN_OPENCL=true>> make/local"
sh "echo OPENCL_PLATFORM_ID=0>> make/local"
sh "echo OPENCL_DEVICE_ID=${OPENCL_DEVICE_ID}>> make/local"
sh "make -j${env.PARALLEL} test-headers"
runTests("test/unit/math/opencl")
runTests("test/unit/math/prim/fun/gp_exp_quad_cov_test")
runTests("test/unit/math/prim/fun/mdivide_left_tri_test")
Expand All @@ -268,7 +269,6 @@ pipeline {
sh "echo STAN_OPENCL=true>> make/local"
sh "echo OPENCL_PLATFORM_ID=0>> make/local"
sh "echo OPENCL_DEVICE_ID=${OPENCL_DEVICE_ID}>> make/local"
sh "make -j${env.PARALLEL} test-headers"
runTests("test/unit/math/opencl")
runTests("test/unit/math/prim/fun/gp_exp_quad_cov_test")
runTests("test/unit/math/prim/fun/mdivide_left_tri_test")
Expand Down Expand Up @@ -310,79 +310,48 @@ pipeline {
agent any
steps {
script {
if (isUnix()) {
deleteDir()
unstash 'MathSetup'
sh "echo CXX=${env.CXX} -Werror > make/local"
sh "echo CPPFLAGS+=-DSTAN_THREADS >> make/local"
sh "export STAN_NUM_THREADS=4"
deleteDir()
unstash 'MathSetup'
sh "echo CXX=${env.CXX} -Werror > make/local"
sh "echo STAN_THREADS=true >> make/local"
sh "export STAN_NUM_THREADS=4"
if (isBranch('develop') || isBranch('master')) {
runTests("test/unit")
sh "find . -name *_test.xml | xargs rm"
} else {
runTests("test/unit -f thread")
sh "find . -name *_test.xml | xargs rm"
runTests("test/unit -f map_rect")
sh "find . -name *_test.xml | xargs rm"
runTests("test/unit -f reduce_sum")
} else {
deleteDirWin()
unstash 'MathSetup'
bat "echo CXX=${env.CXX} -Werror > make/local"
bat "echo CXXFLAGS+=-DSTAN_THREADS >> make/local"
runTestsWin("test/unit -f thread", false)
runTestsWin("test/unit -f map_rect", false)
runTestsWin("test/unit -f reduce_sum", false)
runTests("test/unit -f reduce_sum")
}
}
}
post { always { retry(3) { deleteDir() } } }
}
stage('Windows Headers & Unit') {
when {
allOf {
anyOf {
branch 'develop'
branch 'master'
expression { params.run_win_tests }
}
expression {
!skipRemainingStages
}
}
}
agent { label 'windows' }
steps {
deleteDirWin()
unstash 'MathSetup'
bat "mingw32-make.exe -f make/standalone math-libs"
bat "mingw32-make -j${env.PARALLEL} test-headers"
runTestsWin("test/unit", false, true)
}
}
}
}
stage('Additional merge tests') {
when {
allOf {
anyOf {
branch 'develop'
branch 'master'
}
expression {
!skipRemainingStages
}
}
}
parallel {
stage('Linux Unit with Threading') {
agent { label 'linux' }
steps {
deleteDir()
unstash 'MathSetup'
sh "echo CXX=${GCC} >> make/local"
sh "echo CXXFLAGS=-DSTAN_THREADS >> make/local"
runTests("test/unit")
}
post { always { retry(3) { deleteDir() } } }
}
stage('Mac Unit with Threading') {
agent { label 'osx' }
steps {
deleteDir()
unstash 'MathSetup'
sh "echo CC=${env.CXX} -Werror > make/local"
sh "echo CXXFLAGS+=-DSTAN_THREADS >> make/local"
runTests("test/unit")
}
post { always { retry(3) { deleteDir() } } }
}
}
}
stage('Upstream tests') {
when {
allOf {
Expand Down