@@ -436,7 +436,7 @@ finally {
436
436
buildConfigs << " ${ build.key} _versioning"
437
437
buildConfigs << " ${ build.key} _garasign"
438
438
}
439
- if (" ${ build.key} " . contains(' mac' )) {
439
+ if (" ${ build.key} " . contains(' mac' ) || " ${ build.key } " . contains( ' windows_x64 ' ) ) {
440
440
buildConfigs << " ${ build.key} _deploytest"
441
441
}
442
442
buildConfigs << " ${ build.key} _deployment"
@@ -633,6 +633,19 @@ def buildStage(buildInfo, runBuild) {
633
633
}
634
634
}
635
635
636
+ def testPackageOnServer (buildInfo ){
637
+ def commit = " ${ env.GIT_COMMIT} " [0 .. 6 ]
638
+ def remotePath = " ${ ARTIFACTORY_URL} /${ ARTIFACTORY_FOLDER} /${ ARTIFACTORY_TEST_FOLDER} /usd_${ buildInfo.Platform} _${ commit} .zip"
639
+ def status_code = ' 404'
640
+ if (" ${ buildInfo.Platform} " . contains(" windows" )){
641
+ status_code = COMMONSHELL . capture_script_output(""" curl -o NUL --silent -Iw "%%{http_code}" ${ remotePath} """ )
642
+ }
643
+ else {
644
+ status_code = COMMONSHELL . capture_script_output(""" curl -o /dev/null --silent -Iw '%{http_code}' ${ remotePath} """ )
645
+ }
646
+ return status_code == ' 200'
647
+ }
648
+
636
649
def windowsBuild (buildInfo ) {
637
650
// Clean up TBB src to force a clean build as TBB generates binaries on its source path
638
651
// Clean up textsystem as it has the same folder name on all platforms but with different binaries
@@ -662,6 +675,13 @@ def windowsBuild(buildInfo) {
662
675
"""
663
676
}
664
677
else {
678
+ if (! (isDevBranch() || isReleaseBranch()) && testPackageOnServer(buildInfo)) {
679
+ // Check if test package is already deployed
680
+ postStatus(' SUCCESS' , " ${ buildInfo.Platform} _deploytest" )
681
+ echo " Package is on server and skip build."
682
+ return
683
+ }
684
+
665
685
bat """
666
686
:: Set up nasm for OIIO plugin
667
687
if not exist ${ buildInfo.USDgen_src} \\ nasm-2.15.05-win64.zip call curl -o ${ buildInfo.USDgen_src} \\ nasm-2.15.05-win64.zip https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/win64/nasm-2.15.05-win64.zip
@@ -680,16 +700,14 @@ def windowsBuild(buildInfo) {
680
700
call ${ buildInfo.Python} -m pip install PyOpenGL
681
701
call ${ buildInfo.Python} -u build_scripts/build_usd.py --generator Ninja --build ${ buildInfo.USDgen_build} --src ${ buildInfo.USDgen_src} ${ buildInfo.USDinst} --build-variant ${ buildInfo.BuildVariant} ${ USDBUILDINGFLAGS} -v
682
702
"""
703
+ testDeployStage(buildInfo)
683
704
}
684
705
}
685
706
686
707
def macBuild (buildInfo ) {
687
- if (( ! isDevBranch()) && (! " ${ buildInfo.Platform} " . contains(" ios" ))) {
708
+ if (! ( isDevBranch() || isReleaseBranch ()) && (! " ${ buildInfo.Platform} " . contains(" ios" ))) {
688
709
// Check if the package is already deployed
689
- def commit = " ${ env.GIT_COMMIT} " [0 .. 6 ]
690
- def remotePath = " ${ ARTIFACTORY_URL} /${ ARTIFACTORY_FOLDER} /${ ARTIFACTORY_TEST_FOLDER} /usd_${ buildInfo.Platform} _${ commit} .zip"
691
- def status_code = COMMONSHELL . capture_script_output(""" curl -o /dev/null --silent -Iw '%{http_code}' ${ remotePath} """ )
692
- if (status_code == ' 200' ) {
710
+ if (testPackageOnServer(buildInfo)) {
693
711
postStatus(' SUCCESS' , " ${ buildInfo.Platform} _deploytest" )
694
712
return
695
713
}
@@ -791,6 +809,26 @@ def testStage(buildInfo, runTest) {
791
809
}
792
810
}
793
811
812
+ def downloadTestPackage (buildInfo ){
813
+ def commit = " ${ env.GIT_COMMIT} " [0 .. 6 ]
814
+ def usdinst= " ${ env.WORKSPACE} /usd_${ buildInfo.Platform} _${ commit} "
815
+ def artifactory_env_path = " ${ ARTIFACTORY_TEST_FOLDER} "
816
+ def server = " ${ ARTIFACTORY_URL} "
817
+ def remotePath = " ${ ARTIFACTORY_FOLDER} /${ artifactory_env_path} "
818
+ withEnv([" OGS_ARTIFACTORY_SERVER=art-bobcat" ]){
819
+ COMMONSHELL . shell """ \
820
+ ${ buildInfo.Python} -u adsk-build-scripts/deploy.py --download_test \
821
+ --git_commit ${ commit} \
822
+ --remotepath ${ remotePath} \
823
+ --platform ${ buildInfo.Platform} \
824
+ --packagename ${ PROJECT_NAME} \
825
+ --server ${ server} \
826
+ --source ${ env.WORKSPACE}
827
+ """
828
+ }
829
+ return usdinst
830
+ }
831
+
794
832
def windowsTest (buildInfo ) {
795
833
// Skip test on windows_android as no tests are generated currently
796
834
// TODO: Run unittest on windows_android
@@ -803,13 +841,19 @@ def windowsTest(buildInfo) {
803
841
rd %temp% /s /q
804
842
"""
805
843
844
+ def usdinst = " ${ buildInfo.USDinst} "
845
+ def testpath = " ${ buildInfo.USDgen_build_usd} "
846
+ if (! (isDevBranch() || isReleaseBranch()) && testPackageOnServer(buildInfo)) {
847
+ usdinst = downloadTestPackage(buildInfo)
848
+ testpath = usdinst
849
+ }
850
+
806
851
bat """
807
- :: As part of relocatable support, user needs EnvVar("PXR_MTLX_STDLIB_SEARCH_PATHS") to use MaterialX libraies from USD installed path,
808
- :: but it's necessay on the build machine as USD also adds path to the MaterialX standard library discovered at build time.
809
- :: call set PXR_MTLX_STDLIB_SEARCH_PATHS=<Full_Of_USDinst_Extracted_Path>/libraries
810
- call set PATH=%PATH%;${ buildInfo.USDinst} \\ lib;${ buildInfo.USDinst} \\ bin;${ buildInfo.USDinst} \\ share\\ usd\\ examples\\ plugin;
811
- call set PYTHONPATH=${ buildInfo.USDinst} \\ lib\\ python
812
- call cd /d ${ buildInfo.USDgen_build_usd} && ctest -C ${ buildInfo.CMakeConfig} ${ USDTESTINGFLAGS}
852
+ :: As part of relocatable support, user needs EnvVar("PXR_MTLX_STDLIB_SEARCH_PATHS") to use MaterialX libraies from USD installed path.
853
+ call set PXR_MTLX_STDLIB_SEARCH_PATHS=${ usdinst} \\ libraries;
854
+ call set PATH=%PATH%;${ usdinst} \\ lib;${ usdinst} \\ bin;${ usdinst} \\ share\\ usd\\ examples\\ plugin;
855
+ call set PYTHONPATH=${ usdinst} \\ lib\\ python
856
+ call cd /d ${ testpath} && ctest -C ${ buildInfo.CMakeConfig} ${ USDTESTINGFLAGS}
813
857
"""
814
858
}
815
859
}
@@ -894,22 +938,8 @@ def runMacTest(buildInfo, runlocally) {
894
938
// Set up testing environment on the newly allocated node
895
939
if (! runlocally) {
896
940
checkoutGit()
897
-
898
- def commit = " ${ env.GIT_COMMIT} " [0 .. 6 ]
899
- usdinst= " ${ env.WORKSPACE} /usd_${ buildInfo.Platform} _${ commit} "
900
- def artifactory_env_path = " ${ ARTIFACTORY_TEST_FOLDER} "
901
- def server = " ${ ARTIFACTORY_URL} "
902
- def remotePath = " ${ ARTIFACTORY_FOLDER} /${ artifactory_env_path} "
941
+ usdinst = downloadTestPackage(buildInfo)
903
942
sh """
904
- export OGS_ARTIFACTORY_SERVER=art-bobcat
905
- python3 -u adsk-build-scripts/deploy.py --download_test \
906
- --git_commit ${ commit} \
907
- --remotepath ${ remotePath} \
908
- --platform ${ buildInfo.Platform} \
909
- --packagename ${ PROJECT_NAME} \
910
- --server ${ server} \
911
- --source ${ env.WORKSPACE}
912
-
913
943
install_name_tool -add_rpath ${ usdinst} /lib ${ usdinst} /bin/idiff
914
944
"""
915
945
testpath = " ${ usdinst} "
0 commit comments