Skip to content

Commit

Permalink
DRTVWR-578: promote actions branch to master
Browse files Browse the repository at this point in the history
  • Loading branch information
nat-goodspeed authored Oct 25, 2023
2 parents 5264fea + 527603a commit 286d157
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 38 deletions.
12 changes: 12 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:

- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly

- package-ecosystem: pip
directory: /
schedule:
interval: monthly
18 changes: 18 additions & 0 deletions .github/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
changelog:
exclude:
labels:
- ignore-for-release
authors:
- dependabot
categories:
- title: Breaking Changes 🛠
labels:
- semver-major
- breaking-change
- title: New Features 🎉
labels:
- semver-minor
- enhancement
- title: Other Changes
labels:
- '*'
25 changes: 25 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build
on: [push]
jobs:
build:
strategy:
matrix:
os: [windows-2022, macos-11]
addrsize: ["64"]
include:
- os: windows-2022
addrsize: "32"
continue-on-error: false
runs-on: ${{ matrix.os }}
steps:
- uses: secondlife/action-autobuild@v3
with:
addrsize: ${{ matrix.addrsize }}
release:
needs: build
runs-on: [ubuntu-latest]
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: secondlife/action-autobuild-release@v1
with:
public: true
5 changes: 5 additions & 0 deletions SendPdbs.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@rem Run SendPdbs.exe via this .bat file because, when msys bash attempts to
@rem run it directly, SendPdbs.exe complains about absence of switches that
@rem are clearly present on its command line.

"%SendPdbs%" /a "%viewer_channel%" /v "%version%" /b "%BUGSPLAT_DB%" /f "%files%"
16 changes: 6 additions & 10 deletions build-cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,14 @@ case "$AUTOBUILD_PLATFORM" in

if [ "$AUTOBUILD_PLATFORM" == "windows64" ]
then
lib="lib64"
bin="bin64"
sfx="64"
rcdll="BugSplatRc64.dll"
else
lib="lib"
bin="bin"
sfx=""
rcdll="BugSplatRC.dll"
fi
lib="lib$sfx"
bin="bin$sfx"

# cygwin bash incantation to eliminate FRIGGING CARRIAGE RETURN
set -o igncr
Expand Down Expand Up @@ -83,15 +81,13 @@ case "$AUTOBUILD_PLATFORM" in
cp -v "$BUGSPLAT_DIR/bin/Meziantou.Framework.Win32.CredentialManager.dll" "$stage/bin/release/"
cp -v "$BUGSPLAT_DIR/bin/PdbLibrary.dll" "$stage/bin/release/"
cp -v "$top/upload-windows-symbols.sh" "$stage/upload-extensions/"
cp -v "$top/SendPdbs.bat" "$stage/upload-extensions/"
;;
darwin*)
# BugsplatMac version embedded in the framework's Info.plist
framework="$top/Carthage/Build/Mac/BugsplatMac.framework"
Info_plist="$framework/Resources/Info.plist"
BUGSPLAT_VERSION="$(python3 -c "import plistlib
with open('$Info_plist', 'rb') as fp :
manifest = plistlib.loads(fp.read())
print (manifest['CFBundleShortVersionString'])")"
BUGSPLAT_VERSION="$(/usr/libexec/PlistBuddy -c 'Print CFBundleShortVersionString' \
"$framework/Resources/Info.plist")"
# Because of its embedded directory symlinks, copying the framework
# works much better if we kill the previous copy first.
stage_framework="$stage/lib/release/$(basename "$framework")"
Expand Down Expand Up @@ -128,5 +124,5 @@ print (manifest['CFBundleShortVersionString'])")"
echo "This project is not currently supported for $AUTOBUILD_PLATFORM" 1>&2 ; exit 1
;;
esac
echo "$BUGSPLAT_VERSION.$build" > "$stage/version.txt"
echo "$BUGSPLAT_VERSION-$build" > "$stage/version.txt"
cp "$BUGSPLAT_DIR/BUGSPLAT_LICENSE.txt" "$stage/LICENSES"
55 changes: 27 additions & 28 deletions upload-windows-symbols.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,52 +5,51 @@
if [ "$variant" == "Release" ]
then
# Our build-cmd.sh copies SendPdbs.exe to bin/release, and our
# autobuild.xml ensures that it's packaged in the tarball
SendPdbs="${build_dir}/packages/bin/release/SendPdbs.exe"
# autobuild.xml ensures that it's packaged in the tarball.
# Because we invoke SendPdbs via SendPdbs.bat, use native_path.
export SendPdbs="$(native_path "${build_dir}/packages/bin/release/SendPdbs.exe")"

# viewer version -- explicitly ditch '\r' as bash only strips '\n'
version="$(tr <"${build_dir}/newview/viewer_version.txt" -d '\r')"
export version="$(tr <"${build_dir}/newview/viewer_version.txt" -d '\r')"

# SendPdbs wants a single /f argument in which individual pathnames are
# separated by ';'
function wildjoin {
function strjoin {
local IFS="$1"
shift
echo "$*"
}

# upload to BugSplat -- don't echo credentials
set +x

# need BugSplat credentials to post symbol files
# defines BUGSPLAT_USER and BUGSPLAT_PASS
source "$build_secrets_checkout/bugsplat/bugsplat.sh"

# for some reason bugsplat requires uploading exe that match the ones we ship to users
# Win 10 specific. Upload files using final exe name (viewer will be adjused separately
# Win 10 specific. Upload files using final exe name (viewer will be adjusted separately
# to use same name)
exe_file="${build_dir}/newview/Release/SecondLifeViewer.exe"
reldir="${build_dir}/newview/Release"
filelist=("$(native_path "$reldir/secondlife-bin.pdb")")
exe_file="$reldir/SecondLifeViewer.exe"
if [ -e "$exe_file" ]
then
files="$(wildjoin ';' "${build_dir}/newview/Release"/{secondlife-bin.pdb,SecondLifeViewer.exe})"
filelist+=("$(native_path "$exe_file")")
else
# Compatibility for older builds
files="$(wildjoin ';' "${build_dir}/newview/Release"/secondlife-bin.{pdb,exe})"
filelist+=("$(native_path "$reldir/secondlife-bin.exe")")
fi

args=(/a "$viewer_channel" \
/v "$version" \
/b "$BUGSPLAT_DB" \
/f "$files")
echo "$SendPdbs" /u xxx /p xxx "${args[@]}"
"$SendPdbs" /u "$BUGSPLAT_USER" /p "$BUGSPLAT_PASS" "${args[@]}"
rc=$?

# SL-19594: HACK HACK HACK to let viewer builds succeeded even when SendPdbs fails
rc=0
# HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK

# don't echo credentials
set +x
# SL-19854: specifying /u and /p arguments, we kept hitting
# ERROR: The /u (user) or /credentials argument must be specified or set
# by environment variable 'BugSplatUser'
# ERROR: The /p (password) or /credentials argument must be specified or
# set by environment variable 'BugSplatPassword'
# Shrug, setting those environment variables seems to work better.
export BugSplatUser="$BUGSPLAT_USER"
export BugSplatPassword="$BUGSPLAT_PASS"
set -x

[ $rc -eq 0 ] || fatal "BugSplat SendPdbs failed"
export files="$(strjoin ';' "${filelist[@]}")"

# All parameters are passed via environment variables, which is why
# various variables set above are exported.
mydir="$(dirname "$BASH_SOURCE")"
"$mydir/SendPdbs.bat" || fatal "BugSplat SendPdbs failed"
fi

0 comments on commit 286d157

Please sign in to comment.