Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use -fsyntax-only in Jenkins #1350

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
44 changes: 6 additions & 38 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def tagName() {
}
}

def runPerformanceTests(String testsPath, String stancFlags = ""){
def checkCompilation(String testsPath, String stancFlags = ""){
unstash 'ubuntu-exe'

sh """
Expand Down Expand Up @@ -54,7 +54,7 @@ def runPerformanceTests(String testsPath, String stancFlags = ""){
echo 'O=0' >> make/local
echo 'CXXFLAGS+=-Wall' >> make/local
make -j${env.PARALLEL} build; cd ..
./runPerformanceTests.py -j${env.PARALLEL} --runs=0 ${testsPath}
python ./checkCompilation.py -j${env.PARALLEL} --syntax-only ${testsPath}
"""
}

Expand Down Expand Up @@ -284,16 +284,8 @@ pipeline {
dir("${env.WORKSPACE}/compile-tests-good"){
unstash "Stanc3Setup"
script {
runPerformanceTests("../test/integration/good", params.stanc_flags)
checkCompilation("../test/integration/good", params.stanc_flags)
}

xunit([GoogleTest(
deleteOutputFiles: false,
failIfNotNew: true,
pattern: 'performance-tests-cmdstan/performance.xml',
skipNoTestFiles: false,
stopProcessingIfError: false)
])
}
}
post { always { runShell("rm -rf ${env.WORKSPACE}/compile-tests-good/*") }}
Expand All @@ -316,16 +308,8 @@ pipeline {
dir("${env.WORKSPACE}/compile-tests-example"){
script {
unstash "Stanc3Setup"
runPerformanceTests("example-models", params.stanc_flags)
checkCompilation("example-models", params.stanc_flags)
}

xunit([GoogleTest(
deleteOutputFiles: false,
failIfNotNew: true,
pattern: 'performance-tests-cmdstan/performance.xml',
skipNoTestFiles: false,
stopProcessingIfError: false)
])
}
}
post { always { runShell("rm -rf ${env.WORKSPACE}/compile-tests-example/*") }}
Expand Down Expand Up @@ -353,16 +337,8 @@ pipeline {
dir("${env.WORKSPACE}/compile-good-O1"){
unstash "Stanc3Setup"
script {
runPerformanceTests("../test/integration/good", "--O1")
checkCompilation("../test/integration/good", "--O1")
}

xunit([GoogleTest(
deleteOutputFiles: false,
failIfNotNew: true,
pattern: 'performance-tests-cmdstan/performance.xml',
skipNoTestFiles: false,
stopProcessingIfError: false)
])
}
}
post { always { runShell("rm -rf ${env.WORKSPACE}/compile-good-O1/*") }}
Expand Down Expand Up @@ -390,16 +366,8 @@ pipeline {
dir("${env.WORKSPACE}/compile-example-O1"){
script {
unstash "Stanc3Setup"
runPerformanceTests("example-models", "--O1")
checkCompilation("example-models", "--O1")
}

xunit([GoogleTest(
deleteOutputFiles: false,
failIfNotNew: true,
pattern: 'performance-tests-cmdstan/performance.xml',
skipNoTestFiles: false,
stopProcessingIfError: false)
])
}
}
post { always { runShell("rm -rf ${env.WORKSPACE}/compile-example-O1/*") }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ model {
target += sum(vec);

row_vector[N] vec3;

{
row_vector[N] vec4 = columns_dot_self(X);
vec3 = vec4;
Expand Down
8 changes: 4 additions & 4 deletions test/integration/good/compiler-optimizations/cpp.expected
Original file line number Diff line number Diff line change
Expand Up @@ -4495,10 +4495,10 @@ static constexpr std::array<const char*, 16> locations_array__ =
" (in 'copy-prop-profile.stan', line 11, column 2 to line 14, column 3)",
" (in 'copy-prop-profile.stan', line 18, column 13 to column 14)",
" (in 'copy-prop-profile.stan', line 18, column 2 to column 21)",
" (in 'copy-prop-profile.stan', line 20, column 15 to column 16)",
" (in 'copy-prop-profile.stan', line 20, column 4 to column 45)",
" (in 'copy-prop-profile.stan', line 19, column 2 to line 22, column 3)",
" (in 'copy-prop-profile.stan', line 24, column 2 to column 22)",
" (in 'copy-prop-profile.stan', line 21, column 15 to column 16)",
" (in 'copy-prop-profile.stan', line 21, column 4 to column 45)",
" (in 'copy-prop-profile.stan', line 20, column 2 to line 23, column 3)",
" (in 'copy-prop-profile.stan', line 25, column 2 to column 22)",
" (in 'copy-prop-profile.stan', line 2, column 2 to column 17)",
" (in 'copy-prop-profile.stan', line 5, column 9 to column 10)",
" (in 'copy-prop-profile.stan', line 5, column 11 to column 12)"};
Expand Down
10 changes: 5 additions & 5 deletions test/integration/good/compiler-optimizations/cppO0.expected
Original file line number Diff line number Diff line change
Expand Up @@ -1979,11 +1979,11 @@ static constexpr std::array<const char*, 19> locations_array__ =
" (in 'copy-prop-profile.stan', line 16, column 2 to column 21)",
" (in 'copy-prop-profile.stan', line 18, column 13 to column 14)",
" (in 'copy-prop-profile.stan', line 18, column 2 to column 21)",
" (in 'copy-prop-profile.stan', line 20, column 15 to column 16)",
" (in 'copy-prop-profile.stan', line 20, column 4 to column 45)",
" (in 'copy-prop-profile.stan', line 21, column 4 to column 16)",
" (in 'copy-prop-profile.stan', line 19, column 2 to line 22, column 3)",
" (in 'copy-prop-profile.stan', line 24, column 2 to column 22)",
" (in 'copy-prop-profile.stan', line 21, column 15 to column 16)",
" (in 'copy-prop-profile.stan', line 21, column 4 to column 45)",
" (in 'copy-prop-profile.stan', line 22, column 4 to column 16)",
" (in 'copy-prop-profile.stan', line 20, column 2 to line 23, column 3)",
" (in 'copy-prop-profile.stan', line 25, column 2 to column 22)",
" (in 'copy-prop-profile.stan', line 2, column 2 to column 17)",
" (in 'copy-prop-profile.stan', line 5, column 9 to column 10)",
" (in 'copy-prop-profile.stan', line 5, column 11 to column 12)"};
Expand Down
10 changes: 5 additions & 5 deletions test/integration/good/compiler-optimizations/cppO1.expected
Original file line number Diff line number Diff line change
Expand Up @@ -1953,11 +1953,11 @@ static constexpr std::array<const char*, 19> locations_array__ =
" (in 'copy-prop-profile.stan', line 16, column 2 to column 21)",
" (in 'copy-prop-profile.stan', line 18, column 13 to column 14)",
" (in 'copy-prop-profile.stan', line 18, column 2 to column 21)",
" (in 'copy-prop-profile.stan', line 20, column 15 to column 16)",
" (in 'copy-prop-profile.stan', line 20, column 4 to column 45)",
" (in 'copy-prop-profile.stan', line 21, column 4 to column 16)",
" (in 'copy-prop-profile.stan', line 19, column 2 to line 22, column 3)",
" (in 'copy-prop-profile.stan', line 24, column 2 to column 22)",
" (in 'copy-prop-profile.stan', line 21, column 15 to column 16)",
" (in 'copy-prop-profile.stan', line 21, column 4 to column 45)",
" (in 'copy-prop-profile.stan', line 22, column 4 to column 16)",
" (in 'copy-prop-profile.stan', line 20, column 2 to line 23, column 3)",
" (in 'copy-prop-profile.stan', line 25, column 2 to column 22)",
" (in 'copy-prop-profile.stan', line 2, column 2 to column 17)",
" (in 'copy-prop-profile.stan', line 5, column 9 to column 10)",
" (in 'copy-prop-profile.stan', line 5, column 11 to column 12)"};
Expand Down