From 853cf3928cba51fe1e84a51316f9698c55ba4ad4 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 28 Jun 2023 16:44:03 -0400 Subject: SL-18837: Don't fetch (unmigrated) build-secrets, use GH secrets. --- build.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 89609a9ffd..06a73aa8ca 100755 --- a/build.sh +++ b/build.sh @@ -146,12 +146,20 @@ pre_build() fi # don't spew credentials into build log - bugsplat_sh="$build_secrets_checkout/bugsplat/bugsplat.sh" set +x - if [ -r "$bugsplat_sh" ] - then # show that we're doing this, just not the contents - echo source "$bugsplat_sh" - source "$bugsplat_sh" + # expect these variables to be set in the environment from GitHub secrets + if [[ -z "$BUGSPLAT_USER" || -z "$BUGSPLAT_PASS" ]] + then + # older mechanism involving build-secrets repo - + # if build_secrets_checkout isn't set, report its name + bugsplat_sh="${build_secrets_checkout:-\$build_secrets_checkout}/bugsplat/bugsplat.sh" + if [ -r "$bugsplat_sh" ] + then # show that we're doing this, just not the contents + echo source "$bugsplat_sh" + source "$bugsplat_sh" + else + fatal "BUGSPLAT_USER or BUGSPLAT_PASS missing, and no $bugsplat_sh" + fi fi set -x -- cgit v1.2.3 From ab6fd15d6184e3aab69f1bef0fb98c2d3d257408 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 28 Jun 2023 17:08:04 -0400 Subject: SL-18837: git-hooks no longer has requirements.txt? --- build.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 06a73aa8ca..44c7d66640 100755 --- a/build.sh +++ b/build.sh @@ -321,9 +321,13 @@ begin_section "coding policy check" # this far. Running coding policy checks on one platform *should* suffice... if [[ "$arch" == "Darwin" ]] then - # install the git-hooks dependencies - pip install -r "$(native_path "$git_hooks_checkout/requirements.txt")" || \ - fatal "pip install git-hooks failed" + git_hooks_reqs="$git_hooks_checkout/requirements.txt" + if [[ -r "$(shell_path "$git_hooks_reqs")" ]] + then + # install the git-hooks dependencies + pip install -r "$(native_path "$git_hooks_reqs")" || \ + fatal "pip install git-hooks failed" + fi # validate the branch we're about to build python_cmd "$git_hooks_checkout/coding_policy_git.py" --all_files || \ fatal "coding policy check failed" -- cgit v1.2.3 From 41d937d2c03502c31c4366e75ebe5dbcf7b0d906 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 28 Jun 2023 17:15:06 -0400 Subject: SL-18837: Don't try to engage git-hooks explicitly at all. --- build.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 44c7d66640..86119cf259 100755 --- a/build.sh +++ b/build.sh @@ -328,9 +328,13 @@ then pip install -r "$(native_path "$git_hooks_reqs")" || \ fatal "pip install git-hooks failed" fi - # validate the branch we're about to build - python_cmd "$git_hooks_checkout/coding_policy_git.py" --all_files || \ - fatal "coding policy check failed" + git_hooks_script="$git_hooks_checkout/coding_policy_git.py" + if [[ -r "$(shell_path "$git_hooks_script")" ]] + then + # validate the branch we're about to build + python_cmd "$(native_path "$git_hooks_script")" --all_files || \ + fatal "coding policy check failed" + fi fi end_section "coding policy check" -- cgit v1.2.3 From ca5f3e3b35dedd3674df91ec5aabae1e6bab4acd Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 6 Jul 2023 17:29:40 -0400 Subject: SL-18837: Add addoutput, addarrayoutput functions to build.sh and use them instead of codeticket addoutput to pass GitHub xxx_name, xxx_path outputs to build.yaml. Add upload steps to build.yaml to try to upload build products identified in build.sh. --- build.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 86119cf259..c50bf1df9d 100755 --- a/build.sh +++ b/build.sh @@ -110,6 +110,27 @@ installer_CYGWIN() fi } +[[ -n "$GITHUB_OUTPUT" ]] || fatal "Need to export GITHUB_OUTPUT" + +addoutput() +{ + local varname="$1" + local value="$2" + echo "${varname}_name=$(basename "$value")" >> "$GITHUB_OUTPUT" + echo "${varname}_path=$value" >> "$GITHUB_OUTPUT" +} + +# For variable numbers of output values, separate them one per line. +addarrayoutput() +{ + local varname="$1" + # indirection: specify the *name* of the array to emit + local -n arrayname="$2" + local IFS=' +' + echo "$varname=${arrayname[*]}" >> "$GITHUB_OUTPUT" +} + pre_build() { local variant="$1" @@ -369,6 +390,7 @@ do begin_section "Autobuild metadata" python_cmd "$helpers/codeticket.py" addoutput "Autobuild Metadata" "$build_dir/autobuild-package.xml" --mimetype text/xml \ || fatal "Upload of autobuild metadata failed" + addoutput autobuild_package "$build_dir/autobuild-package.xml" if [ "$arch" != "Linux" ] then record_dependencies_graph "$build_dir/autobuild-package.xml" # defined in buildscripts/hg/bin/build.sh @@ -384,6 +406,7 @@ do begin_section "Viewer Version" python_cmd "$helpers/codeticket.py" addoutput "Viewer Version" "$(<"$build_dir/newview/viewer_version.txt")" --mimetype inline-text \ || fatal "Upload of viewer version failed" + addoutput viewer_version "$(<"$build_dir/newview/viewer_version.txt")" end_section "Viewer Version" fi ;; @@ -392,12 +415,14 @@ do then record_event "Doxygen warnings generated; see doxygen_warnings.log" python_cmd "$helpers/codeticket.py" addoutput "Doxygen Log" "$build_dir/doxygen_warnings.log" --mimetype text/plain ## TBD + addoutput doxygen_log "$build_dir/doxygen_warnings.log" fi if [ -d "$build_dir/doxygen/html" ] then tar -c -f "$build_dir/viewer-doxygen.tar.bz2" --strip-components 3 "$build_dir/doxygen/html" python_cmd "$helpers/codeticket.py" addoutput "Doxygen Tarball" "$build_dir/viewer-doxygen.tar.bz2" \ || fatal "Upload of doxygen tarball failed" + addoutput doxygen_tarball "$build_dir/viewer-doxygen.tar.bz2" fi ;; *) @@ -513,6 +538,7 @@ then retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput Installer "$package" \ || fatal "Upload of installer failed" wait_for_codeticket + packages=("$package") # Upload additional packages. for package_id in $additional_packages @@ -523,11 +549,14 @@ then retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput "Installer $package_id" "$package" \ || fatal "Upload of installer $package_id failed" wait_for_codeticket + packages+=("$package") else record_failure "Failed to find additional package for '$package_id'." fi done + addarrayoutput viewer_packages packages + if [ "$last_built_variant" = "Release" ] then # nat 2016-12-22: without RELEASE_CRASH_REPORTING, we have no symbol file. @@ -537,6 +566,7 @@ then retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput "Symbolfile" "$VIEWER_SYMBOL_FILE" \ || fatal "Upload of symbolfile failed" wait_for_codeticket + addoutput symbolfile "$VIEWER_SYMBOL_FILE" fi # Upload the llphysicsextensions_tpv package, if one was produced @@ -546,6 +576,8 @@ then llphysicsextensions_package=$(cat $build_dir/llphysicsextensions_package) retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput "Physics Extensions Package" "$llphysicsextensions_package" --private \ || fatal "Upload of physics extensions package failed" + ## how to make private? + ## addoutput llphysics "$llphysicsextensions_package" fi fi -- cgit v1.2.3 From 2b1a3cf9cdb4cde92d14217b743545eccdcb2991 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 7 Jul 2023 06:38:03 -0400 Subject: SL-18837: Use multi-line GitHub outputs to upload artifacts. Having observed installer upload failures, I discovered the warning in actions/upload-artifact/README.md about multiple concurrent jobs trying to post the same pathname to the same artifact name. Try to disambiguate artifacts not only for different platforms, but for different jobs running on the same platform. This change also reflects my understanding that an artifact is (effectively) a distinct zip file that can contain multiple uploaded files. Because we'll want to download metadata without having to download enormous installers, create a separate metadata artifact per platform. Similarly, symbol files can get large: use a third distinct artifact for symbol files. But with those artifacts defined, leverage actions/upload-artifact's ability to upload multiple paths to the same artifact. In build.sh, define bash arrays installer, metadata, symbolfile and set up so that, on exit, each is written to a GITHUB_OUTPUT variable with the corresponding name. This involves a little magic to get macOS bash 3 to indirectly access an array. These multi-line output variables are then used to drive the upload-artifact step for each of the defined artifacts. --- build.sh | 55 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 25 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index c50bf1df9d..bd3e84d7bd 100755 --- a/build.sh +++ b/build.sh @@ -16,6 +16,8 @@ # * 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 +cleanup="true" + retry_cmd() { max_attempts="$1"; shift @@ -111,24 +113,28 @@ installer_CYGWIN() } [[ -n "$GITHUB_OUTPUT" ]] || fatal "Need to export GITHUB_OUTPUT" - -addoutput() -{ - local varname="$1" - local value="$2" - echo "${varname}_name=$(basename "$value")" >> "$GITHUB_OUTPUT" - echo "${varname}_path=$value" >> "$GITHUB_OUTPUT" -} - -# For variable numbers of output values, separate them one per line. -addarrayoutput() +# The following is based on the Warning for GitHub multiline output strings: +# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings +EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) + +# Build up these arrays as we go +installer=() +metadata=() +symbolfile=() +# and dump them to GITHUB_OUTPUT when done +cleanup="$cleanup ; arrayoutput installer ; arrayoutput metadata ; arrayoutput symbolfile" +trap "$cleanup" EXIT + +arrayoutput() { - local varname="$1" - # indirection: specify the *name* of the array to emit - local -n arrayname="$2" + local outputname="$1" + # append "[*]" to the array name so array indirection works + local array="$1[*]" local IFS=' ' - echo "$varname=${arrayname[*]}" >> "$GITHUB_OUTPUT" + echo "$outputname<<$EOF +${!array} +$EOF" >> "$GITHUB_OUTPUT" } pre_build() @@ -216,7 +222,8 @@ package_llphysicsextensions_tpv() # capture the package file name for use in upload later... PKGTMP=`mktemp -t pgktpv.XXXXXX` - trap "rm $PKGTMP* 2>/dev/null" 0 + cleanup="$cleanup ; rm $PKGTMP* 2>/dev/null" + trap "$cleanup" EXIT "$autobuild" package --quiet --config-file "$tpvconfig" --results-file "$(native_path $PKGTMP)" || fatal "failed to package llphysicsextensions_tpv" tpv_status=$? if [ -r "${PKGTMP}" ] @@ -390,7 +397,7 @@ do begin_section "Autobuild metadata" python_cmd "$helpers/codeticket.py" addoutput "Autobuild Metadata" "$build_dir/autobuild-package.xml" --mimetype text/xml \ || fatal "Upload of autobuild metadata failed" - addoutput autobuild_package "$build_dir/autobuild-package.xml" + metadata+=("$build_dir/autobuild-package.xml") if [ "$arch" != "Linux" ] then record_dependencies_graph "$build_dir/autobuild-package.xml" # defined in buildscripts/hg/bin/build.sh @@ -406,7 +413,7 @@ do begin_section "Viewer Version" python_cmd "$helpers/codeticket.py" addoutput "Viewer Version" "$(<"$build_dir/newview/viewer_version.txt")" --mimetype inline-text \ || fatal "Upload of viewer version failed" - addoutput viewer_version "$(<"$build_dir/newview/viewer_version.txt")" + metadata+=("$build_dir/newview/viewer_version.txt") end_section "Viewer Version" fi ;; @@ -415,14 +422,14 @@ do then record_event "Doxygen warnings generated; see doxygen_warnings.log" python_cmd "$helpers/codeticket.py" addoutput "Doxygen Log" "$build_dir/doxygen_warnings.log" --mimetype text/plain ## TBD - addoutput doxygen_log "$build_dir/doxygen_warnings.log" + metadata+=("$build_dir/doxygen_warnings.log") fi if [ -d "$build_dir/doxygen/html" ] then tar -c -f "$build_dir/viewer-doxygen.tar.bz2" --strip-components 3 "$build_dir/doxygen/html" python_cmd "$helpers/codeticket.py" addoutput "Doxygen Tarball" "$build_dir/viewer-doxygen.tar.bz2" \ || fatal "Upload of doxygen tarball failed" - addoutput doxygen_tarball "$build_dir/viewer-doxygen.tar.bz2" + metadata+=("$build_dir/viewer-doxygen.tar.bz2") fi ;; *) @@ -538,7 +545,7 @@ then retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput Installer "$package" \ || fatal "Upload of installer failed" wait_for_codeticket - packages=("$package") + installer+=("$package") # Upload additional packages. for package_id in $additional_packages @@ -549,14 +556,12 @@ then retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput "Installer $package_id" "$package" \ || fatal "Upload of installer $package_id failed" wait_for_codeticket - packages+=("$package") + installer+=("$package") else record_failure "Failed to find additional package for '$package_id'." fi done - addarrayoutput viewer_packages packages - if [ "$last_built_variant" = "Release" ] then # nat 2016-12-22: without RELEASE_CRASH_REPORTING, we have no symbol file. @@ -566,7 +571,7 @@ then retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput "Symbolfile" "$VIEWER_SYMBOL_FILE" \ || fatal "Upload of symbolfile failed" wait_for_codeticket - addoutput symbolfile "$VIEWER_SYMBOL_FILE" + symbolfile+=("$VIEWER_SYMBOL_FILE") fi # Upload the llphysicsextensions_tpv package, if one was produced -- cgit v1.2.3 From 479fa3e1964d792ba9483b21b272d52f377f48a2 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 18 Jul 2023 09:56:11 -0400 Subject: SL-18837: Conditionally upload llphysicsextensions-tpv package but only when building viewer-private. Also re-fix SL-19942 workaround by deleting AUTOBUILD_CONFIGURATION before trying to build llphysicsextensions-tpv. --- build.sh | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index bd3e84d7bd..5395a04712 100755 --- a/build.sh +++ b/build.sh @@ -121,8 +121,13 @@ EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) installer=() metadata=() symbolfile=() +physicstpv=() # and dump them to GITHUB_OUTPUT when done -cleanup="$cleanup ; arrayoutput installer ; arrayoutput metadata ; arrayoutput symbolfile" +cleanup="$cleanup ; \ +arrayoutput installer ; \ +arrayoutput metadata ; \ +arrayoutput symbolfile ; \ +arrayoutput physicstpv" trap "$cleanup" EXIT arrayoutput() @@ -216,9 +221,12 @@ package_llphysicsextensions_tpv() # nat 2016-12-21: without HAVOK, can't build PhysicsExtensions_TPV. if [ "$variant" = "Release" -a "${HAVOK:-}" != "OFF" ] then - test -r "$build_dir/packages/llphysicsextensions/autobuild-tpv.xml" || fatal "No llphysicsextensions_tpv autobuild configuration found" - tpvconfig=$(native_path "$build_dir/packages/llphysicsextensions/autobuild-tpv.xml") - "$autobuild" build --quiet --config-file "$tpvconfig" -c Tpv || fatal "failed to build llphysicsextensions_tpv" + tpvconfig="$build_dir/packages/llphysicsextensions/autobuild-tpv.xml" + test -r "$tpvconfig" || fatal "No llphysicsextensions_tpv autobuild configuration found" + # SL-19942: autobuild ignores -c switch if AUTOBUILD_CONFIGURATION set + unset AUTOBUILD_CONFIGURATION + "$autobuild" build --quiet --config-file "$(native_path "$tpvconfig")" -c Tpv \ + || fatal "failed to build llphysicsextensions_tpv" # capture the package file name for use in upload later... PKGTMP=`mktemp -t pgktpv.XXXXXX` @@ -576,13 +584,15 @@ then # Upload the llphysicsextensions_tpv package, if one was produced # *TODO: Make this an upload-extension - if [ -r "$build_dir/llphysicsextensions_package" ] + # Only upload this package when building the private repo so the + # artifact is private. + if [[ "$GITHUB_REPOSITORY" == "secondlife/viewer-private" && \ + -r "$build_dir/llphysicsextensions_package" ]] then llphysicsextensions_package=$(cat $build_dir/llphysicsextensions_package) retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput "Physics Extensions Package" "$llphysicsextensions_package" --private \ || fatal "Upload of physics extensions package failed" - ## how to make private? - ## addoutput llphysics "$llphysicsextensions_package" + physicstpv+=("$llphysicsextensions_package") fi fi -- cgit v1.2.3 From b449667d8d5fb24adb0e1672ba9182a8ecabf97c Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 18 Jul 2023 16:19:19 -0400 Subject: SL-19854: Ensure BugSplat credentials are exported. --- build.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 5395a04712..38f0a59fd5 100755 --- a/build.sh +++ b/build.sh @@ -194,6 +194,7 @@ pre_build() fi fi set -x + export BUGSPLAT_USER BUGSPLAT_PASS # honor autobuild_configure_parameters same as sling-buildscripts eval_autobuild_configure_parameters=$(eval $(echo echo $autobuild_configure_parameters)) -- cgit v1.2.3 From e8cd5205e89993df357410c245f99ebb7703958d Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 31 Aug 2023 15:53:56 -0400 Subject: SL-19243: Try to run Windows BugSplat uploads as a separate GH job. Upload a new Windows-exe artifact containing just the executable (needed by BugSplat) separately from the artifact containing the whole NSIS installer. This requires a new viewer_exe step output set by viewer_manifest.py. Define viewer_channel and viewer_version as build job outputs. Set viewer_channel in build.yaml when tag is interpreted. Set viewer_version in build.sh at the point when it would have posted viewer_version.txt to codeticket. Add a post-windows-symbols job dependent on the build job that engages secondlife/viewer-post-bugsplat-windows, which in turn engages secondlife/post-bugsplat-windows. We keep the actual upload code in a separate repo in case we need to modify that code before rerunning to resolve upload errors. If we kept the upload code in the viewer repo itself, rerunning the upload with modifications would necessarily require rerunning the viewer build, which would defeat the purpose of SL-19243. Because of that new upload job in build.yaml, skip Windows symbol uploads in build.sh. Use a simple (platform name) artifact name for metadata because of flatten_files.py's filename collision resolution. Use hyphens, not spaces, in remaining artifact names: apparently download-artifact doesn't much like artifacts with spaces in their names. Only run the release job when in fact there's a tag. Without that, we get errors. We need not create flatten_files.py's output directory beforehand because it will do that implicitly. --- build.sh | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 38f0a59fd5..4dda0800b6 100755 --- a/build.sh +++ b/build.sh @@ -420,9 +420,11 @@ do if [ -r "$build_dir/newview/viewer_version.txt" ] then begin_section "Viewer Version" - python_cmd "$helpers/codeticket.py" addoutput "Viewer Version" "$(<"$build_dir/newview/viewer_version.txt")" --mimetype inline-text \ + viewer_version="$(<"$build_dir/newview/viewer_version.txt")" + python_cmd "$helpers/codeticket.py" addoutput "Viewer Version" "$viewer_version" --mimetype inline-text \ || fatal "Upload of viewer version failed" metadata+=("$build_dir/newview/viewer_version.txt") + echo "viewer_version=$viewer_version" >> "$GITHUB_OUTPUT" end_section "Viewer Version" fi ;; @@ -599,14 +601,18 @@ then # Run upload extensions # Ex: bugsplat - if [ -d ${build_dir}/packages/upload-extensions ]; then - for extension in ${build_dir}/packages/upload-extensions/*.sh; do - begin_section "Upload Extension $extension" - . $extension - [ $? -eq 0 ] || fatal "Upload of extension $extension failed" - wait_for_codeticket - end_section "Upload Extension $extension" - done + ## SL-19243 HACK: testing separate GH upload job on Windows + if [[ "$arch" != "CYGWIN" ]] + then + if [ -d ${build_dir}/packages/upload-extensions ]; then + for extension in ${build_dir}/packages/upload-extensions/*.sh; do + begin_section "Upload Extension $extension" + . $extension + [ $? -eq 0 ] || fatal "Upload of extension $extension failed" + wait_for_codeticket + end_section "Upload Extension $extension" + done + fi fi fi end_section "Uploads" -- cgit v1.2.3 From 1f6213a58499d3f47f6ec74205ed2837bac83c29 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 1 Sep 2023 12:58:53 -0400 Subject: SL-19243: Try to list contents of xcarchive.zip --- build.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 4dda0800b6..ba8c4dfc8a 100755 --- a/build.sh +++ b/build.sh @@ -613,6 +613,13 @@ then end_section "Upload Extension $extension" done fi + # SL-19243 HACK: List contents of xcarchive.zip + if [[ "$arch" == "Darwin" ]] + then + app_dir="${build_dir}/newview/${variant}" + xcarchive="$(ls -d "${app_dir}"/*.xcarchive.zip)" + unzip -l "$xcarchive" + fi fi fi end_section "Uploads" -- cgit v1.2.3 From bfb059d4ff63ef45f1703013561731953057b605 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 1 Sep 2023 15:28:36 -0400 Subject: SL-19243: Try harder to list contents of xcarchive.zip. upload-mac-symbols.sh actually moves the xcarchive.zip file to /tmp, which is why we couldn't find it when trying to list its contents after the upload. --- build.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index ba8c4dfc8a..18b0e8df6f 100755 --- a/build.sh +++ b/build.sh @@ -604,6 +604,13 @@ then ## SL-19243 HACK: testing separate GH upload job on Windows if [[ "$arch" != "CYGWIN" ]] then + # SL-19243 HACK: List contents of xcarchive.zip, before running + # upload-mac-symbols.sh which moves it to /tmp + if [[ "$arch" == "Darwin" ]] + then + # e.g. build-darwin-x86_64/newview/Release/Second Life Test.xcarchive.zip + unzip -l "${build_dir}/newview/${variant}/${viewer_channel}.xcarchive.zip" + fi if [ -d ${build_dir}/packages/upload-extensions ]; then for extension in ${build_dir}/packages/upload-extensions/*.sh; do begin_section "Upload Extension $extension" @@ -613,13 +620,6 @@ then end_section "Upload Extension $extension" done fi - # SL-19243 HACK: List contents of xcarchive.zip - if [[ "$arch" == "Darwin" ]] - then - app_dir="${build_dir}/newview/${variant}" - xcarchive="$(ls -d "${app_dir}"/*.xcarchive.zip)" - unzip -l "$xcarchive" - fi fi fi end_section "Uploads" -- cgit v1.2.3 From 3eea556c28f86d1c1334879ff4d7dfc36201485e Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 2 Sep 2023 11:02:23 -0400 Subject: SL-19243: Post xcarchive.zip instead of separate symbols tarball. On Mac, in the CMake USE_BUGSPLAT logic, we created both xcarchive.zip (which is what BugSplat wants to see) and secondlife-symbols-darwin -64.tar.bz2 (which we don't think is used for anything). The tarball was posted to codeticket -- but why? If the point is to manually re-upload to BugSplat in case of failure, we'll do better saving xcarchive.zip to codeticket. For SL-19243, posting xcarchive.zip directly supports the goal of breaking out the upload to BugSplat as a separate step. Anyway, since xcarchive.zip is a superset of the tarball, the tarball can be recreated from the zip file, whereas the zip file can't be recreated from the tarball without opening the .dmg installer and extracting the viewer executable. If the xcarchive.zip file exists (that is, on Mac), post that to codeticket or GitHub, as applicable, instead of the tarball. In fact, in the USE_BUGSPLAT case, don't even bother creating the tarball since we're going to ignore it. Make the new build.sh logic that insists on BUGSPLAT_USER and BUGSPLAT_PASS conditional on BUGSPLAT_DB. --- build.sh | 56 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 24 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 18b0e8df6f..4f67fb9603 100755 --- a/build.sh +++ b/build.sh @@ -153,7 +153,7 @@ pre_build() RELEASE_CRASH_REPORTING=ON HAVOK=ON SIGNING=() - if [ "$arch" == "Darwin" -a "$variant" == "Release" ] + if [[ "$arch" == "Darwin" && "$variant" == "Release" ]] then SIGNING=("-DENABLE_SIGNING:BOOL=YES" \ "-DSIGNING_IDENTITY:STRING=Developer ID Application: Linden Research, Inc.") fi @@ -177,24 +177,27 @@ pre_build() VIEWER_SYMBOL_FILE="$(native_path "$abs_build_dir/newview/$variant/secondlife-symbols-$symplat-${AUTOBUILD_ADDRSIZE}.tar.bz2")" fi - # don't spew credentials into build log - set +x # expect these variables to be set in the environment from GitHub secrets - if [[ -z "$BUGSPLAT_USER" || -z "$BUGSPLAT_PASS" ]] + if [[ -n "$BUGSPLAT_DB" ]] then - # older mechanism involving build-secrets repo - - # if build_secrets_checkout isn't set, report its name - bugsplat_sh="${build_secrets_checkout:-\$build_secrets_checkout}/bugsplat/bugsplat.sh" - if [ -r "$bugsplat_sh" ] - then # show that we're doing this, just not the contents - echo source "$bugsplat_sh" - source "$bugsplat_sh" - else - fatal "BUGSPLAT_USER or BUGSPLAT_PASS missing, and no $bugsplat_sh" + # don't spew credentials into build log + set +x + if [[ -z "$BUGSPLAT_USER" || -z "$BUGSPLAT_PASS" ]] + then + # older mechanism involving build-secrets repo - + # if build_secrets_checkout isn't set, report its name + bugsplat_sh="${build_secrets_checkout:-\$build_secrets_checkout}/bugsplat/bugsplat.sh" + if [ -r "$bugsplat_sh" ] + then # show that we're doing this, just not the contents + echo source "$bugsplat_sh" + source "$bugsplat_sh" + else + fatal "BUGSPLAT_USER or BUGSPLAT_PASS missing, and no $bugsplat_sh" + fi fi + set -x + export BUGSPLAT_USER BUGSPLAT_PASS fi - set -x - export BUGSPLAT_USER BUGSPLAT_PASS # honor autobuild_configure_parameters same as sling-buildscripts eval_autobuild_configure_parameters=$(eval $(echo echo $autobuild_configure_parameters)) @@ -578,11 +581,23 @@ then # nat 2016-12-22: without RELEASE_CRASH_REPORTING, we have no symbol file. if [ "${RELEASE_CRASH_REPORTING:-}" != "OFF" ] then + # BugSplat wants to see xcarchive.zip + # e.g. build-darwin-x86_64/newview/Release/Second Life Test.xcarchive.zip + symbol_file="${build_dir}/newview/${variant}/${viewer_channel}.xcarchive.zip" + if [[ ! -f "$symbol_file" ]] + then + # symbol tarball we prep for (e.g.) Breakpad + symbol_file="$VIEWER_SYMBOL_FILE" + else + # SL-19243 HACK: List contents of xcarchive.zip, before running + # upload-mac-symbols.sh which moves it to /tmp + unzip -l "$symbol_file" + fi # Upload crash reporter file - retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput "Symbolfile" "$VIEWER_SYMBOL_FILE" \ + retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput "Symbolfile" "$symbol_file" \ || fatal "Upload of symbolfile failed" wait_for_codeticket - symbolfile+=("$VIEWER_SYMBOL_FILE") + symbolfile+=("$symbol_file") fi # Upload the llphysicsextensions_tpv package, if one was produced @@ -604,13 +619,6 @@ then ## SL-19243 HACK: testing separate GH upload job on Windows if [[ "$arch" != "CYGWIN" ]] then - # SL-19243 HACK: List contents of xcarchive.zip, before running - # upload-mac-symbols.sh which moves it to /tmp - if [[ "$arch" == "Darwin" ]] - then - # e.g. build-darwin-x86_64/newview/Release/Second Life Test.xcarchive.zip - unzip -l "${build_dir}/newview/${variant}/${viewer_channel}.xcarchive.zip" - fi if [ -d ${build_dir}/packages/upload-extensions ]; then for extension in ${build_dir}/packages/upload-extensions/*.sh; do begin_section "Upload Extension $extension" -- cgit v1.2.3 From 5bf2317bd8a9ebef1d19b448fefd358264bde7c6 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 2 Sep 2023 12:19:26 -0400 Subject: SL-19243: Skip older Mac symbol upload because it moves the xcarchive.zip file away from where we later want to post it to GitHub. --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 4f67fb9603..6f74c64a39 100755 --- a/build.sh +++ b/build.sh @@ -616,8 +616,8 @@ then # Run upload extensions # Ex: bugsplat - ## SL-19243 HACK: testing separate GH upload job on Windows - if [[ "$arch" != "CYGWIN" ]] + ## SL-19243 HACK: testing separate GH upload jobs + if false then if [ -d ${build_dir}/packages/upload-extensions ]; then for extension in ${build_dir}/packages/upload-extensions/*.sh; do -- cgit v1.2.3 From 63d5d38e36061291343eddcec24a7243f896b980 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 8 Sep 2023 17:24:04 -0400 Subject: SL-18837: Stop failing build.sh if there's no installer. This unblocks ReleaseOS builds, and also preps for SL-19242. Streamline build.sh's Uploads section. --- build.sh | 51 ++------------------------------------------------- 1 file changed, 2 insertions(+), 49 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 6f74c64a39..b1bb15971d 100755 --- a/build.sh +++ b/build.sh @@ -550,32 +550,11 @@ then begin_section "Uploads" # Upload installer package=$(installer_$arch) - if [ x"$package" = x ] || test -d "$package" + if [ x"$package" != x ] && test -d "$package" then - fatal "No installer found from `pwd`" - succeeded=$build_coverity - else # Upload base package. - retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput Installer "$package" \ - || fatal "Upload of installer failed" - wait_for_codeticket installer+=("$package") - # Upload additional packages. - for package_id in $additional_packages - do - package=$(installer_$arch "$package_id") - if [ x"$package" != x ] - then - retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput "Installer $package_id" "$package" \ - || fatal "Upload of installer $package_id failed" - wait_for_codeticket - installer+=("$package") - else - record_failure "Failed to find additional package for '$package_id'." - fi - done - if [ "$last_built_variant" = "Release" ] then # nat 2016-12-22: without RELEASE_CRASH_REPORTING, we have no symbol file. @@ -588,47 +567,21 @@ then then # symbol tarball we prep for (e.g.) Breakpad symbol_file="$VIEWER_SYMBOL_FILE" - else - # SL-19243 HACK: List contents of xcarchive.zip, before running - # upload-mac-symbols.sh which moves it to /tmp - unzip -l "$symbol_file" fi # Upload crash reporter file - retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput "Symbolfile" "$symbol_file" \ - || fatal "Upload of symbolfile failed" - wait_for_codeticket symbolfile+=("$symbol_file") fi # Upload the llphysicsextensions_tpv package, if one was produced - # *TODO: Make this an upload-extension # Only upload this package when building the private repo so the # artifact is private. - if [[ "$GITHUB_REPOSITORY" == "secondlife/viewer-private" && \ + if [[ "x$GITHUB_REPOSITORY" == "xsecondlife/viewer-private" && \ -r "$build_dir/llphysicsextensions_package" ]] then llphysicsextensions_package=$(cat $build_dir/llphysicsextensions_package) - retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput "Physics Extensions Package" "$llphysicsextensions_package" --private \ - || fatal "Upload of physics extensions package failed" physicstpv+=("$llphysicsextensions_package") fi fi - - # Run upload extensions - # Ex: bugsplat - ## SL-19243 HACK: testing separate GH upload jobs - if false - then - if [ -d ${build_dir}/packages/upload-extensions ]; then - for extension in ${build_dir}/packages/upload-extensions/*.sh; do - begin_section "Upload Extension $extension" - . $extension - [ $? -eq 0 ] || fatal "Upload of extension $extension failed" - wait_for_codeticket - end_section "Upload Extension $extension" - done - fi - fi fi end_section "Uploads" else -- cgit v1.2.3 From fab7b300b9c8b82ac062cda5c5297500f0c311eb Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 11 Sep 2023 15:34:14 -0400 Subject: SL-19242: Re-enable the rest of the build product uploads. --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index b1bb15971d..c0d7e55f7e 100755 --- a/build.sh +++ b/build.sh @@ -550,7 +550,7 @@ then begin_section "Uploads" # Upload installer package=$(installer_$arch) - if [ x"$package" != x ] && test -d "$package" + if [ x"$package" != x ] && test -f "$package" then # Upload base package. installer+=("$package") -- cgit v1.2.3 From 1684d6249984e0ad8e13263da05f84cb5e6b84fb Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 3 Oct 2023 19:02:40 -0400 Subject: SL-19242: Remove signing and packaging from viewer_manifest.py for Mac and Windows. That's now done by subsequent jobs in the GitHub build. Remove workflow step to upload installers before signing and packaging jobs. Remove from viewer_manifest.py conditionals for 32-bit Windows or Mac. Also bump to actions/checkout@v4, per dependabot. --- build.sh | 4 ---- 1 file changed, 4 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index c0d7e55f7e..53d0122cbc 100755 --- a/build.sh +++ b/build.sh @@ -118,13 +118,11 @@ installer_CYGWIN() EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) # Build up these arrays as we go -installer=() metadata=() symbolfile=() physicstpv=() # and dump them to GITHUB_OUTPUT when done cleanup="$cleanup ; \ -arrayoutput installer ; \ arrayoutput metadata ; \ arrayoutput symbolfile ; \ arrayoutput physicstpv" @@ -553,8 +551,6 @@ then if [ x"$package" != x ] && test -f "$package" then # Upload base package. - installer+=("$package") - if [ "$last_built_variant" = "Release" ] then # nat 2016-12-22: without RELEASE_CRASH_REPORTING, we have no symbol file. -- cgit v1.2.3 From 89191059ef419dbad72fdc831ca3c29860d26a0c Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 4 Oct 2023 16:54:07 -0400 Subject: SL-18837: Upload symbol file and physics pkg without installer. build.sh logic used to test whether the installer existed and skip the symbol-file and llphysicsextensions uploads if not. Since we now sign and package the built viewer in a later build job, it's no longer appropriate to gate these uploads on existence of the installer. --- build.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 53d0122cbc..7f1e382c07 100755 --- a/build.sh +++ b/build.sh @@ -546,11 +546,9 @@ then if $build_viewer then begin_section "Uploads" - # Upload installer package=$(installer_$arch) - if [ x"$package" != x ] && test -f "$package" + if [ x"$package" != x ] then - # Upload base package. if [ "$last_built_variant" = "Release" ] then # nat 2016-12-22: without RELEASE_CRASH_REPORTING, we have no symbol file. -- cgit v1.2.3 From 1570153a8419878eea0e619a45e3d290ca3c0e92 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 4 Oct 2023 19:40:46 -0400 Subject: SL-18837: build.sh shouldn't even check for an installer. We no longer package the installer before this point, and we want to upload symbol files even so. --- build.sh | 51 ++++++++++++++++++++++----------------------------- 1 file changed, 22 insertions(+), 29 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 7f1e382c07..22f9e0c78a 100755 --- a/build.sh +++ b/build.sh @@ -546,36 +546,29 @@ then if $build_viewer then begin_section "Uploads" - package=$(installer_$arch) - if [ x"$package" != x ] + # nat 2016-12-22: without RELEASE_CRASH_REPORTING, we have no symbol file. + if [ "${RELEASE_CRASH_REPORTING:-}" != "OFF" ] then - if [ "$last_built_variant" = "Release" ] - then - # nat 2016-12-22: without RELEASE_CRASH_REPORTING, we have no symbol file. - if [ "${RELEASE_CRASH_REPORTING:-}" != "OFF" ] - then - # BugSplat wants to see xcarchive.zip - # e.g. build-darwin-x86_64/newview/Release/Second Life Test.xcarchive.zip - symbol_file="${build_dir}/newview/${variant}/${viewer_channel}.xcarchive.zip" - if [[ ! -f "$symbol_file" ]] - then - # symbol tarball we prep for (e.g.) Breakpad - symbol_file="$VIEWER_SYMBOL_FILE" - fi - # Upload crash reporter file - symbolfile+=("$symbol_file") - fi - - # Upload the llphysicsextensions_tpv package, if one was produced - # Only upload this package when building the private repo so the - # artifact is private. - if [[ "x$GITHUB_REPOSITORY" == "xsecondlife/viewer-private" && \ - -r "$build_dir/llphysicsextensions_package" ]] - then - llphysicsextensions_package=$(cat $build_dir/llphysicsextensions_package) - physicstpv+=("$llphysicsextensions_package") - fi - fi + # BugSplat wants to see xcarchive.zip + # e.g. build-darwin-x86_64/newview/Release/Second Life Test.xcarchive.zip + symbol_file="${build_dir}/newview/${variant}/${viewer_channel}.xcarchive.zip" + if [[ ! -f "$symbol_file" ]] + then + # symbol tarball we prep for (e.g.) Breakpad + symbol_file="$VIEWER_SYMBOL_FILE" + fi + # Upload crash reporter file + symbolfile+=("$symbol_file") + fi + + # Upload the llphysicsextensions_tpv package, if one was produced + # Only upload this package when building the private repo so the + # artifact is private. + if [[ "x$GITHUB_REPOSITORY" == "xsecondlife/viewer-private" && \ + -r "$build_dir/llphysicsextensions_package" ]] + then + llphysicsextensions_package=$(cat $build_dir/llphysicsextensions_package) + physicstpv+=("$llphysicsextensions_package") fi end_section "Uploads" else -- cgit v1.2.3