Unverified Commit da3ef689 by Tianqi Chen Committed by GitHub

[CI] Always run cpptest during build to ensure library correctness (#3147)

parent b131d836
...@@ -92,10 +92,13 @@ def make(docker_type, path, make_flag) { ...@@ -92,10 +92,13 @@ def make(docker_type, path, make_flag) {
timeout(time: max_time, unit: 'MINUTES') { timeout(time: max_time, unit: 'MINUTES') {
try { try {
sh "${docker_run} ${docker_type} ./tests/scripts/task_build.sh ${path} ${make_flag}" sh "${docker_run} ${docker_type} ./tests/scripts/task_build.sh ${path} ${make_flag}"
// always run cpp test when build
sh "${docker_run} ${docker_type} ./tests/scripts/task_cpp_unittest.sh"
} catch (exc) { } catch (exc) {
echo 'Incremental compilation failed. Fall back to build from scratch' echo 'Incremental compilation failed. Fall back to build from scratch'
sh "${docker_run} ${docker_type} ./tests/scripts/task_clean.sh ${path}" sh "${docker_run} ${docker_type} ./tests/scripts/task_clean.sh ${path}"
sh "${docker_run} ${docker_type} ./tests/scripts/task_build.sh ${path} ${make_flag}" sh "${docker_run} ${docker_type} ./tests/scripts/task_build.sh ${path} ${make_flag}"
sh "${docker_run} ${docker_type} ./tests/scripts/task_cpp_unittest.sh"
} }
} }
} }
...@@ -183,7 +186,6 @@ stage('Build') { ...@@ -183,7 +186,6 @@ stage('Build') {
make(ci_cpu, 'build', '-j2') make(ci_cpu, 'build', '-j2')
pack_lib('cpu', tvm_lib) pack_lib('cpu', tvm_lib)
timeout(time: max_time, unit: 'MINUTES') { timeout(time: max_time, unit: 'MINUTES') {
sh "${docker_run} ${ci_cpu} ./tests/scripts/task_cpp_unittest.sh"
sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta.sh" sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta.sh"
sh "${docker_run} ${ci_cpu} ./tests/scripts/task_rust.sh" sh "${docker_run} ${ci_cpu} ./tests/scripts/task_rust.sh"
sh "${docker_run} ${ci_cpu} ./tests/scripts/task_golang.sh" sh "${docker_run} ${ci_cpu} ./tests/scripts/task_golang.sh"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment