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.master
parent
14d0b514af
commit
479fa3e196
|
|
@ -192,18 +192,11 @@ jobs:
|
|||
# Given the size of our installers, and the fact that we typically
|
||||
# only want to download just one instead of a single zip containing
|
||||
# several, generate a distinct artifact name for each installer.
|
||||
# Since the matrix above can run multiple builds on the same
|
||||
# If the matrix above can run multiple builds on the same
|
||||
# platform, we must disambiguate on more than the platform name.
|
||||
# If we were still running Windows 32-bit builds, we'd need to
|
||||
# e.g. if we were still running Windows 32-bit builds, we'd need to
|
||||
# qualify the artifact with bit width.
|
||||
# DEVELOPER_DIR="/Applications/Xcode_14.0.1.app/Contents/Developer"
|
||||
# or the empty string, so this produces dev="Xcode_14.0.1" or ".".
|
||||
dev="$(basename "$(dirname "$(dirname "$DEVELOPER_DIR")")" .app)"
|
||||
artifact="$RUNNER_OS $dev"
|
||||
# For empty DEVELOPER_DIR, dev is ".", so artifact can end up with
|
||||
# appended " ." -- ditch that if present.
|
||||
artifact="${artifact% .}"
|
||||
echo "artifact=$artifact" >> $GITHUB_OUTPUT
|
||||
echo "artifact=$RUNNER_OS" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Upload installer
|
||||
uses: actions/upload-artifact@v3
|
||||
|
|
@ -229,3 +222,13 @@ jobs:
|
|||
# emitted by build.sh, possibly multiple lines
|
||||
path: |
|
||||
${{ steps.build.outputs.metadata }}
|
||||
|
||||
- name: Upload physics package
|
||||
uses: actions/upload-artifact@v3
|
||||
# should only be set for viewer-private
|
||||
if: steps.build.outputs.physicstpv
|
||||
with:
|
||||
name: "${{ steps.build.outputs.artifact }} physics"
|
||||
# emitted by build.sh, zero or one lines
|
||||
path: |
|
||||
${{ steps.build.outputs.physicstpv }}
|
||||
|
|
|
|||
24
build.sh
24
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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue