From e0eb9b96f7137e1d4ad4f8b7224cb8b6145ad77c Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 13 Jul 2021 14:55:11 +0100 Subject: SL-15572 - Possible fix for codeticket upload issue --- build.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 3b0cf97731..89e4492671 100755 --- a/build.sh +++ b/build.sh @@ -449,6 +449,7 @@ then # Upload additional packages. for package_id in $additional_packages do + sleep 240 package=$(installer_$arch "$package_id") if [ x"$package" != x ] then -- cgit v1.2.3 From 3d57b7946a1b432710b2909c8ece16e62e356148 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 13 Jul 2021 16:19:35 +0100 Subject: SL-15572 - more sleeps in build.sh --- build.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 89e4492671..491fdd6b94 100755 --- a/build.sh +++ b/build.sh @@ -449,10 +449,11 @@ then # Upload additional packages. for package_id in $additional_packages do - sleep 240 package=$(installer_$arch "$package_id") if [ x"$package" != x ] then + echo "sleeping 240" + sleep 240 python_cmd "$helpers/codeticket.py" addoutput "Installer $package_id" "$package" \ || fatal "Upload of installer $package_id failed" else @@ -466,6 +467,8 @@ then if [ "${RELEASE_CRASH_REPORTING:-}" != "OFF" ] then # Upload crash reporter file + echo "sleeping 240" + sleep 240 python_cmd "$helpers/codeticket.py" addoutput "Symbolfile" "$VIEWER_SYMBOL_FILE" \ || fatal "Upload of symbolfile failed" fi @@ -474,6 +477,8 @@ then # *TODO: Make this an upload-extension if [ -r "$build_dir/llphysicsextensions_package" ] then + echo "sleeping 240" + sleep 240 llphysicsextensions_package=$(cat $build_dir/llphysicsextensions_package) python_cmd "$helpers/codeticket.py" addoutput "Physics Extensions Package" "$llphysicsextensions_package" --private \ || fatal "Upload of physics extensions package failed" -- cgit v1.2.3 From 502afc5ed2cd883afb5e921cf33c8dff24d1336f Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 13 Jul 2021 18:20:56 +0100 Subject: SL-15572 - shorter sleeps in build.sh --- build.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 491fdd6b94..f7e90b8582 100755 --- a/build.sh +++ b/build.sh @@ -452,8 +452,8 @@ then package=$(installer_$arch "$package_id") if [ x"$package" != x ] then - echo "sleeping 240" - sleep 240 + echo "sleeping 30" + sleep 30 python_cmd "$helpers/codeticket.py" addoutput "Installer $package_id" "$package" \ || fatal "Upload of installer $package_id failed" else @@ -467,8 +467,8 @@ then if [ "${RELEASE_CRASH_REPORTING:-}" != "OFF" ] then # Upload crash reporter file - echo "sleeping 240" - sleep 240 + echo "sleeping 30" + sleep 30 python_cmd "$helpers/codeticket.py" addoutput "Symbolfile" "$VIEWER_SYMBOL_FILE" \ || fatal "Upload of symbolfile failed" fi @@ -477,8 +477,8 @@ then # *TODO: Make this an upload-extension if [ -r "$build_dir/llphysicsextensions_package" ] then - echo "sleeping 240" - sleep 240 + echo "sleeping 30" + sleep 30 llphysicsextensions_package=$(cat $build_dir/llphysicsextensions_package) python_cmd "$helpers/codeticket.py" addoutput "Physics Extensions Package" "$llphysicsextensions_package" --private \ || fatal "Upload of physics extensions package failed" -- cgit v1.2.3 From 4d15f18d924b403fd40ae737b9478aadc345a56a Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 13 Jul 2021 21:40:00 +0100 Subject: SL-15572 - retry logic for codeticket.py commands --- build.sh | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index f7e90b8582..72fa5fc31e 100755 --- a/build.sh +++ b/build.sh @@ -16,6 +16,29 @@ # * The special style in which python is invoked is intentional to permit # use of a native python install on windows - which requires paths in DOS form +retry_cmd() +{ + max_attempts="$1"; shift + initial_wait="$1"; shift + attempt_num=1 + echo "trying" "$@" + until "$@" + do + if ((attempt_num==max_attempts)) + then + echo "Last attempt $attempt_num failed" + return 1 + else + wait_time=$(($attempt_num*$initial_wait)) + echo "Attempt $attempt_num failed. Trying again in $wait_time seconds..." + sleep $wait_time + attempt_num=$(($attempt_num+1)) + fi + done + echo "succeeded" + return 0 +} + build_dir_Darwin() { echo build-darwin-x86_64 @@ -443,7 +466,7 @@ then succeeded=$build_coverity else # Upload base package. - python_cmd "$helpers/codeticket.py" addoutput Installer "$package" \ + retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput Installer "$package" \ || fatal "Upload of installer failed" # Upload additional packages. @@ -452,9 +475,7 @@ then package=$(installer_$arch "$package_id") if [ x"$package" != x ] then - echo "sleeping 30" - sleep 30 - python_cmd "$helpers/codeticket.py" addoutput "Installer $package_id" "$package" \ + retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput "Installer $package_id" "$package" \ || fatal "Upload of installer $package_id failed" else record_failure "Failed to find additional package for '$package_id'." @@ -467,9 +488,7 @@ then if [ "${RELEASE_CRASH_REPORTING:-}" != "OFF" ] then # Upload crash reporter file - echo "sleeping 30" - sleep 30 - python_cmd "$helpers/codeticket.py" addoutput "Symbolfile" "$VIEWER_SYMBOL_FILE" \ + retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput "Symbolfile" "$VIEWER_SYMBOL_FILE" \ || fatal "Upload of symbolfile failed" fi @@ -477,10 +496,8 @@ then # *TODO: Make this an upload-extension if [ -r "$build_dir/llphysicsextensions_package" ] then - echo "sleeping 30" - sleep 30 llphysicsextensions_package=$(cat $build_dir/llphysicsextensions_package) - python_cmd "$helpers/codeticket.py" addoutput "Physics Extensions Package" "$llphysicsextensions_package" --private \ + retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput "Physics Extensions Package" "$llphysicsextensions_package" --private \ || fatal "Upload of physics extensions package failed" fi fi -- cgit v1.2.3 From 3e12a97a7f0dfa951c3997dd2117d2418fe21ce6 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 28 Sep 2021 16:40:33 -0400 Subject: SL-16040: Honor autobuild_{configure,build}_parameters variables. The generic build.sh script honors these environment variables to specify parameters to the autobuild configure and autobuild build steps, respectively. Support them in the viewer-specific build.sh too. In the generic build.sh, autobuild_configure_parameters allows specifying command-line switches either for autobuild or, following --, for the underlying tool (in our case, CMake). In order to support that variable the same way here, we insert -- (as before) when autobuild_configure_parameters is unset or empty, since the rest of the switches *we* specify are for CMake. That means that, as with the generic build.sh, a non-empty autobuild_configure_parameters override must precede any switches intended for CMake with the -- separator. --- build.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 96bcff0e8e..3291039856 100755 --- a/build.sh +++ b/build.sh @@ -132,7 +132,11 @@ pre_build() fi set -x - "$autobuild" configure --quiet -c $variant -- \ + # honor autobuild_configure_parameters same as sling-buildscripts + eval_autobuild_configure_parameters=$(eval $(echo echo $autobuild_configure_parameters)) + + "$autobuild" configure --quiet -c $variant \ + ${eval_autobuild_configure_parameters:---} \ -DPACKAGE:BOOL=ON \ -DHAVOK:BOOL="$HAVOK" \ -DRELEASE_CRASH_REPORTING:BOOL="$RELEASE_CRASH_REPORTING" \ @@ -182,7 +186,11 @@ build() if $build_viewer then begin_section "autobuild $variant" - "$autobuild" build --no-configure -c $variant || fatal "failed building $variant" + # honor autobuild_build_parameters same as sling-buildscripts + eval_autobuild_build_parameters=$(eval $(echo echo $autobuild_build_parameters)) + "$autobuild" build --no-configure -c $variant \ + $eval_autobuild_build_parameters \ + || fatal "failed building $variant" echo true >"$build_dir"/build_ok end_section "autobuild $variant" -- cgit v1.2.3