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

[ci] Add local test re-run info #11051

Merged
merged 2 commits into from
Apr 25, 2022
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
145 changes: 85 additions & 60 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
// 'python3 jenkins/generate.py'
// Note: This timestamp is here to ensure that updates to the Jenkinsfile are
// always rebased on main before merging:
// Generated at 2022-04-22T08:47:27.237503
// Generated at 2022-04-22T12:59:15.071304

import org.jenkinsci.plugins.pipeline.modeldefinition.Utils
// NOTE: these lines are scanned by docker/dev_common.sh. Please update the regex as needed. -->
Expand Down Expand Up @@ -89,7 +89,7 @@ microtvm_lib = 'build/microtvm_template_projects.tar.gz, ' + tvm_lib
upstream_revision = null

// command to start a docker container
docker_run = 'docker/bash.sh --env CI --env TVM_SHARD_INDEX --env TVM_NUM_SHARDS'
docker_run = 'docker/bash.sh --env CI --env TVM_SHARD_INDEX --env TVM_NUM_SHARDS --env RUN_DISPLAY_URL --env PLATFORM'
docker_build = 'docker/build.sh'
// timeout in minutes
max_time = 240
Expand Down Expand Up @@ -619,6 +619,7 @@ stage('Test') {
init_git()
timeout(time: max_time, unit: 'MINUTES') {
withEnv([
'PLATFORM=gpu',
'TVM_NUM_SHARDS=2',
'TVM_SHARD_INDEX=0'], {
unpack_lib('gpu2', tvm_multilib)
Expand Down Expand Up @@ -658,6 +659,7 @@ stage('Test') {
init_git()
timeout(time: max_time, unit: 'MINUTES') {
withEnv([
'PLATFORM=gpu',
'TVM_NUM_SHARDS=2',
'TVM_SHARD_INDEX=1'], {
unpack_lib('gpu2', tvm_multilib)
Expand Down Expand Up @@ -697,6 +699,7 @@ stage('Test') {
init_git()
timeout(time: max_time, unit: 'MINUTES') {
withEnv([
'PLATFORM=cpu',
'TVM_NUM_SHARDS=2',
'TVM_SHARD_INDEX=0'], {
unpack_lib('cpu', tvm_multilib_tsim)
Expand Down Expand Up @@ -724,6 +727,7 @@ stage('Test') {
init_git()
timeout(time: max_time, unit: 'MINUTES') {
withEnv([
'PLATFORM=cpu',
'TVM_NUM_SHARDS=2',
'TVM_SHARD_INDEX=1'], {
unpack_lib('cpu', tvm_multilib_tsim)
Expand All @@ -750,15 +754,17 @@ stage('Test') {
timeout(time: max_time, unit: 'MINUTES') {
try {
init_git()
unpack_lib('cpu', tvm_multilib_tsim)
ci_setup(ci_cpu)
cpp_unittest(ci_cpu)
python_unittest(ci_cpu)
fsim_test(ci_cpu)
sh (
script: "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta_tsim.sh",
label: 'Run VTA tests in TSIM',
)
withEnv(['PLATFORM=cpu'], {
unpack_lib('cpu', tvm_multilib_tsim)
ci_setup(ci_cpu)
cpp_unittest(ci_cpu)
python_unittest(ci_cpu)
fsim_test(ci_cpu)
sh (
script: "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta_tsim.sh",
label: 'Run VTA tests in TSIM',
)
})
} finally {
junit 'build/pytest-results/*.xml'
}
Expand All @@ -777,6 +783,7 @@ stage('Test') {
init_git()
timeout(time: max_time, unit: 'MINUTES') {
withEnv([
'PLATFORM=i386',
'TVM_NUM_SHARDS=2',
'TVM_SHARD_INDEX=0'], {
unpack_lib('i386', tvm_multilib)
Expand Down Expand Up @@ -807,6 +814,7 @@ stage('Test') {
init_git()
timeout(time: max_time, unit: 'MINUTES') {
withEnv([
'PLATFORM=i386',
'TVM_NUM_SHARDS=2',
'TVM_SHARD_INDEX=1'], {
unpack_lib('i386', tvm_multilib)
Expand Down Expand Up @@ -836,17 +844,19 @@ stage('Test') {
timeout(time: max_time, unit: 'MINUTES') {
try {
init_git()
unpack_lib('hexagon', tvm_lib)
ci_setup(ci_hexagon)
cpp_unittest(ci_hexagon)
sh (
script: "${docker_run} ${ci_hexagon} ./tests/scripts/task_build_hexagon_api.sh",
label: 'Build Hexagon API',
)
sh (
script: "${docker_run} ${ci_hexagon} ./tests/scripts/task_python_hexagon.sh",
label: 'Run Hexagon tests',
)
withEnv(['PLATFORM=hexagon'], {
unpack_lib('hexagon', tvm_lib)
ci_setup(ci_hexagon)
cpp_unittest(ci_hexagon)
sh (
script: "${docker_run} ${ci_hexagon} ./tests/scripts/task_build_hexagon_api.sh",
label: 'Build Hexagon API',
)
sh (
script: "${docker_run} ${ci_hexagon} ./tests/scripts/task_python_hexagon.sh",
label: 'Run Hexagon tests',
)
})
} finally {
junit 'build/pytest-results/*.xml'
}
Expand All @@ -864,21 +874,23 @@ stage('Test') {
timeout(time: max_time, unit: 'MINUTES') {
try {
init_git()
unpack_lib('qemu', microtvm_lib)
sh(
script: 'cd build && tar -xzvf microtvm_template_projects.tar.gz',
label: 'Unpack microtvm_template_projects'
)
ci_setup(ci_qemu)
cpp_unittest(ci_qemu)
sh (
script: "${docker_run} ${ci_qemu} ./tests/scripts/task_python_microtvm.sh",
label: 'Run microTVM tests',
)
sh (
script: "${docker_run} ${ci_qemu} ./tests/scripts/task_demo_microtvm.sh",
label: 'Run microTVM demos',
)
withEnv(['PLATFORM=qemu'], {
unpack_lib('qemu', microtvm_lib)
sh(
script: 'cd build && tar -xzvf microtvm_template_projects.tar.gz',
label: 'Unpack microtvm_template_projects'
)
ci_setup(ci_qemu)
cpp_unittest(ci_qemu)
sh (
script: "${docker_run} ${ci_qemu} ./tests/scripts/task_python_microtvm.sh",
label: 'Run microTVM tests',
)
sh (
script: "${docker_run} ${ci_qemu} ./tests/scripts/task_demo_microtvm.sh",
label: 'Run microTVM demos',
)
})
} finally {
junit 'build/pytest-results/*.xml'
}
Expand All @@ -896,17 +908,19 @@ stage('Test') {
timeout(time: max_time, unit: 'MINUTES') {
try {
init_git()
unpack_lib('arm', tvm_multilib)
ci_setup(ci_arm)
cpp_unittest(ci_arm)
sh (
script: "${docker_run} ${ci_arm} ./tests/scripts/task_python_arm_compute_library.sh",
label: 'Run test_arm_compute_lib test',
)
sh (
script: "${docker_run} ${ci_arm} ./tests/scripts/task_python_topi.sh",
label: 'Run TOPI tests',
)
withEnv(['PLATFORM=arm'], {
unpack_lib('arm', tvm_multilib)
ci_setup(ci_arm)
cpp_unittest(ci_arm)
sh (
script: "${docker_run} ${ci_arm} ./tests/scripts/task_python_arm_compute_library.sh",
label: 'Run test_arm_compute_lib test',
)
sh (
script: "${docker_run} ${ci_arm} ./tests/scripts/task_python_topi.sh",
label: 'Run TOPI tests',
)
})
} finally {
junit 'build/pytest-results/*.xml'
}
Expand All @@ -925,6 +939,7 @@ stage('Test') {
init_git()
timeout(time: max_time, unit: 'MINUTES') {
withEnv([
'PLATFORM=arm',
'TVM_NUM_SHARDS=2',
'TVM_SHARD_INDEX=0'], {
unpack_lib('arm', tvm_multilib)
Expand Down Expand Up @@ -953,6 +968,7 @@ stage('Test') {
init_git()
timeout(time: max_time, unit: 'MINUTES') {
withEnv([
'PLATFORM=arm',
'TVM_NUM_SHARDS=2',
'TVM_SHARD_INDEX=1'], {
unpack_lib('arm', tvm_multilib)
Expand Down Expand Up @@ -981,6 +997,7 @@ stage('Test') {
init_git()
timeout(time: max_time, unit: 'MINUTES') {
withEnv([
'PLATFORM=gpu',
'TVM_NUM_SHARDS=2',
'TVM_SHARD_INDEX=0'], {
unpack_lib('gpu', tvm_multilib)
Expand Down Expand Up @@ -1008,6 +1025,7 @@ stage('Test') {
init_git()
timeout(time: max_time, unit: 'MINUTES') {
withEnv([
'PLATFORM=gpu',
'TVM_NUM_SHARDS=2',
'TVM_SHARD_INDEX=1'], {
unpack_lib('gpu', tvm_multilib)
Expand Down Expand Up @@ -1035,6 +1053,7 @@ stage('Test') {
init_git()
timeout(time: max_time, unit: 'MINUTES') {
withEnv([
'PLATFORM=gpu',
'TVM_NUM_SHARDS=3',
'TVM_SHARD_INDEX=0'], {
unpack_lib('gpu', tvm_multilib)
Expand Down Expand Up @@ -1062,6 +1081,7 @@ stage('Test') {
init_git()
timeout(time: max_time, unit: 'MINUTES') {
withEnv([
'PLATFORM=gpu',
'TVM_NUM_SHARDS=3',
'TVM_SHARD_INDEX=1'], {
unpack_lib('gpu', tvm_multilib)
Expand Down Expand Up @@ -1089,6 +1109,7 @@ stage('Test') {
init_git()
timeout(time: max_time, unit: 'MINUTES') {
withEnv([
'PLATFORM=gpu',
'TVM_NUM_SHARDS=3',
'TVM_SHARD_INDEX=2'], {
unpack_lib('gpu', tvm_multilib)
Expand All @@ -1115,12 +1136,14 @@ stage('Test') {
timeout(time: max_time, unit: 'MINUTES') {
try {
init_git()
unpack_lib('cpu', tvm_multilib)
ci_setup(ci_cpu)
sh (
script: "${docker_run} ${ci_cpu} ./tests/scripts/task_python_frontend_cpu.sh",
label: 'Run Python frontend tests',
)
withEnv(['PLATFORM=cpu'], {
unpack_lib('cpu', tvm_multilib)
ci_setup(ci_cpu)
sh (
script: "${docker_run} ${ci_cpu} ./tests/scripts/task_python_frontend_cpu.sh",
label: 'Run Python frontend tests',
)
})
} finally {
junit 'build/pytest-results/*.xml'
}
Expand All @@ -1138,12 +1161,14 @@ stage('Test') {
timeout(time: max_time, unit: 'MINUTES') {
try {
init_git()
unpack_lib('arm', tvm_multilib)
ci_setup(ci_arm)
sh (
script: "${docker_run} ${ci_arm} ./tests/scripts/task_python_frontend_cpu.sh",
label: 'Run Python frontend tests',
)
withEnv(['PLATFORM=arm'], {
unpack_lib('arm', tvm_multilib)
ci_setup(ci_arm)
sh (
script: "${docker_run} ${ci_arm} ./tests/scripts/task_python_frontend_cpu.sh",
label: 'Run Python frontend tests',
)
})
} finally {
junit 'build/pytest-results/*.xml'
}
Expand Down
Loading