From f186f3f1d18d105938ae6f071ec03b3122228445 Mon Sep 17 00:00:00 2001 From: Beq Date: Sun, 1 Sep 2024 22:01:33 +0100 Subject: [PATCH] Exploring bugsplat symbol auto-upload. --- .github/workflows/build_viewer.yml | 88 ++++++++++++++++++------------ 1 file changed, 54 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build_viewer.yml b/.github/workflows/build_viewer.yml index 040155945c..e928ab33ca 100644 --- a/.github/workflows/build_viewer.yml +++ b/.github/workflows/build_viewer.yml @@ -37,6 +37,8 @@ jobs: outputs: viewer_channel: ${{ steps.channel.outputs.viewer_channel }} viewer_version: ${{ steps.version.outputs.viewer_version }} + viewer_build: ${{ steps.version.outputs.viewer_build }} + viewer_release_type: ${{ steps.version.outputs.viewer_release_type }} steps: - name: Install Bash 4 and GNU sed on Mac if: runner.os == 'macOS' @@ -289,15 +291,58 @@ jobs: id: build run: autobuild build -c ReleaseFS -A${{matrix.addrsize}} --no-configure shell: bash - # - name: Extract version number - # id: version - # shell: bash - # run: | - # if [ -r "indra/newview/viewer_version.txt" ] - # then - # viewer_version="$(<"$build_dir/newview/viewer_version.txt")" - # echo "viewer_version=$viewer_version" >> "$GITHUB_OUTPUT" - # fi + - name: Extract version number + id: version + shell: bash + run: | + if [ -r "indra/newview/viewer_version.txt" ] + then + viewer_version="$(<"indra/newview/viewer_version.txt")" + echo "viewer_version=$viewer_version" >> "$GITHUB_OUTPUT" + fi + viewer_build=$(git rev-list --count HEAD) + echo "viewer_build=$viewer_build" >> "$GITHUB_OUTPUT" + echo "viewer_channel=${{ env.FS_RELEASE_CHAN }}" >> "$GITHUB_OUTPUT" + echo "viewer_release_type=${{ env.FS_RELEASE_TYPE }}" >> "$GITHUB_OUTPUT" + - name: Post Release Symbols (windows) + if: runner.os == 'Windows' + uses: BugSplat-Git/symbol-upload@main + with: + clientId: "${{ secrets.BUGSPLAT_CLIENT_ID }}" + clientSecret: "${{ secrets.BUGSPLAT_CLIENT_SECRET }}" + database: ${{ steps.version.viewer_release_type == 'Release' && secrets.BUGSPLAT_RELEASE_DB || secrets.BUGSPLAT_PREVIEW_DB }} + application: "Firestorm-${{ steps.version.outputs.viewer_channel}}" + version: ${{ steps.version.outputs.viewer_version }} + files: "**/*.{pdb,exe,dll}" + directory: "build-*" + node-version: "20" + + - name: Post Release Symbols (macOS) + if: runner.os == 'macOS' + uses: BugSplat-Git/symbol-upload@main + with: + clientId: "${{ secrets.BUGSPLAT_CLIENT_ID }}" + clientSecret: "${{ secrets.BUGSPLAT_CLIENT_SECRET }}" + database: ${{ steps.version.viewer_release_type == 'Release' && secrets.BUGSPLAT_RELEASE_DB || secrets.BUGSPLAT_PREVIEW_DB }} + application: "Firestorm-${{ steps.version.outputs.viewer_channel}}" + version: ${{ steps.version.outputs.viewer_version }} + files: "**/*" + directory: "build-*" + node-version: "20" + - name: Post Release Symbols (linux) + if: runner.os == 'Linux' + uses: BugSplat-Git/symbol-upload@main + with: + clientId: "${{ secrets.BUGSPLAT_CLIENT_ID }}" + clientSecret: "${{ secrets.BUGSPLAT_CLIENT_SECRET }}" + database: ${{ steps.version.viewer_release_type == 'Release' && secrets.BUGSPLAT_RELEASE_DB || secrets.BUGSPLAT_PREVIEW_DB }} + application: "Firestorm-${{ steps.version.outputs.viewer_channel}}" + version: ${{ steps.version.outputs.viewer_version }} + files: "**/*" + directory: "build-*" + dumpSyms: true + node-version: "20" + - name: Publish artifacts if: runner.os == 'Windows' uses: actions/upload-artifact@v4 @@ -324,31 +369,6 @@ jobs: path: | build-darwin-*/newview/*.dmg build-darwin-*/newview/*.bz2 - # post-windows-symbols: - # needs: build_matrix - # runs-on: ubuntu-latest - # steps: - # - name: Post Windows symbols - # uses: secondlife/viewer-build-util/post-bugsplat-windows@v1 - # with: - # username: ${{ secrets.BUGSPLAT_USER }} - # password: ${{ secrets.BUGSPLAT_PASS }} - # database: "firestorm_release" - # channel: ${{ needs.build_matrix.outputs.viewer_channel }} - # version: ${{ needs.build_matrix.outputs.viewer_version }} - - # post-mac-symbols: - # needs: build_matrix - # runs-on: ubuntu-latest - # steps: - # - name: Post Mac symbols - # uses: secondlife/viewer-build-util/post-bugsplat-mac@v1 - # with: - # username: ${{ secrets.BUGSPLAT_USER }} - # password: ${{ secrets.BUGSPLAT_PASS }} - # database: "firestorm_release" - # channel: ${{ needs.build_matrix.outputs.viewer_channel }} - # version: ${{ needs.build_matrix.outputs.viewer_version }} deploy: runs-on: ubuntu-latest needs: build_matrix