4545// 'python3 jenkins/generate.py'
4646// Note: This timestamp is here to ensure that updates to the Jenkinsfile are
4747// always rebased on main before merging:
48- // Generated at 2022-04-22T12:59:15.071304
48+ // Generated at 2022-04-26T15:08:12.905694
4949
5050import org.jenkinsci.plugins.pipeline.modeldefinition.Utils
5151// NOTE: these lines are scanned by docker/dev_common.sh. Please update the regex as needed. -->
@@ -92,7 +92,7 @@ upstream_revision = null
9292docker_run = ' docker/bash.sh --env CI --env TVM_SHARD_INDEX --env TVM_NUM_SHARDS --env RUN_DISPLAY_URL --env PLATFORM'
9393docker_build = ' docker/build.sh'
9494// timeout in minutes
95- max_time = 240
95+ max_time = 120
9696rebuild_docker_images = false
9797
9898def per_exec_ws (folder ) {
@@ -196,7 +196,7 @@ if (currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')) {
196196
197197cancel_previous_build()
198198
199-
199+ def lint () {
200200stage(' Lint' ) {
201201 node(' CPU' ) {
202202 timeout(time : max_time, unit : ' MINUTES' ) {
@@ -252,6 +252,11 @@ stage('Lint') {
252252 }
253253 }
254254}
255+ }
256+
257+ // This has to be extracted into a method due to JVM limitations on the size of
258+ // a method (so the code can't all be inlined)
259+ lint()
255260
256261def build_image (image_name ) {
257262 hash = sh(
@@ -465,6 +470,7 @@ def cpp_unittest(image) {
465470 )
466471}
467472
473+ def build () {
468474stage(' Build' ) {
469475 environment {
470476 SKIP_SLOW_TESTS = " ${ skip_slow_tests} "
@@ -605,7 +611,10 @@ stage('Build') {
605611 }
606612 }
607613}
614+ }
615+ build()
608616
617+ def test () {
609618stage(' Test' ) {
610619 environment {
611620 SKIP_SLOW_TESTS = " ${ skip_slow_tests} "
@@ -837,17 +846,20 @@ stage('Test') {
837846 Utils . markStageSkippedForConditional(' python: i386 2 of 2' )
838847 }
839848 },
840- ' test: Hexagon' : {
849+ ' test: Hexagon 1 of 4 ' : {
841850 if (! skip_ci && is_docs_only_build != 1 ) {
842851 node(' CPU' ) {
843852 ws(" workspace/exec_${ env.EXECUTOR_NUMBER} /tvm/test-hexagon" ) {
844- timeout(time : max_time, unit : ' MINUTES' ) {
845- try {
846- init_git()
847- withEnv([' PLATFORM=hexagon' ], {
853+ try {
854+ init_git()
855+ timeout(time : max_time, unit : ' MINUTES' ) {
856+ withEnv([
857+ ' PLATFORM=hexagon' ,
858+ ' TVM_NUM_SHARDS=4' ,
859+ ' TVM_SHARD_INDEX=0' ], {
848860 unpack_lib(' hexagon' , tvm_lib)
849861 ci_setup(ci_hexagon)
850- cpp_unittest(ci_hexagon)
862+ cpp_unittest(ci_hexagon)
851863 sh (
852864 script : " ${ docker_run} ${ ci_hexagon} ./tests/scripts/task_build_hexagon_api.sh" ,
853865 label : ' Build Hexagon API' ,
@@ -857,14 +869,110 @@ stage('Test') {
857869 label : ' Run Hexagon tests' ,
858870 )
859871 })
860- } finally {
861- junit ' build/pytest-results/*.xml'
862872 }
873+ } finally {
874+ junit ' build/pytest-results/*.xml'
863875 }
864876 }
865877 }
866878 } else {
867- Utils . markStageSkippedForConditional(' test: Hexagon' )
879+ Utils . markStageSkippedForConditional(' test: Hexagon 1 of 4' )
880+ }
881+ },
882+ ' test: Hexagon 2 of 4' : {
883+ if (! skip_ci && is_docs_only_build != 1 ) {
884+ node(' CPU' ) {
885+ ws(" workspace/exec_${ env.EXECUTOR_NUMBER} /tvm/test-hexagon" ) {
886+ try {
887+ init_git()
888+ timeout(time : max_time, unit : ' MINUTES' ) {
889+ withEnv([
890+ ' PLATFORM=hexagon' ,
891+ ' TVM_NUM_SHARDS=4' ,
892+ ' TVM_SHARD_INDEX=1' ], {
893+ unpack_lib(' hexagon' , tvm_lib)
894+ ci_setup(ci_hexagon)
895+ sh (
896+ script : " ${ docker_run} ${ ci_hexagon} ./tests/scripts/task_build_hexagon_api.sh" ,
897+ label : ' Build Hexagon API' ,
898+ )
899+ sh (
900+ script : " ${ docker_run} ${ ci_hexagon} ./tests/scripts/task_python_hexagon.sh" ,
901+ label : ' Run Hexagon tests' ,
902+ )
903+ })
904+ }
905+ } finally {
906+ junit ' build/pytest-results/*.xml'
907+ }
908+ }
909+ }
910+ } else {
911+ Utils . markStageSkippedForConditional(' test: Hexagon 2 of 4' )
912+ }
913+ },
914+ ' test: Hexagon 3 of 4' : {
915+ if (! skip_ci && is_docs_only_build != 1 ) {
916+ node(' CPU' ) {
917+ ws(" workspace/exec_${ env.EXECUTOR_NUMBER} /tvm/test-hexagon" ) {
918+ try {
919+ init_git()
920+ timeout(time : max_time, unit : ' MINUTES' ) {
921+ withEnv([
922+ ' PLATFORM=hexagon' ,
923+ ' TVM_NUM_SHARDS=4' ,
924+ ' TVM_SHARD_INDEX=2' ], {
925+ unpack_lib(' hexagon' , tvm_lib)
926+ ci_setup(ci_hexagon)
927+ sh (
928+ script : " ${ docker_run} ${ ci_hexagon} ./tests/scripts/task_build_hexagon_api.sh" ,
929+ label : ' Build Hexagon API' ,
930+ )
931+ sh (
932+ script : " ${ docker_run} ${ ci_hexagon} ./tests/scripts/task_python_hexagon.sh" ,
933+ label : ' Run Hexagon tests' ,
934+ )
935+ })
936+ }
937+ } finally {
938+ junit ' build/pytest-results/*.xml'
939+ }
940+ }
941+ }
942+ } else {
943+ Utils . markStageSkippedForConditional(' test: Hexagon 3 of 4' )
944+ }
945+ },
946+ ' test: Hexagon 4 of 4' : {
947+ if (! skip_ci && is_docs_only_build != 1 ) {
948+ node(' CPU' ) {
949+ ws(" workspace/exec_${ env.EXECUTOR_NUMBER} /tvm/test-hexagon" ) {
950+ try {
951+ init_git()
952+ timeout(time : max_time, unit : ' MINUTES' ) {
953+ withEnv([
954+ ' PLATFORM=hexagon' ,
955+ ' TVM_NUM_SHARDS=4' ,
956+ ' TVM_SHARD_INDEX=3' ], {
957+ unpack_lib(' hexagon' , tvm_lib)
958+ ci_setup(ci_hexagon)
959+ sh (
960+ script : " ${ docker_run} ${ ci_hexagon} ./tests/scripts/task_build_hexagon_api.sh" ,
961+ label : ' Build Hexagon API' ,
962+ )
963+ sh (
964+ script : " ${ docker_run} ${ ci_hexagon} ./tests/scripts/task_python_hexagon.sh" ,
965+ label : ' Run Hexagon tests' ,
966+ )
967+ })
968+ }
969+ } finally {
970+ junit ' build/pytest-results/*.xml'
971+ }
972+ }
973+ }
974+ } else {
975+ Utils . markStageSkippedForConditional(' test: Hexagon 4 of 4' )
868976 }
869977 },
870978 ' test: QEMU' : {
@@ -1200,6 +1308,9 @@ stage('Test') {
12001308 },
12011309 )
12021310}
1311+ }
1312+
1313+ test()
12031314
12041315/*
12051316stage('Build packages') {
0 commit comments