From 5b4846046bb0700d749f017916e1d34294d830e0 Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Mon, 10 Oct 2022 09:33:04 -0700 Subject: Add build action --- .github/workflows/build.yaml | 53 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/build.yaml (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000000..7ba97b6d53 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,53 @@ +name: Build + +on: + workflow_dispatch: + pull_request: + push: + branches: ["actions"] + +jobs: + build: + strategy: + matrix: + os: [windows-2019, macos-11] + configuration: [RelWithDebInfoOS] + arch: [64] + include: + - os: windows-2019 + configuration: RelWithDebInfoOS + arch: 32 + runs-on: ${{ matrix.os }} + env: + AUTOBUILD_ADDRSIZE: ${{ matrix.arch }} + AUTOBUILD_INSTALLABLE_CACHE: ${{ github.workspace }}/.autobuild-installables + AUTOBUILD_VARIABLES_FILE: ${{ github.workspace }}/.build-variables/variables + steps: + - uses: actions/checkout@v3 + + - uses: actions/checkout@v3 + with: + repository: secondlife/build-variables + ref: viewer + token: ${{ secrets.SHARED_GITHUB_TOKEN }} + path: .build-variables + + - uses: actions/setup-python@v4 + with: + python-version: 3.x + + - name: Install autobuild + run: pip install autobuild<4 + + - uses: actions/cache@v3 + id: cache-installables + with: + path: .autobuild-installables + key: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.configuration }}-${{ hashFiles('autobuild.xml') }} + + - name: Build + shell: bash + run: | + autobuild install + autobuild configure -c ${{ matrix.configuration }} + autobuild build --no-configure -- cgit v1.3 From 28ec3a63b8f9c5f97b1024f18036af72f9d3b281 Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Mon, 10 Oct 2022 09:35:04 -0700 Subject: Pip install autobuild --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7ba97b6d53..3fce1da35f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -37,7 +37,7 @@ jobs: python-version: 3.x - name: Install autobuild - run: pip install autobuild<4 + run: pip install autobuild - uses: actions/cache@v3 id: cache-installables -- cgit v1.3 From 9a84b3923db0653f01ab7d8541645007347c4db4 Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Mon, 10 Oct 2022 09:40:32 -0700 Subject: Separate autobuild install from build --- .github/workflows/build.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3fce1da35f..16c794cde5 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,14 +12,15 @@ jobs: matrix: os: [windows-2019, macos-11] configuration: [RelWithDebInfoOS] - arch: [64] + addrsize: [64] include: - os: windows-2019 configuration: RelWithDebInfoOS - arch: 32 + addrsize: 32 runs-on: ${{ matrix.os }} env: - AUTOBUILD_ADDRSIZE: ${{ matrix.arch }} + AUTOBUILD_CONFIGURATION: ${{ matrix.configuration }} + AUTOBUILD_ADDRSIZE: ${{ matrix.addrsize }} AUTOBUILD_INSTALLABLE_CACHE: ${{ github.workspace }}/.autobuild-installables AUTOBUILD_VARIABLES_FILE: ${{ github.workspace }}/.build-variables/variables steps: @@ -45,9 +46,10 @@ jobs: path: .autobuild-installables key: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.configuration }}-${{ hashFiles('autobuild.xml') }} + - name: Install autobuild packages + run: autobuild install + - name: Build - shell: bash run: | - autobuild install autobuild configure -c ${{ matrix.configuration }} autobuild build --no-configure -- cgit v1.3 From 7da93ab373a145392e51af0d3fdf7b61dd55ce0b Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Mon, 10 Oct 2022 09:45:17 -0700 Subject: Force RelWithDebInfoOS configuration --- .github/workflows/build.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 16c794cde5..8a13ac0374 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -30,7 +30,6 @@ jobs: with: repository: secondlife/build-variables ref: viewer - token: ${{ secrets.SHARED_GITHUB_TOKEN }} path: .build-variables - uses: actions/setup-python@v4 @@ -47,7 +46,7 @@ jobs: key: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.configuration }}-${{ hashFiles('autobuild.xml') }} - name: Install autobuild packages - run: autobuild install + run: autobuild install -c ${{ matrix.configuration }} - name: Build run: | -- cgit v1.3 From 6b137c7fd65b50cdba69b789e3ead1728fc1f000 Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Mon, 10 Oct 2022 09:50:40 -0700 Subject: Allow CMAKE to run autobuild install --- .github/workflows/build.yaml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8a13ac0374..3d66c02e75 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -24,31 +24,32 @@ jobs: AUTOBUILD_INSTALLABLE_CACHE: ${{ github.workspace }}/.autobuild-installables AUTOBUILD_VARIABLES_FILE: ${{ github.workspace }}/.build-variables/variables steps: - - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v3 - - uses: actions/checkout@v3 + - name: Checkout build variables + uses: actions/checkout@v3 with: repository: secondlife/build-variables ref: viewer path: .build-variables - - uses: actions/setup-python@v4 + - name: Install python + uses: actions/setup-python@v4 with: python-version: 3.x - name: Install autobuild run: pip install autobuild - - uses: actions/cache@v3 + - name: Cache autobuild packages + uses: actions/cache@v3 id: cache-installables with: path: .autobuild-installables key: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.configuration }}-${{ hashFiles('autobuild.xml') }} - - name: Install autobuild packages - run: autobuild install -c ${{ matrix.configuration }} - - name: Build run: | - autobuild configure -c ${{ matrix.configuration }} + autobuild configure autobuild build --no-configure -- cgit v1.3 From f2f9b32e753972d83087b9201a0073e208a0dd75 Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Mon, 10 Oct 2022 09:57:29 -0700 Subject: Use pre-installed python --- .github/workflows/build.yaml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3d66c02e75..bb0fb2efd8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -33,21 +33,16 @@ jobs: repository: secondlife/build-variables ref: viewer path: .build-variables - - - name: Install python - uses: actions/setup-python@v4 - with: - python-version: 3.x - name: Install autobuild - run: pip install autobuild + run: pip3 install autobuild - name: Cache autobuild packages uses: actions/cache@v3 id: cache-installables with: path: .autobuild-installables - key: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.configuration }}-${{ hashFiles('autobuild.xml') }} + key: ${{ matrix.os }}-${{ matrix.addrsize }}-${{ matrix.configuration }}-${{ hashFiles('autobuild.xml') }} - name: Build run: | -- cgit v1.3 From 7dc98ef96a871eed413a3fd5a578e3d8b143026d Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Mon, 10 Oct 2022 10:01:27 -0700 Subject: Build with VS2k22 --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index bb0fb2efd8..b58d426966 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -10,7 +10,7 @@ jobs: build: strategy: matrix: - os: [windows-2019, macos-11] + os: [windows-2022, macos-11] configuration: [RelWithDebInfoOS] addrsize: [64] include: @@ -46,5 +46,5 @@ jobs: - name: Build run: | - autobuild configure + autobuild configure -c ${{ matrix.configuration }} autobuild build --no-configure -- cgit v1.3 From 5fadc18c6c4d80f0338265b7e3361960c28b00d4 Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Mon, 10 Oct 2022 10:02:12 -0700 Subject: Also build win32 with VS2k22 --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b58d426966..39e5d1597d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,7 +14,7 @@ jobs: configuration: [RelWithDebInfoOS] addrsize: [64] include: - - os: windows-2019 + - os: windows-2022 configuration: RelWithDebInfoOS addrsize: 32 runs-on: ${{ matrix.os }} -- cgit v1.3 From 1f8671f3ac46f268dbf043753aad34489778b673 Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Mon, 10 Oct 2022 10:18:21 -0700 Subject: Perform source_environment --- .github/workflows/build.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 39e5d1597d..80a1498fce 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -45,6 +45,10 @@ jobs: key: ${{ matrix.os }}-${{ matrix.addrsize }}-${{ matrix.configuration }}-${{ hashFiles('autobuild.xml') }} - name: Build + shell: bash run: | - autobuild configure -c ${{ matrix.configuration }} + autobuild --quiet source_environment > .env + source .env + + autobuild configure autobuild build --no-configure -- cgit v1.3 From 2e53204e774a24483653d8a4d4c31bff2d7a5f97 Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Mon, 10 Oct 2022 10:28:04 -0700 Subject: Explicitly set AUTOBUILD_VSVER --- .github/workflows/build.yaml | 1 + 1 file changed, 1 insertion(+) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 80a1498fce..e2abb3ce7c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -23,6 +23,7 @@ jobs: AUTOBUILD_ADDRSIZE: ${{ matrix.addrsize }} AUTOBUILD_INSTALLABLE_CACHE: ${{ github.workspace }}/.autobuild-installables AUTOBUILD_VARIABLES_FILE: ${{ github.workspace }}/.build-variables/variables + AUTOBUILD_VSVER: "170" steps: - name: Checkout code uses: actions/checkout@v3 -- cgit v1.3 From 82d76fc0a36d62ba34ce2b38b9e14a105c899066 Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Mon, 10 Oct 2022 10:44:04 -0700 Subject: Use cygwin --- .github/workflows/build.yaml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e2abb3ce7c..06aac0c8ab 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -35,6 +35,22 @@ jobs: ref: viewer path: .build-variables + - name: Install cygwin + if: runner.os == 'Windows' + uses: secondlife/setup-cygwin@v1 + + - name: Determine shell + id: shell + shell: bash + env: + WINDOWS: ${{ runner.os == 'Windows' }} + run: | + if [[ $WINDOWS == 'true' ]]; then + echo "::set-output name=shell::C:\cygwin64\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'" + else + echo '::set-output name=shell::bash' + fi + - name: Install autobuild run: pip3 install autobuild @@ -46,8 +62,12 @@ jobs: key: ${{ matrix.os }}-${{ matrix.addrsize }}-${{ matrix.configuration }}-${{ hashFiles('autobuild.xml') }} - name: Build - shell: bash + shell: ${{ steps.shell.outputs.shell }} + env: + WORKSPACE: ${{ github.workspace }} run: | + cd "$WORKSPACE" + autobuild --quiet source_environment > .env source .env -- cgit v1.3 From a05c7312c52c7261c2473a8163bf2a4b99b8b059 Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Mon, 10 Oct 2022 10:54:13 -0700 Subject: Call load_vsvars --- .github/workflows/build.yaml | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 06aac0c8ab..10b02783bc 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -35,22 +35,6 @@ jobs: ref: viewer path: .build-variables - - name: Install cygwin - if: runner.os == 'Windows' - uses: secondlife/setup-cygwin@v1 - - - name: Determine shell - id: shell - shell: bash - env: - WINDOWS: ${{ runner.os == 'Windows' }} - run: | - if [[ $WINDOWS == 'true' ]]; then - echo "::set-output name=shell::C:\cygwin64\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'" - else - echo '::set-output name=shell::bash' - fi - - name: Install autobuild run: pip3 install autobuild @@ -62,14 +46,15 @@ jobs: key: ${{ matrix.os }}-${{ matrix.addrsize }}-${{ matrix.configuration }}-${{ hashFiles('autobuild.xml') }} - name: Build - shell: ${{ steps.shell.outputs.shell }} + shell: bash env: - WORKSPACE: ${{ github.workspace }} + WINDOWS: ${{ runner.os == 'Windows' }} run: | - cd "$WORKSPACE" - autobuild --quiet source_environment > .env source .env + if [[ "$WINDOWS" == "true" ]]; then + load_vsvars + fi autobuild configure autobuild build --no-configure -- cgit v1.3 From 271e6e367e8a44b33e3dd1e77c2972774a1c1de9 Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Mon, 10 Oct 2022 11:23:05 -0700 Subject: Remove cygwin artifacts --- .github/workflows/build.yaml | 8 -------- .gitignore | 4 +++- 2 files changed, 3 insertions(+), 9 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 10b02783bc..66ee864a77 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -47,14 +47,6 @@ jobs: - name: Build shell: bash - env: - WINDOWS: ${{ runner.os == 'Windows' }} run: | - autobuild --quiet source_environment > .env - source .env - if [[ "$WINDOWS" == "true" ]]; then - load_vsvars - fi - autobuild configure autobuild build --no-configure diff --git a/.gitignore b/.gitignore index 80eca667df..f0b5f86211 100755 --- a/.gitignore +++ b/.gitignore @@ -73,4 +73,6 @@ tarfile_tmp trivial_change_force_build web/config.* web/locale.* -web/secondlife.com.* \ No newline at end of file +web/secondlife.com.* + +.env -- cgit v1.3 From 13ab3e3f0658a26ae8345a1b8916240bafae302b Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Tue, 11 Oct 2022 14:17:57 -0700 Subject: Omit macOS until I have a mac laptop --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 66ee864a77..f2bba6dc45 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -10,7 +10,7 @@ jobs: build: strategy: matrix: - os: [windows-2022, macos-11] + os: [windows-2022] configuration: [RelWithDebInfoOS] addrsize: [64] include: -- cgit v1.3 From 8d7cde22c31a59d0503230334b1d68e858364c9a Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Tue, 11 Oct 2022 15:10:04 -0700 Subject: Replace llbase with llsd module --- .github/workflows/build.yaml | 3 ++- indra/llcommon/tests/llleap_test.cpp | 2 +- indra/llcommon/tests/llsdserialize_test.cpp | 2 +- indra/llcorehttp/tests/test_llcorehttp_peer.py | 3 +-- indra/llmessage/tests/test_llsdmessage_peer.py | 3 +-- indra/newview/viewer_manifest.py | 2 +- scripts/metrics/slp_conv.py | 2 +- scripts/metrics/viewer_asset_logs.py | 2 +- scripts/metrics/viewerstats.py | 2 +- 9 files changed, 10 insertions(+), 11 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f2bba6dc45..91788c4076 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -10,7 +10,7 @@ jobs: build: strategy: matrix: - os: [windows-2022] + os: [windows-2022, macos-11] configuration: [RelWithDebInfoOS] addrsize: [64] include: @@ -48,5 +48,6 @@ jobs: - name: Build shell: bash run: | + pip install llsd # Required by viewer tests autobuild configure autobuild build --no-configure diff --git a/indra/llcommon/tests/llleap_test.cpp b/indra/llcommon/tests/llleap_test.cpp index 7ee36a9ea6..60005fc6a9 100644 --- a/indra/llcommon/tests/llleap_test.cpp +++ b/indra/llcommon/tests/llleap_test.cpp @@ -109,7 +109,7 @@ namespace tut "import os\n" "import sys\n" "\n" - "from llbase import llsd\n" + "import llsd\n" "\n" "class ProtocolError(Exception):\n" " def __init__(self, msg, data):\n" diff --git a/indra/llcommon/tests/llsdserialize_test.cpp b/indra/llcommon/tests/llsdserialize_test.cpp index c246f5ee56..be7ec12094 100644 --- a/indra/llcommon/tests/llsdserialize_test.cpp +++ b/indra/llcommon/tests/llsdserialize_test.cpp @@ -1706,7 +1706,7 @@ namespace tut // scanner. import_llsd("import os.path\n" "import sys\n" - "from llbase import llsd\n") + "import llsd\n") {} ~TestPythonCompatible() {} diff --git a/indra/llcorehttp/tests/test_llcorehttp_peer.py b/indra/llcorehttp/tests/test_llcorehttp_peer.py index 778de90962..b9992538ba 100755 --- a/indra/llcorehttp/tests/test_llcorehttp_peer.py +++ b/indra/llcorehttp/tests/test_llcorehttp_peer.py @@ -38,8 +38,7 @@ from io import StringIO from http.server import HTTPServer, BaseHTTPRequestHandler -from llbase.fastest_elementtree import parse as xml_parse -from llbase import llsd +import llsd # we're in llcorehttp/tests ; testrunner.py is found in llmessage/tests sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, diff --git a/indra/llmessage/tests/test_llsdmessage_peer.py b/indra/llmessage/tests/test_llsdmessage_peer.py index 5ba0749e31..ff8f40a144 100755 --- a/indra/llmessage/tests/test_llsdmessage_peer.py +++ b/indra/llmessage/tests/test_llsdmessage_peer.py @@ -33,8 +33,7 @@ import os import sys from http.server import HTTPServer, BaseHTTPRequestHandler -from llbase.fastest_elementtree import parse as xml_parse -from llbase import llsd +import llsd from testrunner import freeport, run, debug, VERBOSE import time diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 3327ecfb56..30b0d23a93 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -49,7 +49,7 @@ viewer_dir = os.path.dirname(__file__) # indra.util.llmanifest under their system Python! sys.path.insert(0, os.path.join(viewer_dir, os.pardir, "lib", "python")) from indra.util.llmanifest import LLManifest, main, path_ancestors, CHANNEL_VENDOR_BASE, RELEASE_CHANNEL, ManifestError, MissingError -from llbase import llsd +import llsd class ViewerManifest(LLManifest): def is_packaging_viewer(self): diff --git a/scripts/metrics/slp_conv.py b/scripts/metrics/slp_conv.py index 27f922b74a..25f9a8c060 100644 --- a/scripts/metrics/slp_conv.py +++ b/scripts/metrics/slp_conv.py @@ -29,7 +29,7 @@ Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA $/LicenseInfo$ """ -from llbase import llsd +import llsd import argparse parser = argparse.ArgumentParser( diff --git a/scripts/metrics/viewer_asset_logs.py b/scripts/metrics/viewer_asset_logs.py index 0365936188..bd996dff79 100644 --- a/scripts/metrics/viewer_asset_logs.py +++ b/scripts/metrics/viewer_asset_logs.py @@ -28,7 +28,7 @@ $/LicenseInfo$ import argparse from lxml import etree -from llbase import llsd +import llsd def get_metrics_record(infiles): for filename in args.infiles: diff --git a/scripts/metrics/viewerstats.py b/scripts/metrics/viewerstats.py index 7e19539e15..e64343329c 100755 --- a/scripts/metrics/viewerstats.py +++ b/scripts/metrics/viewerstats.py @@ -31,7 +31,7 @@ import numpy as np import pandas as pd import json from collections import Counter, defaultdict -from llbase import llsd +import llsd import io import re import os -- cgit v1.3 From 6112e92b61c334d3c0656bacdea92690cea1a76b Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Wed, 12 Oct 2022 11:49:47 -0700 Subject: Upload installer, build Release, use large runner --- .github/workflows/build.yaml | 27 +++++++++++++---- .../installers/windows/installer_template.nsi | 1 - indra/newview/viewer_manifest.py | 34 ++++++---------------- 3 files changed, 31 insertions(+), 31 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 91788c4076..d6916a4808 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -10,14 +10,14 @@ jobs: build: strategy: matrix: - os: [windows-2022, macos-11] - configuration: [RelWithDebInfoOS] + runner: [windows_2022_public] + configuration: [ReleaseOS] addrsize: [64] include: - - os: windows-2022 - configuration: RelWithDebInfoOS + - runner: windows_2022_public + configuration: ReleaseOS addrsize: 32 - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.runner }} env: AUTOBUILD_CONFIGURATION: ${{ matrix.configuration }} AUTOBUILD_ADDRSIZE: ${{ matrix.addrsize }} @@ -45,9 +45,26 @@ jobs: path: .autobuild-installables key: ${{ matrix.os }}-${{ matrix.addrsize }}-${{ matrix.configuration }}-${{ hashFiles('autobuild.xml') }} + - name: Install windows dependencies + if: runner.os == 'Windows' + run: choco install nsis-unicode + - name: Build + id: build shell: bash run: | pip install llsd # Required by viewer tests autobuild configure autobuild build --no-configure + + installer_path=$(find ./build-*/newview/ | grep '_Setup\.exe') + installer_name="$(basename $installer_path)" + echo "::set-output name=installer_path::$installer_path" + echo "::set-output name=installer_name::$installer_name" + + - name: Upload installer + if: runner.os == 'Windows' + uses: actions/upload-artifact@v3 + with: + name: ${{ steps.build.outputs.installer_name }} + path: ${{ steps.build.outputs.installer_path }} diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 7513908cb4..f7908b059c 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -26,7 +26,6 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Compiler flags ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Unicode true SetOverwrite on # Overwrite files SetCompress auto # Compress if saves space SetCompressor /solid lzma # Compress whole installer as one block diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 30b0d23a93..eec8e84a2d 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -28,7 +28,6 @@ $/LicenseInfo$ """ import errno import glob -import itertools import json import os import os.path @@ -36,12 +35,9 @@ import plistlib import random import re import shutil -import stat import subprocess import sys -import tarfile import time -import zipfile viewer_dir = os.path.dirname(__file__) # Add indra/lib/python to our path so we don't have to muck with PYTHONPATH. @@ -789,27 +785,15 @@ class WindowsManifest(ViewerManifest): # Check two paths, one for Program Files, and one for Program Files (x86). # Yay 64bit windows. - for ProgramFiles in 'ProgramFiles', 'ProgramFiles(x86)': - NSIS_path = os.path.expandvars(r'${%s}\NSIS\makensis.exe' % ProgramFiles) - if os.path.exists(NSIS_path): - break - installer_created=False - nsis_attempts=3 - nsis_retry_wait=15 - for attempt in range(nsis_attempts): - try: - self.run_command([NSIS_path, '/V2', self.dst_path_of(tempfile)]) - except ManifestError as err: - if attempt+1 < nsis_attempts: - print("nsis failed, waiting %d seconds before retrying" % nsis_retry_wait, file=sys.stderr) - time.sleep(nsis_retry_wait) - nsis_retry_wait*=2 - else: - # NSIS worked! Done! - break - else: - print("Maximum nsis attempts exceeded; giving up", file=sys.stderr) - raise + nsis_path = "makensis.exe" + for program_files in '${programfiles}', '${programfiles(x86)}': + for nesis_path in 'NSIS', 'NSIS\\Unicode': + possible_path = os.path.expandvars(f"{program_files}\\{nesis_path}\\makensis.exe") + if os.path.exists(possible_path): + nsis_path = possible_path + break + + self.run_command([possible_path, '/V2', self.dst_path_of(tempfile)]) self.sign(installer_file) self.created_path(self.dst_path_of(installer_file)) -- cgit v1.3 From efb987f595d6749d42e3148bf0e071f5bafce450 Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Wed, 12 Oct 2022 12:59:12 -0700 Subject: Run on windows-2022-large --- .github/workflows/build.yaml | 8 ++++---- indra/cmake/00-Common.cmake | 9 --------- 2 files changed, 4 insertions(+), 13 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d6916a4808..e90448425b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -10,14 +10,14 @@ jobs: build: strategy: matrix: - runner: [windows_2022_public] + runner: [windows-2022-large] configuration: [ReleaseOS] addrsize: [64] include: - - runner: windows_2022_public + - runner: windows-2022-large configuration: ReleaseOS addrsize: 32 - runs-on: ${{ matrix.runner }} + runs-on: [${{ matrix.runner }}] env: AUTOBUILD_CONFIGURATION: ${{ matrix.configuration }} AUTOBUILD_ADDRSIZE: ${{ matrix.addrsize }} @@ -43,7 +43,7 @@ jobs: id: cache-installables with: path: .autobuild-installables - key: ${{ matrix.os }}-${{ matrix.addrsize }}-${{ matrix.configuration }}-${{ hashFiles('autobuild.xml') }} + key: ${{ matrix.runner }}-${{ matrix.addrsize }}-${{ matrix.configuration }}-${{ hashFiles('autobuild.xml') }} - name: Install windows dependencies if: runner.os == 'Windows' diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index c848d00710..bf5a107c73 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -55,15 +55,6 @@ if (WINDOWS) # http://www.cmake.org/pipermail/cmake/2009-September/032143.html string(REPLACE "/Zm1000" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) - # Without PreferredToolArchitecture=x64, as of 2020-06-26 the 32-bit - # compiler on our TeamCity build hosts has started running out of virtual - # memory for the precompiled header file. - # CP changed to only append the flag for 32bit builds - on 64bit builds, - # locally at least, the build output is spammed with 1000s of 'D9002' - # warnings about this switch being ignored. - if( ADDRESS_SIZE EQUAL 32 ) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /p:PreferredToolArchitecture=x64") - endif() # zlib has assembly-language object files incompatible with SAFESEH add_link_options(/LARGEADDRESSAWARE /SAFESEH:NO -- cgit v1.3 From 97f84f7051a318e8beb8abf02505a2b423ba9c72 Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Wed, 12 Oct 2022 13:15:18 -0700 Subject: Fix YAML syntax --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e90448425b..1dc58a404a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -17,7 +17,7 @@ jobs: - runner: windows-2022-large configuration: ReleaseOS addrsize: 32 - runs-on: [${{ matrix.runner }}] + runs-on: ${{ matrix.runner }} env: AUTOBUILD_CONFIGURATION: ${{ matrix.configuration }} AUTOBUILD_ADDRSIZE: ${{ matrix.addrsize }} -- cgit v1.3 From aa85ed00f8536b7bbe66545576d2e1d96bee9d4e Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Wed, 12 Oct 2022 14:55:42 -0700 Subject: Run build with default runner --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1dc58a404a..893bdfe3ca 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -10,11 +10,11 @@ jobs: build: strategy: matrix: - runner: [windows-2022-large] + runner: [windows-2022] configuration: [ReleaseOS] addrsize: [64] include: - - runner: windows-2022-large + - runner: windows-2022 configuration: ReleaseOS addrsize: 32 runs-on: ${{ matrix.runner }} -- cgit v1.3 From 937495863cd90f3f031a9c6d1d03fe02e70332e1 Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Wed, 12 Oct 2022 15:02:02 -0700 Subject: Build on 16-core machine --- .github/workflows/build.yaml | 2 +- autobuild.xml | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 893bdfe3ca..6fa57b6d7c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -10,7 +10,7 @@ jobs: build: strategy: matrix: - runner: [windows-2022] + runner: [windows-2022-public-002] configuration: [ReleaseOS] addrsize: [64] include: diff --git a/autobuild.xml b/autobuild.xml index 288def254b..962d82a3f8 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -3099,6 +3099,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors -configuration RelWithDebInfo + -parallelizeTargets + -jobs + ${AUTOBUILD_CPU_COUNT} -project SecondLife.xcodeproj @@ -3130,6 +3133,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors -configuration RelWithDebInfo + -parallelizeTargets + -jobs + ${AUTOBUILD_CPU_COUNT} -project SecondLife.xcodeproj @@ -3155,6 +3161,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors -configuration Release + -parallelizeTargets + -jobs + ${AUTOBUILD_CPU_COUNT} -project SecondLife.xcodeproj @@ -3184,6 +3193,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors -configuration Release + -parallelizeTargets + -jobs + ${AUTOBUILD_CPU_COUNT} -project SecondLife.xcodeproj -- cgit v1.3 From 75499351dc0480bd62bf9fab5366fa3c668443da Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Wed, 12 Oct 2022 15:05:11 -0700 Subject: Build on 8-core machine --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6fa57b6d7c..cef0d32519 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -10,11 +10,11 @@ jobs: build: strategy: matrix: - runner: [windows-2022-public-002] + runner: [windows-2022-public-003] configuration: [ReleaseOS] addrsize: [64] include: - - runner: windows-2022 + - runner: windows-2022-public-003 configuration: ReleaseOS addrsize: 32 runs-on: ${{ matrix.runner }} -- cgit v1.3 From 7c4a1668462a4c655f5c3875fcff863b96565c49 Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Wed, 12 Oct 2022 15:08:00 -0700 Subject: Add macOS build back --- .github/workflows/build.yaml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cef0d32519..57018823aa 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -10,11 +10,11 @@ jobs: build: strategy: matrix: - runner: [windows-2022-public-003] + runner: [windows-2022, macos-11] configuration: [ReleaseOS] addrsize: [64] include: - - runner: windows-2022-public-003 + - runner: windows-2022 configuration: ReleaseOS addrsize: 32 runs-on: ${{ matrix.runner }} @@ -52,15 +52,19 @@ jobs: - name: Build id: build shell: bash + env: + RUNNER_OS: ${{ runner.os }} run: | pip install llsd # Required by viewer tests autobuild configure autobuild build --no-configure - installer_path=$(find ./build-*/newview/ | grep '_Setup\.exe') - installer_name="$(basename $installer_path)" - echo "::set-output name=installer_path::$installer_path" - echo "::set-output name=installer_name::$installer_name" + if [[ "$RUNNER_OS" == "Windows" ]]; then + installer_path=$(find ./build-*/newview/ | grep '_Setup\.exe') + installer_name="$(basename $installer_path)" + echo "::set-output name=installer_path::$installer_path" + echo "::set-output name=installer_name::$installer_name" + fi - name: Upload installer if: runner.os == 'Windows' -- cgit v1.3 From d842eb988302bd4ea25433d6ce305360a0402b75 Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Wed, 12 Oct 2022 15:35:28 -0700 Subject: Build on 64-core machine --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 57018823aa..e6771e422b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -10,11 +10,11 @@ jobs: build: strategy: matrix: - runner: [windows-2022, macos-11] + runner: [windows-2022-public-005] configuration: [ReleaseOS] addrsize: [64] include: - - runner: windows-2022 + - runner: windows-2022-public-005 configuration: ReleaseOS addrsize: 32 runs-on: ${{ matrix.runner }} -- cgit v1.3 From 3afde25ba81734b48cc557a257d91c7b9cc830f2 Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Wed, 12 Oct 2022 16:04:04 -0700 Subject: Upload macos installer --- .github/workflows/build.yaml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e6771e422b..adaa7bbff7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -10,11 +10,11 @@ jobs: build: strategy: matrix: - runner: [windows-2022-public-005] + runner: [windows-2022, macos-11] configuration: [ReleaseOS] addrsize: [64] include: - - runner: windows-2022-public-005 + - runner: windows-2022 configuration: ReleaseOS addrsize: 32 runs-on: ${{ matrix.runner }} @@ -43,7 +43,7 @@ jobs: id: cache-installables with: path: .autobuild-installables - key: ${{ matrix.runner }}-${{ matrix.addrsize }}-${{ matrix.configuration }}-${{ hashFiles('autobuild.xml') }} + key: ${{ runner.os }}-${{ matrix.addrsize }}-${{ matrix.configuration }}-${{ hashFiles('autobuild.xml') }} - name: Install windows dependencies if: runner.os == 'Windows' @@ -62,12 +62,14 @@ jobs: if [[ "$RUNNER_OS" == "Windows" ]]; then installer_path=$(find ./build-*/newview/ | grep '_Setup\.exe') installer_name="$(basename $installer_path)" - echo "::set-output name=installer_path::$installer_path" - echo "::set-output name=installer_name::$installer_name" + elif [[ "$RUNNER_OS" == "macOS" ]]; then + installer_path=$(find ./build-*/newview/ | grep '\.dmg') + installer_name="$(basename $installer_path)" fi + echo "::set-output name=installer_path::$installer_path" + echo "::set-output name=installer_name::$installer_name" - name: Upload installer - if: runner.os == 'Windows' uses: actions/upload-artifact@v3 with: name: ${{ steps.build.outputs.installer_name }} -- cgit v1.3 From 8871e8d732f6210c3c1b8ba0ca63d5ad816be4bf Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 24 Mar 2023 12:02:57 -0400 Subject: SL-18837: Try building Release viewer config on GH. --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index adaa7bbff7..b18e4bd9ca 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -11,11 +11,11 @@ jobs: strategy: matrix: runner: [windows-2022, macos-11] - configuration: [ReleaseOS] + configuration: [Release] addrsize: [64] include: - runner: windows-2022 - configuration: ReleaseOS + configuration: Release addrsize: 32 runs-on: ${{ matrix.runner }} env: -- cgit v1.3 From 1bdea0b46f5ef02535ac7fbaeb18c626df8a58ff Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 15 May 2023 11:36:08 -0400 Subject: SL-18837: AUTOBUILD_GITHUB_TOKEN to authenticate private packages. --- .github/workflows/build.yaml | 2 ++ 1 file changed, 2 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b18e4bd9ca..b64f9b709f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -21,6 +21,8 @@ jobs: env: AUTOBUILD_CONFIGURATION: ${{ matrix.configuration }} AUTOBUILD_ADDRSIZE: ${{ matrix.addrsize }} + # authorizes fetching private constituent packages + AUTOBUILD_GITHUB_TOKEN: ${{ secrets.SHARED_AUTOBUILD_GITHUB_TOKEN }} AUTOBUILD_INSTALLABLE_CACHE: ${{ github.workspace }}/.autobuild-installables AUTOBUILD_VARIABLES_FILE: ${{ github.workspace }}/.build-variables/variables AUTOBUILD_VSVER: "170" -- cgit v1.3 From 7a7af9a3993dad65d2574d1408a4b64d2b1778d8 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 5 Jun 2023 14:35:10 -0400 Subject: SL-18837: pip install llsd as well as autobuild. The Python child processes used by llprocess_test.cpp and llleap_test.cpp need the Python llsd module to communicate with the C++ parent process. Also set LOGFAIL and BUGSPLAT_DB environment variables. --- .github/workflows/build.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b64f9b709f..f7062d83dc 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -26,6 +26,12 @@ jobs: AUTOBUILD_INSTALLABLE_CACHE: ${{ github.workspace }}/.autobuild-installables AUTOBUILD_VARIABLES_FILE: ${{ github.workspace }}/.build-variables/variables AUTOBUILD_VSVER: "170" + # Setting this variable directs Linden's TUT test driver code to capture + # test-program log output at the specified level, but to display it only if + # the individual test fails. + LOGFAIL: DEBUG + # Ensure that viewer builds engage Bugsplat. + BUGSPLAT_DB: "SecondLife_Viewer_2018" steps: - name: Checkout code uses: actions/checkout@v3 @@ -38,7 +44,7 @@ jobs: path: .build-variables - name: Install autobuild - run: pip3 install autobuild + run: pip3 install autobuild llsd - name: Cache autobuild packages uses: actions/cache@v3 -- cgit v1.3 From aa906a9b7f8dbb24c97ba09852284f093cc4e525 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 7 Jun 2023 12:17:15 -0400 Subject: SL-18837: Try setting PY_PYTHON and PYLAUNCHER_DEBUG which should only affect Windows unit tests, but should hopefully improve our chances that Windows unit tests will succeed. --- .github/workflows/build.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f7062d83dc..955493dd24 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -19,19 +19,24 @@ jobs: addrsize: 32 runs-on: ${{ matrix.runner }} env: - AUTOBUILD_CONFIGURATION: ${{ matrix.configuration }} AUTOBUILD_ADDRSIZE: ${{ matrix.addrsize }} + AUTOBUILD_CONFIGURATION: ${{ matrix.configuration }} # authorizes fetching private constituent packages AUTOBUILD_GITHUB_TOKEN: ${{ secrets.SHARED_AUTOBUILD_GITHUB_TOKEN }} AUTOBUILD_INSTALLABLE_CACHE: ${{ github.workspace }}/.autobuild-installables AUTOBUILD_VARIABLES_FILE: ${{ github.workspace }}/.build-variables/variables AUTOBUILD_VSVER: "170" + # Ensure that viewer builds engage Bugsplat. + BUGSPLAT_DB: "SecondLife_Viewer_2018" # Setting this variable directs Linden's TUT test driver code to capture # test-program log output at the specified level, but to display it only if # the individual test fails. LOGFAIL: DEBUG - # Ensure that viewer builds engage Bugsplat. - BUGSPLAT_DB: "SecondLife_Viewer_2018" + # Force py.exe to select python3 rather than plain python (2) + PY_PYTHON: 3 + # but if unit tests fail to import llsd (i.e. wrong Python interpreter), + # make py.exe enumerate the possibilities and explain its choice + PYLAUNCHER_DEBUG: 1 steps: - name: Checkout code uses: actions/checkout@v3 -- cgit v1.3 From da72e958fe0c2ee88d39139f93c4d73897f711ee Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 7 Jun 2023 12:30:46 -0400 Subject: SL-18837: Quote integers used for environment variables --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 955493dd24..7df15f0668 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -33,10 +33,10 @@ jobs: # the individual test fails. LOGFAIL: DEBUG # Force py.exe to select python3 rather than plain python (2) - PY_PYTHON: 3 + PY_PYTHON: "3" # but if unit tests fail to import llsd (i.e. wrong Python interpreter), # make py.exe enumerate the possibilities and explain its choice - PYLAUNCHER_DEBUG: 1 + PYLAUNCHER_DEBUG: "1" steps: - name: Checkout code uses: actions/checkout@v3 -- cgit v1.3 From 104ae678a60a09df1e500f3ded920b5d515ee99a Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 7 Jun 2023 14:54:56 -0400 Subject: SL-18837: Tell py.exe to use Python 3.9 instead of 3.11 --- .github/workflows/build.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7df15f0668..0d7943ec4a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,8 +32,9 @@ jobs: # test-program log output at the specified level, but to display it only if # the individual test fails. LOGFAIL: DEBUG - # Force py.exe to select python3 rather than plain python (2) - PY_PYTHON: "3" + # Force py.exe to select python3.9 rather than the newest install 3.11, + # since the 'pip3' command below seems to be associated with Python 3.9 + PY_PYTHON: "3.9" # but if unit tests fail to import llsd (i.e. wrong Python interpreter), # make py.exe enumerate the possibilities and explain its choice PYLAUNCHER_DEBUG: "1" -- cgit v1.3 From 8140dd050e8eddcb8c513200fdca3adfa566853a Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 7 Jun 2023 16:31:11 -0400 Subject: SL-18837: Try to install llsd in the Python used by py.exe --- .github/workflows/build.yaml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0d7943ec4a..4c668d5e99 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,10 +32,7 @@ jobs: # test-program log output at the specified level, but to display it only if # the individual test fails. LOGFAIL: DEBUG - # Force py.exe to select python3.9 rather than the newest install 3.11, - # since the 'pip3' command below seems to be associated with Python 3.9 - PY_PYTHON: "3.9" - # but if unit tests fail to import llsd (i.e. wrong Python interpreter), + # if unit tests fail to import llsd (i.e. wrong Python interpreter), # make py.exe enumerate the possibilities and explain its choice PYLAUNCHER_DEBUG: "1" steps: @@ -61,7 +58,13 @@ jobs: - name: Install windows dependencies if: runner.os == 'Windows' - run: choco install nsis-unicode + # Use 'py -m pip' because our autobuild.xml specifies py.exe as + # PYTHON_EXECUTABLE, and we've tried all kinds of tricks to make pip + # install the 'llsd' package into the Python interpreter selected by + # py.exe. + run: | + choco install nsis-unicode + py -m pip install autobuild llsd - name: Build id: build @@ -69,7 +72,6 @@ jobs: env: RUNNER_OS: ${{ runner.os }} run: | - pip install llsd # Required by viewer tests autobuild configure autobuild build --no-configure -- cgit v1.3 From f57de07f73871bc7be6c338ea18893a494d104eb Mon Sep 17 00:00:00 2001 From: Brad Linden Date: Wed, 7 Jun 2023 13:46:29 -0700 Subject: Attempt to port some build.yaml improvements from DRTVWR-559 over to actions branch --- .github/workflows/build.yaml | 47 ++++++++++++++++++++++++++++++++------------ indra/cmake/Variables.cmake | 18 ++++++++++------- 2 files changed, 45 insertions(+), 20 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4c668d5e99..7731a837e9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -5,18 +5,22 @@ on: pull_request: push: branches: ["actions"] + tags: ["*"] jobs: build: strategy: matrix: - runner: [windows-2022, macos-11] + runner: [windows-large, macos-12-xl] configuration: [Release] addrsize: [64] + python-version: ["3.11"] include: - - runner: windows-2022 + - runner: windows-large configuration: Release addrsize: 32 + - runner: macos-12-xl + developer_dir: "/Applications/Xcode_14.0.1.app/Contents/Developer" runs-on: ${{ matrix.runner }} env: AUTOBUILD_ADDRSIZE: ${{ matrix.addrsize }} @@ -26,6 +30,7 @@ jobs: AUTOBUILD_INSTALLABLE_CACHE: ${{ github.workspace }}/.autobuild-installables AUTOBUILD_VARIABLES_FILE: ${{ github.workspace }}/.build-variables/variables AUTOBUILD_VSVER: "170" + DEVELOPER_DIR: ${{ matrix.developer_dir }} # Ensure that viewer builds engage Bugsplat. BUGSPLAT_DB: "SecondLife_Viewer_2018" # Setting this variable directs Linden's TUT test driver code to capture @@ -35,9 +40,18 @@ jobs: # if unit tests fail to import llsd (i.e. wrong Python interpreter), # make py.exe enumerate the possibilities and explain its choice PYLAUNCHER_DEBUG: "1" + GIT_REF: ${{ github.head_ref || github.ref }} + LL_SKIP_REQUIRE_SYSROOT: 1 steps: - name: Checkout code uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} + + - name: Setup python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} - name: Checkout build variables uses: actions/checkout@v3 @@ -55,16 +69,13 @@ jobs: with: path: .autobuild-installables key: ${{ runner.os }}-${{ matrix.addrsize }}-${{ matrix.configuration }}-${{ hashFiles('autobuild.xml') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.addrsize }}-${{ matrix.configuration }}- + ${{ runner.os }}-${{ matrix.addrsize }}- - name: Install windows dependencies if: runner.os == 'Windows' - # Use 'py -m pip' because our autobuild.xml specifies py.exe as - # PYTHON_EXECUTABLE, and we've tried all kinds of tricks to make pip - # install the 'llsd' package into the Python interpreter selected by - # py.exe. - run: | - choco install nsis-unicode - py -m pip install autobuild llsd + run: choco install nsis-unicode - name: Build id: build @@ -72,9 +83,18 @@ jobs: env: RUNNER_OS: ${{ runner.os }} run: | - autobuild configure - autobuild build --no-configure + # On windows we need to point the build to the correct python + # as neither CMake's FindPython nor our custom Python.cmake module + # will resolve the correct interpreter location. + if [[ "$RUNNER_OS" == "Windows" ]]; then + export PYTHON="$(cygpath -m "$(which python)")" + echo "Python location: $PYTHON" + fi + autobuild configure -- -DVIEWER_CHANNEL="Second Life Test ${GIT_REF##*/}" + autobuild build --no-configure + + # Find artifacts if [[ "$RUNNER_OS" == "Windows" ]]; then installer_path=$(find ./build-*/newview/ | grep '_Setup\.exe') installer_name="$(basename $installer_path)" @@ -82,8 +102,9 @@ jobs: installer_path=$(find ./build-*/newview/ | grep '\.dmg') installer_name="$(basename $installer_path)" fi - echo "::set-output name=installer_path::$installer_path" - echo "::set-output name=installer_name::$installer_name" + + echo "installer_path=$installer_path" >> $GITHUB_OUTPUT + echo "installer_name=$installer_name" >> $GITHUB_OUTPUT - name: Upload installer uses: actions/upload-artifact@v3 diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index e6285ab48b..778384f87c 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -173,13 +173,17 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(CMAKE_XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL "${CMAKE_MATCH_1}") message(STATUS "CMAKE_XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL = '${CMAKE_XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL}'") - string(REGEX MATCHALL "[^ ]+" LL_BUILD_LIST "$ENV{LL_BUILD}") - list(FIND LL_BUILD_LIST "-iwithsysroot" sysroot_idx) - if ("${sysroot_idx}" LESS 0) - message(FATAL_ERROR "Environment variable LL_BUILD must contain '-iwithsysroot'") - endif () - math(EXPR sysroot_idx "${sysroot_idx} + 1") - list(GET LL_BUILD_LIST "${sysroot_idx}" CMAKE_OSX_SYSROOT) + # allow disabling this check by setting LL_SKIP_REQUIRE_SYSROOT either ON as cmake cache var or non-empty as environment var + set(LL_SKIP_REQUIRE_SYSROOT OFF CACHE BOOL "Skip requirement to set toolchain sysroot ahead of time. Not skipped by default for consistency, but skipping can be useful for selecting alternative xcode versions side by side") + if("$ENV{LL_SKIP_REQUIRE_SYSROOT}" STREQUAL "" AND NOT ${LL_SKIP_REQUIRE_SYSROOT}) + string(REGEX MATCHALL "[^ ]+" LL_BUILD_LIST "$ENV{LL_BUILD}") + list(FIND LL_BUILD_LIST "-iwithsysroot" sysroot_idx) + if ("${sysroot_idx}" LESS 0) + message(FATAL_ERROR "Environment variable LL_BUILD must contain '-iwithsysroot'") + endif () + math(EXPR sysroot_idx "${sysroot_idx} + 1") + list(GET LL_BUILD_LIST "${sysroot_idx}" CMAKE_OSX_SYSROOT) + endif() message(STATUS "CMAKE_OSX_SYSROOT = '${CMAKE_OSX_SYSROOT}'") set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0") -- cgit v1.3 From 68a57566b7520608ae242032788c3f472b54ad10 Mon Sep 17 00:00:00 2001 From: Brad Linden Date: Wed, 7 Jun 2023 16:28:11 -0700 Subject: SL-18837 fix win32 build warning about missing python-version setting --- .github/workflows/build.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7731a837e9..d0f1b59ae6 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -19,6 +19,7 @@ jobs: - runner: windows-large configuration: Release addrsize: 32 + python-version: "3.11" - runner: macos-12-xl developer_dir: "/Applications/Xcode_14.0.1.app/Contents/Developer" runs-on: ${{ matrix.runner }} @@ -59,7 +60,7 @@ jobs: repository: secondlife/build-variables ref: viewer path: .build-variables - + - name: Install autobuild run: pip3 install autobuild llsd -- cgit v1.3 From bbd077bda8118c534d58cbcdc697875147cf09b7 Mon Sep 17 00:00:00 2001 From: Brad Linden Date: Fri, 9 Jun 2023 17:58:00 -0700 Subject: SL-18837 set build id based on github workflow run id --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d0f1b59ae6..71b2a62618 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -92,7 +92,7 @@ jobs: echo "Python location: $PYTHON" fi - autobuild configure -- -DVIEWER_CHANNEL="Second Life Test ${GIT_REF##*/}" + autobuild configure --id "${{ github.run_id }}" -- -DVIEWER_CHANNEL="Second Life Test ${GIT_REF##*/}" autobuild build --no-configure # Find artifacts -- cgit v1.3 From ee453bc2d9df82dabf425ad61363dacf91338a48 Mon Sep 17 00:00:00 2001 From: Brad Linden Date: Thu, 22 Jun 2023 18:27:30 -0700 Subject: SL-18837 fixes for test failures. VERSION_BUILD is now too big to fit in 32 bits, and cpuid doesn't do what we expect under rosetta --- .github/workflows/build.yaml | 3 ++- indra/llcommon/llprocessor.cpp | 2 +- indra/newview/llappviewer.cpp | 4 ++-- indra/newview/llversioninfo.cpp | 2 +- indra/newview/llversioninfo.h | 2 +- indra/newview/llweb.cpp | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 71b2a62618..00dd7ed116 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -31,6 +31,7 @@ jobs: AUTOBUILD_INSTALLABLE_CACHE: ${{ github.workspace }}/.autobuild-installables AUTOBUILD_VARIABLES_FILE: ${{ github.workspace }}/.build-variables/variables AUTOBUILD_VSVER: "170" + AUTOBUILD_BUILD_ID: ${{ github.run_id }} DEVELOPER_DIR: ${{ matrix.developer_dir }} # Ensure that viewer builds engage Bugsplat. BUGSPLAT_DB: "SecondLife_Viewer_2018" @@ -93,7 +94,7 @@ jobs: fi autobuild configure --id "${{ github.run_id }}" -- -DVIEWER_CHANNEL="Second Life Test ${GIT_REF##*/}" - autobuild build --no-configure + autobuild build --no-configure # Find artifacts if [[ "$RUNNER_OS" == "Windows" ]]; then diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp index 4a1a81f083..28f8bc2b93 100644 --- a/indra/llcommon/llprocessor.cpp +++ b/indra/llcommon/llprocessor.cpp @@ -746,7 +746,7 @@ private: __cpuid(0x1, eax, ebx, ecx, edx); if(feature_infos[0] != (S32)edx) { - LL_ERRS() << "machdep.cpu.feature_bits doesn't match expected cpuid result!" << LL_ENDL; + LL_WARNS() << "machdep.cpu.feature_bits doesn't match expected cpuid result!" << LL_ENDL; } #endif // LL_RELEASE_FOR_DOWNLOAD diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 8235e4466c..47cde3755b 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3552,7 +3552,7 @@ void LLAppViewer::writeSystemInfo() gDebugInfo["ClientInfo"]["MajorVersion"] = LLVersionInfo::instance().getMajor(); gDebugInfo["ClientInfo"]["MinorVersion"] = LLVersionInfo::instance().getMinor(); gDebugInfo["ClientInfo"]["PatchVersion"] = LLVersionInfo::instance().getPatch(); - gDebugInfo["ClientInfo"]["BuildVersion"] = LLVersionInfo::instance().getBuild(); + gDebugInfo["ClientInfo"]["BuildVersion"] = STRINGIZE(LLVersionInfo::instance().getBuild()); gDebugInfo["ClientInfo"]["AddressSize"] = LLVersionInfo::instance().getAddressSize(); gDebugInfo["CAFilename"] = gDirUtilp->getCAFile(); @@ -5669,7 +5669,7 @@ void LLAppViewer::handleLoginComplete() gDebugInfo["ClientInfo"]["MajorVersion"] = LLVersionInfo::instance().getMajor(); gDebugInfo["ClientInfo"]["MinorVersion"] = LLVersionInfo::instance().getMinor(); gDebugInfo["ClientInfo"]["PatchVersion"] = LLVersionInfo::instance().getPatch(); - gDebugInfo["ClientInfo"]["BuildVersion"] = LLVersionInfo::instance().getBuild(); + gDebugInfo["ClientInfo"]["BuildVersion"] = STRINGIZE(LLVersionInfo::instance().getBuild()); LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if ( parcel && parcel->getMusicURL()[0]) diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp index 376a7fce76..62bfa24e29 100644 --- a/indra/newview/llversioninfo.cpp +++ b/indra/newview/llversioninfo.cpp @@ -91,7 +91,7 @@ S32 LLVersionInfo::getPatch() return LL_VIEWER_VERSION_PATCH; } -S32 LLVersionInfo::getBuild() +S64 LLVersionInfo::getBuild() { return LL_VIEWER_VERSION_BUILD; } diff --git a/indra/newview/llversioninfo.h b/indra/newview/llversioninfo.h index 02ff0c094a..122bd5c47a 100644 --- a/indra/newview/llversioninfo.h +++ b/indra/newview/llversioninfo.h @@ -61,7 +61,7 @@ public: S32 getPatch(); /// return the build number as an integer - S32 getBuild(); + S64 getBuild(); /// return the full viewer version as a string like "2.0.0.200030" std::string getVersion(); diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index c4d873dd22..df8e9770f3 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -160,7 +160,7 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url, substitution["VERSION_MAJOR"] = LLVersionInfo::instance().getMajor(); substitution["VERSION_MINOR"] = LLVersionInfo::instance().getMinor(); substitution["VERSION_PATCH"] = LLVersionInfo::instance().getPatch(); - substitution["VERSION_BUILD"] = LLVersionInfo::instance().getBuild(); + substitution["VERSION_BUILD"] = STRINGIZE(LLVersionInfo::instance().getBuild()); substitution["CHANNEL"] = LLVersionInfo::instance().getChannel(); substitution["GRID"] = LLGridManager::getInstance()->getGridId(); substitution["GRID_LOWERCASE"] = utf8str_tolower(LLGridManager::getInstance()->getGridId()); -- cgit v1.3 From 8a6247e34b1f77a248fc37b62852d4924df97d28 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 27 Jun 2023 17:28:58 -0400 Subject: SL-18837: Try doing necessary setup to run viewer's own build.sh. --- .github/workflows/build.yaml | 118 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 105 insertions(+), 13 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d0f1b59ae6..fbb073968d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -19,12 +19,12 @@ jobs: - runner: windows-large configuration: Release addrsize: 32 - python-version: "3.11" - runner: macos-12-xl developer_dir: "/Applications/Xcode_14.0.1.app/Contents/Developer" runs-on: ${{ matrix.runner }} env: AUTOBUILD_ADDRSIZE: ${{ matrix.addrsize }} + AUTOBUILD_BUILD_ID: ${{ github.run_id }} AUTOBUILD_CONFIGURATION: ${{ matrix.configuration }} # authorizes fetching private constituent packages AUTOBUILD_GITHUB_TOKEN: ${{ secrets.SHARED_AUTOBUILD_GITHUB_TOKEN }} @@ -32,17 +32,23 @@ jobs: AUTOBUILD_VARIABLES_FILE: ${{ github.workspace }}/.build-variables/variables AUTOBUILD_VSVER: "170" DEVELOPER_DIR: ${{ matrix.developer_dir }} - # Ensure that viewer builds engage Bugsplat. - BUGSPLAT_DB: "SecondLife_Viewer_2018" + build_coverity: false + build_log_dir: ${{ github.workspace }}/.logs + build_secrets_checkout: ${{ github.workspace }}/.build-secrets + build_viewer: true + BUILDSCRIPTS_SHARED: ${{ github.workspace }}/.shared + BUILDSCRIPTS_SUPPORT_FUNCTIONS: ${{ github.workspace }}/.buildscripts/hg/bin/buildscripts_support_functions + git_hooks_checkout: ${{ github.workspace }}/.git-hooks + GIT_REF: ${{ github.head_ref || github.ref }} + LL_SKIP_REQUIRE_SYSROOT: 1 # Setting this variable directs Linden's TUT test driver code to capture # test-program log output at the specified level, but to display it only if # the individual test fails. LOGFAIL: DEBUG - # if unit tests fail to import llsd (i.e. wrong Python interpreter), - # make py.exe enumerate the possibilities and explain its choice - PYLAUNCHER_DEBUG: "1" - GIT_REF: ${{ github.head_ref || github.ref }} - LL_SKIP_REQUIRE_SYSROOT: 1 + master_message_template_checkout: ${{ github.workspace }}/.master-message-template + # Only set variants to the one configuration: don't let build.sh loop + # over variants, let GitHub distribute variants over multiple hosts. + variants: ${{ matrix.configuration }} steps: - name: Checkout code uses: actions/checkout@v3 @@ -54,6 +60,12 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Checkout build secrets + uses: actions/checkout@v3 + with: + repository: secondlife/build-secrets + path: .build-secrets + - name: Checkout build variables uses: actions/checkout@v3 with: @@ -61,7 +73,25 @@ jobs: ref: viewer path: .build-variables - - name: Install autobuild + - name: Checkout buildscripts + uses: actions/checkout@v3 + with: + repository: secondlife/sling-buildscripts + path: .buildscripts + + - name: Checkout git-hooks + uses: actions/checkout@v3 + with: + repository: secondlife/git-hooks + path: .git-hooks + + - name: Checkout master-message-template + uses: actions/checkout@v3 + with: + repository: secondlife/master-message-template + path: .master-message-template + + - name: Install autobuild run: pip3 install autobuild llsd - name: Cache autobuild packages @@ -84,16 +114,78 @@ jobs: env: RUNNER_OS: ${{ runner.os }} run: | + # set up things the viewer's build.sh script expects + mkdir -p "$build_log_dir" + mkdir -p "$BUILDSCRIPTS_SHARED/packages/lib/python" + source "$BUILDSCRIPTS_SUPPORT_FUNCTIONS" + if [[ "$OSTYPE" == "cygwin" ]] + then + native_path() { cygpath --windows "$1"; } + shell_path() { cygpath --unix "$1"; } + else + native_path() { echo "$1"; } + shell_path() { echo "$1"; } + fi + initialize_build() + { + echo "initialize_build" + } + initialize_version() + { + export revision="$AUTOBUILD_BUILD_ID" + } + python_cmd() + { + if [[ "x${1:0:1}" == "x-" ]] # -m, -c, etc. + then # if $1 is a switch, don't try to twiddle paths + "$(shell_path "$PYTHON_COMMAND")" "$@" + elif [[ "$(basename "$1")" == "codeticket.py" ]] + then # ignore any attempt to contact codeticket + echo "## $@" + else # running a script at an explicit path: fix path for Python + local script="$1" + shift + "$(shell_path "$PYTHON_COMMAND")" "$(native_path "$script")" "$@" + fi + } + repo_branch() + { + git -C "$1" branch | grep '^* ' | cut -c 3- + } + record_dependencies_graph() + { + echo "TODO: generate and post dependency graph" + } + # Since we're not uploading to codeticket, DO NOT sleep for minutes. + sleep() + { + echo "Not sleeping for $1 seconds" + } + export -f native_path shell_path initialize_build initialize_version + export -f python_cmd repo_branch record_dependencies_graph sleep + export arch=$(uname | cut -b-6) + export AUTOBUILD="$(which autobuild)" + # Build with a tag like "Second Life Project Shiny:abcdef0" to get a + # viewer channel "Second Life Project Shiny" (ignoring ":hash", + # needed to disambiguate tags). + if [[ "${GIT_REF:0:12}" == "Second Life " ]] + then export viewer_channel="${GIT_REF%:*}" + else export viewer_channel="Second Life Test" + fi + # On windows we need to point the build to the correct python # as neither CMake's FindPython nor our custom Python.cmake module # will resolve the correct interpreter location. if [[ "$RUNNER_OS" == "Windows" ]]; then - export PYTHON="$(cygpath -m "$(which python)")" + export PYTHON="$(native_path "$(which python)")" echo "Python location: $PYTHON" + export PYTHON_COMMAND="$PYTHON" + else + export PYTHON_COMMAND="python3" fi + export PYTHON_COMMAND_NATIVE="$(native_path "$PYTHON_COMMAND")" - autobuild configure -- -DVIEWER_CHANNEL="Second Life Test ${GIT_REF##*/}" - autobuild build --no-configure + ./build.sh # Find artifacts if [[ "$RUNNER_OS" == "Windows" ]]; then @@ -106,7 +198,7 @@ jobs: echo "installer_path=$installer_path" >> $GITHUB_OUTPUT echo "installer_name=$installer_name" >> $GITHUB_OUTPUT - + - name: Upload installer uses: actions/upload-artifact@v3 with: -- cgit v1.3 From ce3508613bc1db3ad05758f452ffecf293fba643 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 28 Jun 2023 09:36:25 -0400 Subject: SL-18837: Include actions-build-sh branch in build trigger pushes. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index fbb073968d..f7a3eb5e7d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,7 +4,7 @@ on: workflow_dispatch: pull_request: push: - branches: ["actions"] + branches: ["actions", "actions-build-sh"] tags: ["*"] jobs: -- cgit v1.3 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. --- .github/workflows/build.yaml | 14 ++++++-------- build.sh | 18 +++++++++++++----- 2 files changed, 19 insertions(+), 13 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f7a3eb5e7d..dda5867a9f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,7 +4,7 @@ on: workflow_dispatch: pull_request: push: - branches: ["actions", "actions-build-sh"] + branches: ["actions*"] tags: ["*"] jobs: @@ -19,6 +19,7 @@ jobs: - runner: windows-large configuration: Release addrsize: 32 + python-version: "3.11" - runner: macos-12-xl developer_dir: "/Applications/Xcode_14.0.1.app/Contents/Developer" runs-on: ${{ matrix.runner }} @@ -32,9 +33,12 @@ jobs: AUTOBUILD_VARIABLES_FILE: ${{ github.workspace }}/.build-variables/variables AUTOBUILD_VSVER: "170" DEVELOPER_DIR: ${{ matrix.developer_dir }} + # Ensure that viewer builds engage Bugsplat. + BUGSPLAT_DB: "SecondLife_Viewer_2018" + BUGSPLAT_PASS: ${{ secrets.BUGSPLAT_PASS }} + BUGSPLAT_USER: ${{ secrets.BUGSPLAT_USER }} build_coverity: false build_log_dir: ${{ github.workspace }}/.logs - build_secrets_checkout: ${{ github.workspace }}/.build-secrets build_viewer: true BUILDSCRIPTS_SHARED: ${{ github.workspace }}/.shared BUILDSCRIPTS_SUPPORT_FUNCTIONS: ${{ github.workspace }}/.buildscripts/hg/bin/buildscripts_support_functions @@ -60,12 +64,6 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Checkout build secrets - uses: actions/checkout@v3 - with: - repository: secondlife/build-secrets - path: .build-secrets - - name: Checkout build variables uses: actions/checkout@v3 with: 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.3 From d2294841b2df66f4e684b5eed1cae955cea21cf8 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 28 Jun 2023 16:58:32 -0400 Subject: SL-18837: Get buildscripts_support_functions from sling-buildscripts and use these variants for GitHub builds. --- .github/workflows/build.yaml | 9 ++----- buildscripts_support_functions | 60 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 7 deletions(-) create mode 100644 buildscripts_support_functions (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index dda5867a9f..e7608657e3 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -41,7 +41,8 @@ jobs: build_log_dir: ${{ github.workspace }}/.logs build_viewer: true BUILDSCRIPTS_SHARED: ${{ github.workspace }}/.shared - BUILDSCRIPTS_SUPPORT_FUNCTIONS: ${{ github.workspace }}/.buildscripts/hg/bin/buildscripts_support_functions + # extracted and committed to viewer repo + BUILDSCRIPTS_SUPPORT_FUNCTIONS: ${{ github.workspace }}/buildscripts_support_functions git_hooks_checkout: ${{ github.workspace }}/.git-hooks GIT_REF: ${{ github.head_ref || github.ref }} LL_SKIP_REQUIRE_SYSROOT: 1 @@ -71,12 +72,6 @@ jobs: ref: viewer path: .build-variables - - name: Checkout buildscripts - uses: actions/checkout@v3 - with: - repository: secondlife/sling-buildscripts - path: .buildscripts - - name: Checkout git-hooks uses: actions/checkout@v3 with: diff --git a/buildscripts_support_functions b/buildscripts_support_functions new file mode 100644 index 0000000000..557d2f80fb --- /dev/null +++ b/buildscripts_support_functions @@ -0,0 +1,60 @@ +# standalone functions from sling-buildscripts + +set_build_number_to_revision() +{ + record_event "buildNumber $revision" +} + +record_event() +{ + echo "=== $@" +} + +begin_section() +{ + record_event "START $*" + sections+=("$*") +} + +end_section() +{ + # accommodate dumb Mac bash 3, which doesn't understand array[-1] + local last=$(( ${#sections[@]} - 1 )) + record_event "END ${*:-${sections[$last]}}" + unset "sections[$last]" +} + +record_success() +{ + record_event "SUCCESS $*" +} + +record_failure() +{ + record_event "FAILURE $*" >&2 +} + +fatal() +{ + record_failure "$@" + finalize false + exit 1 +} + +# redefined fail for backward compatibility +alias fail=fatal + +pass() +{ + exit 0 +} + +export -f set_build_number_to_revision +export -f record_event +export -f begin_section +export -f end_section +export -f record_success +export -f record_failure +export -f fatal +export -f pass +export sections -- cgit v1.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. --- .github/workflows/build.yaml | 7 ------- build.sh | 10 +++++++--- 2 files changed, 7 insertions(+), 10 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e7608657e3..40759823ad 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -43,7 +43,6 @@ jobs: BUILDSCRIPTS_SHARED: ${{ github.workspace }}/.shared # extracted and committed to viewer repo BUILDSCRIPTS_SUPPORT_FUNCTIONS: ${{ github.workspace }}/buildscripts_support_functions - git_hooks_checkout: ${{ github.workspace }}/.git-hooks GIT_REF: ${{ github.head_ref || github.ref }} LL_SKIP_REQUIRE_SYSROOT: 1 # Setting this variable directs Linden's TUT test driver code to capture @@ -72,12 +71,6 @@ jobs: ref: viewer path: .build-variables - - name: Checkout git-hooks - uses: actions/checkout@v3 - with: - repository: secondlife/git-hooks - path: .git-hooks - - name: Checkout master-message-template uses: actions/checkout@v3 with: 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.3 From 2ab14316488185496ec5c72fafcccd2ffdc43dfd Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 29 Jun 2023 09:08:41 -0400 Subject: SL-18837: Temporarily suppress Windows builds; add finalize function Also pretend novel arch value MINGW6 is really CYGWIN so we'll recognize it. --- .github/workflows/build.yaml | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 40759823ad..f5ed5ce2ae 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -13,15 +13,17 @@ jobs: matrix: runner: [windows-large, macos-12-xl] configuration: [Release] - addrsize: [64] + addrsize: [32,64] python-version: ["3.11"] - include: - - runner: windows-large - configuration: Release - addrsize: 32 - python-version: "3.11" + developer_dir: ["", "/Applications/Xcode_14.0.1.app/Contents/Developer"] + exclude: - runner: macos-12-xl + addrsize: 32 + - runner: windows-large developer_dir: "/Applications/Xcode_14.0.1.app/Contents/Developer" + ## nat 2023-06-29: until we've resolved the !@#$%! Windows Python + ## permissions problem, don't even bother running Windows builds. + - runner: windows-large runs-on: ${{ matrix.runner }} env: AUTOBUILD_ADDRSIZE: ${{ matrix.addrsize }} @@ -112,6 +114,17 @@ jobs: native_path() { echo "$1"; } shell_path() { echo "$1"; } fi + finalize() + { + case "$1" in + true|0) + record_success "Build Succeeded" + ;; + *) + record_failure "Build Failed with $1" + ;; + esac + } initialize_build() { echo "initialize_build" @@ -147,9 +160,12 @@ jobs: { echo "Not sleeping for $1 seconds" } - export -f native_path shell_path initialize_build initialize_version + export -f native_path shell_path finalize initialize_build initialize_version export -f python_cmd repo_branch record_dependencies_graph sleep export arch=$(uname | cut -b-6) + # Surprise! GH Windows runner's MINGW6 is a $arch value we've never + # seen before, so numerous tests don't know about it. + [[ "$arch" == "MINGW6" ]] && arch=CYGWIN export AUTOBUILD="$(which autobuild)" # Build with a tag like "Second Life Project Shiny:abcdef0" to get a # viewer channel "Second Life Project Shiny" (ignoring ":hash", -- cgit v1.3 From d62e7039dafe4a49d548225203785eeda0eeb44a Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 29 Jun 2023 14:03:31 -0400 Subject: SL-18837: Install autobuild from source repo, not PyPI. Bug in autobuild 3.9.2? The TC viewer build can successfully build llphysicsextensions/autobuild-tpv.xml, but the previous GH actions build failed: "no configuration for Release found" despite -c Tpv. The difference seems to be that we used 'pip3 install autobuild' from PyPI, whereas the TC buildscripts setup clones secondlife/autobuild branch v3 and installs from that repo. --- .github/workflows/build.yaml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f5ed5ce2ae..18e07aae5e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,6 +28,7 @@ jobs: env: AUTOBUILD_ADDRSIZE: ${{ matrix.addrsize }} AUTOBUILD_BUILD_ID: ${{ github.run_id }} + autobuild_checkout: ${{ github.workspace}}/.autobuild AUTOBUILD_CONFIGURATION: ${{ matrix.configuration }} # authorizes fetching private constituent packages AUTOBUILD_GITHUB_TOKEN: ${{ secrets.SHARED_AUTOBUILD_GITHUB_TOKEN }} @@ -66,6 +67,19 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Checkout autobuild + uses: actions/checkout@v3 + # Bug in autobuild 3.9.2? The TC viewer build can successfully build + # llphysicsextensions/autobuild-tpv.xml, but the previous GH actions + # build failed: "no configuration for Release found" despite -c Tpv. + # The difference seems to be that we used 'pip3 install autobuild' + # from PyPI, whereas the TC buildscripts setup clones + # secondlife/autobuild branch v3 and installs from that repo. + with: + repository: secondlife/autobuild + ref: v3 + path: .autobuild + - name: Checkout build variables uses: actions/checkout@v3 with: @@ -80,7 +94,10 @@ jobs: path: .master-message-template - name: Install autobuild - run: pip3 install autobuild llsd + shell: bash + run: | + pip3 install "$autobuild_checkout" + pip3 install llsd - name: Cache autobuild packages uses: actions/cache@v3 -- cgit v1.3 From 153f5cdb9f060806472d76c7b57837cdbdf21b68 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 30 Jun 2023 10:44:17 -0400 Subject: SL-18837: Revert "Install autobuild from source repo, not PyPI." That doesn't seem to be the distinction between TC builds and GH builds. Instead, we'll try unsetting AUTOBUILD_CONFIGURATION. This reverts commit d62e7039dafe4a49d548225203785eeda0eeb44a. --- .github/workflows/build.yaml | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 18e07aae5e..f5ed5ce2ae 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,7 +28,6 @@ jobs: env: AUTOBUILD_ADDRSIZE: ${{ matrix.addrsize }} AUTOBUILD_BUILD_ID: ${{ github.run_id }} - autobuild_checkout: ${{ github.workspace}}/.autobuild AUTOBUILD_CONFIGURATION: ${{ matrix.configuration }} # authorizes fetching private constituent packages AUTOBUILD_GITHUB_TOKEN: ${{ secrets.SHARED_AUTOBUILD_GITHUB_TOKEN }} @@ -67,19 +66,6 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Checkout autobuild - uses: actions/checkout@v3 - # Bug in autobuild 3.9.2? The TC viewer build can successfully build - # llphysicsextensions/autobuild-tpv.xml, but the previous GH actions - # build failed: "no configuration for Release found" despite -c Tpv. - # The difference seems to be that we used 'pip3 install autobuild' - # from PyPI, whereas the TC buildscripts setup clones - # secondlife/autobuild branch v3 and installs from that repo. - with: - repository: secondlife/autobuild - ref: v3 - path: .autobuild - - name: Checkout build variables uses: actions/checkout@v3 with: @@ -94,10 +80,7 @@ jobs: path: .master-message-template - name: Install autobuild - shell: bash - run: | - pip3 install "$autobuild_checkout" - pip3 install llsd + run: pip3 install autobuild llsd - name: Cache autobuild packages uses: actions/cache@v3 -- cgit v1.3 From 5f1de35f39aa3a13f6dbb98b117bb6897c792910 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 30 Jun 2023 10:51:03 -0400 Subject: SL-18837: Unset AUTOBUILD_CONFIGURATION. We suspect that autobuild incorrectly prioritizes AUTOBUILD_CONFIGURATION over its command-line -c switch. The autobuild command to build the TPV package for llphysicsextensions specifies -c Tpv (the configuration in the specified config file), but with AUTOBUILD_CONFIGURATION=Release set, autobuild fails: "ERROR: no configuration for build configuration 'Release' found" --- .github/workflows/build.yaml | 1 - 1 file changed, 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f5ed5ce2ae..a3d5269d5a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,7 +28,6 @@ jobs: env: AUTOBUILD_ADDRSIZE: ${{ matrix.addrsize }} AUTOBUILD_BUILD_ID: ${{ github.run_id }} - AUTOBUILD_CONFIGURATION: ${{ matrix.configuration }} # authorizes fetching private constituent packages AUTOBUILD_GITHUB_TOKEN: ${{ secrets.SHARED_AUTOBUILD_GITHUB_TOKEN }} AUTOBUILD_INSTALLABLE_CACHE: ${{ github.workspace }}/.autobuild-installables -- cgit v1.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. --- .github/workflows/build.yaml | 38 ++++++++++++++++++++++++++++++++++++++ build.sh | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a3d5269d5a..cd82fe5a54 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -205,3 +205,41 @@ jobs: with: name: ${{ steps.build.outputs.installer_name }} path: ${{ steps.build.outputs.installer_path }} + + - name: Upload metadata + uses: actions/upload-artifact@v3 + with: + name: ${{ steps.build.outputs.autobuild_package_name }} + path: ${{ steps.build.outputs.autobuild_package_path }} + + - name: Upload version + uses: actions/upload-artifact@v3 + with: + name: viewer_version.txt + path: ${{ steps.build.outputs.viewer_version_name }} + + - name: Upload Doxygen Log + if: steps.build.outputs.doxygen_log_path + uses: actions/upload-artifact@v3 + with: + name: ${{ steps.build.outputs.doxygen_log_name }} + path: ${{ steps.build.outputs.doxygen_log_path }} + + - name: Upload Doxygen Tarball + if: steps.build.outputs.doxygen_tarball_path + uses: actions/upload-artifact@v3 + with: + name: ${{ steps.build.outputs.doxygen_tarball_name }} + path: ${{ steps.build.outputs.doxygen_tarball_path }} + + - name: Upload viewer package installers + uses: actions/upload-artifact@v3 + with: + name: ${{ steps.build.outputs.installer_name }} + path: ${{ steps.build.outputs.packages }} + + - name: Upload symbol file + uses: actions/upload-artifact@v3 + with: + name: ${{ steps.build.outputs.symbolfile_name }} + path: ${{ steps.build.outputs.symbolfile_path }} 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.3 From 07b47160f1d93c1ed0ee5e61c0c8330f66e20857 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 6 Jul 2023 17:38:58 -0400 Subject: SL-18837: Ding Dong, 32-bit is dead! --- .github/workflows/build.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cd82fe5a54..e55a799825 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -13,12 +13,10 @@ jobs: matrix: runner: [windows-large, macos-12-xl] configuration: [Release] - addrsize: [32,64] + addrsize: [64] python-version: ["3.11"] developer_dir: ["", "/Applications/Xcode_14.0.1.app/Contents/Developer"] exclude: - - runner: macos-12-xl - addrsize: 32 - runner: windows-large developer_dir: "/Applications/Xcode_14.0.1.app/Contents/Developer" ## nat 2023-06-29: until we've resolved the !@#$%! Windows Python -- cgit v1.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. --- .github/workflows/build.yaml | 80 +++++++++++++++++++------------------------- build.sh | 55 ++++++++++++++++-------------- 2 files changed, 65 insertions(+), 70 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e55a799825..574a83246c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -186,58 +186,48 @@ jobs: ./build.sh - # Find artifacts - if [[ "$RUNNER_OS" == "Windows" ]]; then - installer_path=$(find ./build-*/newview/ | grep '_Setup\.exe') - installer_name="$(basename $installer_path)" - elif [[ "$RUNNER_OS" == "macOS" ]]; then - installer_path=$(find ./build-*/newview/ | grep '\.dmg') - installer_name="$(basename $installer_path)" - fi - - echo "installer_path=$installer_path" >> $GITHUB_OUTPUT - echo "installer_name=$installer_name" >> $GITHUB_OUTPUT + # Each artifact is downloaded as a distinct .zip file. Multiple jobs + # (per the matrix above) writing the same filepath to the same + # artifact name will *overwrite* that file. Moreover, they can + # interfere with each other, causing the upload to fail. + # https://github.com/actions/upload-artifact#uploading-to-the-same-artifact + # 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 + # platform, we must disambiguate on more than the platform name. + # 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 - name: Upload installer uses: actions/upload-artifact@v3 with: - name: ${{ steps.build.outputs.installer_name }} - path: ${{ steps.build.outputs.installer_path }} - - - name: Upload metadata - uses: actions/upload-artifact@v3 - with: - name: ${{ steps.build.outputs.autobuild_package_name }} - path: ${{ steps.build.outputs.autobuild_package_path }} - - - name: Upload version - uses: actions/upload-artifact@v3 - with: - name: viewer_version.txt - path: ${{ steps.build.outputs.viewer_version_name }} + name: "${{ steps.build.outputs.artifact }} installer" + # emitted by build.sh, possibly multiple lines + path: | + ${{ steps.build.outputs.installer }} - - name: Upload Doxygen Log - if: steps.build.outputs.doxygen_log_path - uses: actions/upload-artifact@v3 - with: - name: ${{ steps.build.outputs.doxygen_log_name }} - path: ${{ steps.build.outputs.doxygen_log_path }} - - - name: Upload Doxygen Tarball - if: steps.build.outputs.doxygen_tarball_path - uses: actions/upload-artifact@v3 - with: - name: ${{ steps.build.outputs.doxygen_tarball_name }} - path: ${{ steps.build.outputs.doxygen_tarball_path }} - - - name: Upload viewer package installers + # The other upload of nontrivial size is the symbol file. Use a distinct + # artifact for that too. + - name: Upload symbol file uses: actions/upload-artifact@v3 with: - name: ${{ steps.build.outputs.installer_name }} - path: ${{ steps.build.outputs.packages }} + name: "${{ steps.build.outputs.artifact }} symbols" + path: | + ${{ steps.build.outputs.symbolfile }} - - name: Upload symbol file + - name: Upload metadata uses: actions/upload-artifact@v3 with: - name: ${{ steps.build.outputs.symbolfile_name }} - path: ${{ steps.build.outputs.symbolfile_path }} + name: "${{ steps.build.outputs.artifact }} metadata" + # emitted by build.sh, possibly multiple lines + path: | + ${{ steps.build.outputs.metadata }} 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.3 From f54c1215676f26480d88b4588bb0eeb9c05f50d9 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 7 Jul 2023 10:06:02 -0400 Subject: SL-18837: Try putting generated Python scripts in RUNNER_TEMP dir. The claim is that the Windows Python interpreter is integrated somehow with the OS such that a command line that tries to run Python with a script that "looks suspicious" (i.e. in a system temp directory) fails with "Access denied" without even loading the interpreter. At least that theory would explain the "Access denied" errors we've been getting trying to run Python scripts generated into the system temp directory by our integration tests. Our hope is that generating such scripts into the GitHub RUNNER_TEMP directory will work better. As this test is specific to Windows, don't even bother running Mac builds. --- .github/workflows/build.yaml | 6 +++--- indra/test/namedtempfile.h | 17 ++++++++++++----- 2 files changed, 15 insertions(+), 8 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 574a83246c..dc8f9f15cd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -19,9 +19,9 @@ jobs: exclude: - runner: windows-large developer_dir: "/Applications/Xcode_14.0.1.app/Contents/Developer" - ## nat 2023-06-29: until we've resolved the !@#$%! Windows Python - ## permissions problem, don't even bother running Windows builds. - - runner: windows-large + ## nat 2023-07-07: trying to resolve the Windows Python permissions + ## problem; don't bother running Mac builds. + - runner: macos-12-xl runs-on: ${{ matrix.runner }} env: AUTOBUILD_ADDRSIZE: ${{ matrix.addrsize }} diff --git a/indra/test/namedtempfile.h b/indra/test/namedtempfile.h index c215c50f3f..4343361f41 100644 --- a/indra/test/namedtempfile.h +++ b/indra/test/namedtempfile.h @@ -84,12 +84,19 @@ protected: const std::string_view& sfx) { // Create file in a temporary place. + // This variable is set by GitHub actions and is the recommended place + // to put temp files belonging to an actions job. + const char* RUNNER_TEMP = getenv("RUNNER_TEMP"); + boost::filesystem::path tempdir{ + // if RUNNER_TEMP is set and not empty + (RUNNER_TEMP && *RUNNER_TEMP)? + boost::filesystem::path(RUNNER_TEMP) : // use RUNNER_TEMP if available + boost::filesystem::temp_directory_path()}; // else canonical temp dir boost::filesystem::path tempname{ - boost::filesystem::temp_directory_path() / - // unique_path() recommended template, but with underscores - // instead of hyphens: some use cases involve temporary Python - // scripts - stringize(pfx, "%%%%_%%%%_%%%%_%%%%", sfx) }; + // use filename template recommended by unique_path() doc, but + // with underscores instead of hyphens: some use cases involve + // temporary Python scripts + tempdir / stringize(pfx, "%%%%_%%%%_%%%%_%%%%", sfx) }; mPath = boost::filesystem::unique_path(tempname); boost::filesystem::ofstream out{ mPath }; -- cgit v1.3 From 1ec6c744048a2905b0f2bf83f035a8fb8798dbdf Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 8 Jul 2023 11:08:16 -0400 Subject: SL-18837: Set APR_LOG once for the whole job instead of a new value for each LLProcess::create() invocation. Since the internal apr_log() function only looks at APR_LOG once per process, the first test (which succeeded, hence no log file dump) left the log file open with that same original pathname. Resetting the APR_LOG environment variable for subsequent runs only made the new code in llprocess_test look for files that were never created. --- .github/workflows/build.yaml | 1 + indra/llcommon/tests/llprocess_test.cpp | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 16 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index dc8f9f15cd..f585fa1c39 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -24,6 +24,7 @@ jobs: - runner: macos-12-xl runs-on: ${{ matrix.runner }} env: + APR_LOG: "$RUNNER_TEMP/apr.log" AUTOBUILD_ADDRSIZE: ${{ matrix.addrsize }} AUTOBUILD_BUILD_ID: ${{ github.run_id }} # authorizes fetching private constituent packages diff --git a/indra/llcommon/tests/llprocess_test.cpp b/indra/llcommon/tests/llprocess_test.cpp index 6fcc6fd8aa..a01ec84547 100644 --- a/indra/llcommon/tests/llprocess_test.cpp +++ b/indra/llcommon/tests/llprocess_test.cpp @@ -151,10 +151,6 @@ struct PythonProcessLauncher /// Launch Python script; verify that it launched void launch() { - std::string logpath{ NamedTempFile::temp_path("apr", ".log").string() }; -#if LL_WINDOWS - _putenv_s("APR_LOG", logpath.c_str()); -#endif try { mPy = LLProcess::create(mParams); @@ -162,21 +158,25 @@ struct PythonProcessLauncher } catch (const tut::failure&) { - std::ifstream inf(logpath.c_str()); - if (! inf.is_open()) - { - LL_WARNS() << "Couldn't open '" << logpath << "'" << LL_ENDL; - } - else + const char* APR_LOG = getenv("APR_LOG"); + if (APR_LOG && *APR_LOG) { - LL_WARNS() << "==============================" << LL_ENDL; - LL_WARNS() << "From '" << logpath << "':" << LL_ENDL; - std::string line; - while (std::getline(inf, line)) + std::ifstream inf(APR_LOG); + if (! inf.is_open()) { - LL_WARNS() << line << LL_ENDL; + LL_WARNS() << "Couldn't open '" << APR_LOG << "'" << LL_ENDL; + } + else + { + LL_WARNS() << "==============================" << LL_ENDL; + LL_WARNS() << "From '" << APR_LOG << "':" << LL_ENDL; + std::string line; + while (std::getline(inf, line)) + { + LL_WARNS() << line << LL_ENDL; + } + LL_WARNS() << "==============================" << LL_ENDL; } - LL_WARNS() << "==============================" << LL_ENDL; } throw; } -- cgit v1.3 From 0d4e5b6bf8804806260c8295456410bca63c8874 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 8 Jul 2023 13:12:25 -0400 Subject: SL-18837: Use runner.temp rather than $RUNNER_TEMP. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f585fa1c39..729b0c54e5 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -24,7 +24,7 @@ jobs: - runner: macos-12-xl runs-on: ${{ matrix.runner }} env: - APR_LOG: "$RUNNER_TEMP/apr.log" + APR_LOG: "${{ runner.temp }}/apr.log" AUTOBUILD_ADDRSIZE: ${{ matrix.addrsize }} AUTOBUILD_BUILD_ID: ${{ github.run_id }} # authorizes fetching private constituent packages -- cgit v1.3 From eff1c0b55c075eca88690b3547f58eb57c789b85 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 8 Jul 2023 13:15:01 -0400 Subject: SL-18837: Set APR_LOG within build step, not at job level. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 729b0c54e5..c0bc5f30e1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -24,7 +24,6 @@ jobs: - runner: macos-12-xl runs-on: ${{ matrix.runner }} env: - APR_LOG: "${{ runner.temp }}/apr.log" AUTOBUILD_ADDRSIZE: ${{ matrix.addrsize }} AUTOBUILD_BUILD_ID: ${{ github.run_id }} # authorizes fetching private constituent packages @@ -160,6 +159,7 @@ jobs: } export -f native_path shell_path finalize initialize_build initialize_version export -f python_cmd repo_branch record_dependencies_graph sleep + export APR_LOG="${RUNNER_TEMP}/apr.log" export arch=$(uname | cut -b-6) # Surprise! GH Windows runner's MINGW6 is a $arch value we've never # seen before, so numerous tests don't know about it. -- cgit v1.3 From ca4288edaa226507e2a44182689a167bd4ea7948 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 8 Jul 2023 13:35:53 -0400 Subject: SL-18837: Try running just 'python' for Windows integration tests. --- .github/workflows/build.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c0bc5f30e1..47b1f421e5 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -177,7 +177,11 @@ jobs: # as neither CMake's FindPython nor our custom Python.cmake module # will resolve the correct interpreter location. if [[ "$RUNNER_OS" == "Windows" ]]; then - export PYTHON="$(native_path "$(which python)")" + ##export PYTHON="$(native_path "$(which python)")" + ## Weirdly, on GitHub's Windows runners, the integration test that + ## runs just 'python' succeeds while the integration tests that + ## run the full path to the .exe fail with "Access is denied." + export PYTHON=python echo "Python location: $PYTHON" export PYTHON_COMMAND="$PYTHON" else -- cgit v1.3 From 7dc6211ad5ea83685a35c6fff740278343aa8b9d Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 8 Jul 2023 14:08:16 -0400 Subject: SL-18837: Force llprocess_test and llleap_test to use just 'python'. On GitHub Windows runners, trying to make build.yaml set PYTHON=python in the environment doesn't work: integration tests still fail with "Access is denied" because they're still trying to execute the interpreter's full pathname. Instead, make llprocess_test and llleap_test detect the case of GitHub Windows and override the environment variable PYTHON with a baked-in string constant "python". --- .github/workflows/build.yaml | 6 +----- indra/llcommon/tests/llleap_test.cpp | 11 ++++++++++- indra/llcommon/tests/llprocess_test.cpp | 13 ++++++++++++- 3 files changed, 23 insertions(+), 7 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 47b1f421e5..c0bc5f30e1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -177,11 +177,7 @@ jobs: # as neither CMake's FindPython nor our custom Python.cmake module # will resolve the correct interpreter location. if [[ "$RUNNER_OS" == "Windows" ]]; then - ##export PYTHON="$(native_path "$(which python)")" - ## Weirdly, on GitHub's Windows runners, the integration test that - ## runs just 'python' succeeds while the integration tests that - ## run the full path to the .exe fail with "Access is denied." - export PYTHON=python + export PYTHON="$(native_path "$(which python)")" echo "Python location: $PYTHON" export PYTHON_COMMAND="$PYTHON" else diff --git a/indra/llcommon/tests/llleap_test.cpp b/indra/llcommon/tests/llleap_test.cpp index e9edd165df..01515ecebf 100644 --- a/indra/llcommon/tests/llleap_test.cpp +++ b/indra/llcommon/tests/llleap_test.cpp @@ -193,11 +193,20 @@ namespace tut reader.getName().substr(0, reader.getName().length()-3))), PYTHON(LLStringUtil::getenv("PYTHON")) { +#if LL_WINDOWS + // Weirdly, on GitHub Windows runners, plain 'python' works much + // better than a full pathname. + const char* RUNNER_TEMP = getenv("RUNNER_TEMP"); + if (RUNNER_TEMP && *RUNNER_TEMP) + { + PYTHON = "python"; + } +#endif ensure("Set PYTHON to interpreter pathname", !PYTHON.empty()); } NamedExtTempFile reader; const std::string reader_module; - const std::string PYTHON; + std::string PYTHON; }; typedef test_group llleap_group; typedef llleap_group::object object; diff --git a/indra/llcommon/tests/llprocess_test.cpp b/indra/llcommon/tests/llprocess_test.cpp index a01ec84547..3ba3a8aab3 100644 --- a/indra/llcommon/tests/llprocess_test.cpp +++ b/indra/llcommon/tests/llprocess_test.cpp @@ -141,6 +141,15 @@ struct PythonProcessLauncher mScript("py", script) { auto PYTHON(LLStringUtil::getenv("PYTHON")); +#if LL_WINDOWS + // Weirdly, on GitHub Windows runners, plain 'python' works much better + // than a full pathname. + const char* RUNNER_TEMP = getenv("RUNNER_TEMP"); + if (RUNNER_TEMP && *RUNNER_TEMP) + { + PYTHON = "python"; + } +#endif tut::ensure("Set $PYTHON to the Python interpreter", !PYTHON.empty()); mParams.desc = desc + " script"; @@ -1013,7 +1022,9 @@ namespace tut set_test_name("get*Pipe() validation"); PythonProcessLauncher py(get_test_name(), "from __future__ import print_function\n" - "print('this output is expected')\n"); + "import sys\n" + "print('this output is expected')\n" + "print('run by', sys.executable)\n"); py.mParams.files.add(LLProcess::FileParam("pipe")); // pipe for stdin py.mParams.files.add(LLProcess::FileParam()); // inherit stdout py.mParams.files.add(LLProcess::FileParam("pipe")); // pipe for stderr -- cgit v1.3 From d8292a629149c2cfdda6ae9df4e87aa117153c21 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 10 Jul 2023 14:46:14 -0400 Subject: SL-18837: Disable APR_LOG for now, but leave notes for the future. --- .github/workflows/build.yaml | 3 ++- indra/llcommon/tests/llprocess_test.cpp | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c0bc5f30e1..dc5fef4177 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -159,7 +159,8 @@ jobs: } export -f native_path shell_path finalize initialize_build initialize_version export -f python_cmd repo_branch record_dependencies_graph sleep - export APR_LOG="${RUNNER_TEMP}/apr.log" + ## Useful for diagnosing Windows LLProcess/LLLeap test failures + ##export APR_LOG="${RUNNER_TEMP}/apr.log" export arch=$(uname | cut -b-6) # Surprise! GH Windows runner's MINGW6 is a $arch value we've never # seen before, so numerous tests don't know about it. diff --git a/indra/llcommon/tests/llprocess_test.cpp b/indra/llcommon/tests/llprocess_test.cpp index a01ec84547..9ca664c80c 100644 --- a/indra/llcommon/tests/llprocess_test.cpp +++ b/indra/llcommon/tests/llprocess_test.cpp @@ -158,6 +158,9 @@ struct PythonProcessLauncher } catch (const tut::failure&) { + // On Windows, if APR_LOG is set, our version of APR's + // apr_create_proc() logs to the specified file. If this test + // failed, try to report that log. const char* APR_LOG = getenv("APR_LOG"); if (APR_LOG && *APR_LOG) { -- cgit v1.3 From 0998d46f47927badbd3f7d3a4b7a83a11896a5c9 Mon Sep 17 00:00:00 2001 From: Brad Linden Date: Fri, 14 Jul 2023 18:04:14 -0700 Subject: Fix "intermittent" llrand unit test failure on windows on DRTVWR-578. we must return less than 1.0 when rand() returns RAND_MAX also, disable 32 bit build now that we have deprecated it. https://community.secondlife.com/blogs/entry/13464-end-of-support-for-second-life-32-bit-windows-viewer-and-updated-minimum-system-requirements-for-macos-to-1013/ --- .github/workflows/build.yaml | 8 ++------ indra/llcommon/llrand.cpp | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 00dd7ed116..3e0330d77b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -13,18 +13,14 @@ jobs: matrix: runner: [windows-large, macos-12-xl] configuration: [Release] - addrsize: [64] python-version: ["3.11"] include: - - runner: windows-large - configuration: Release - addrsize: 32 - python-version: "3.11" - runner: macos-12-xl developer_dir: "/Applications/Xcode_14.0.1.app/Contents/Developer" + python-version: "3.11" runs-on: ${{ matrix.runner }} env: - AUTOBUILD_ADDRSIZE: ${{ matrix.addrsize }} + AUTOBUILD_ADDRSIZE: 64 AUTOBUILD_CONFIGURATION: ${{ matrix.configuration }} # authorizes fetching private constituent packages AUTOBUILD_GITHUB_TOKEN: ${{ secrets.SHARED_AUTOBUILD_GITHUB_TOKEN }} diff --git a/indra/llcommon/llrand.cpp b/indra/llcommon/llrand.cpp index cb28a8f5c3..1b6963a9dd 100644 --- a/indra/llcommon/llrand.cpp +++ b/indra/llcommon/llrand.cpp @@ -82,7 +82,7 @@ static LLSeedRand sRandomSeeder; inline F64 ll_internal_random_double() { #if LL_WINDOWS - return (F64)rand() / (F64)RAND_MAX; + return (F64)rand() / (F64)(RAND_MAX+1); #else return drand48(); #endif @@ -90,7 +90,7 @@ inline F64 ll_internal_random_double() inline F32 ll_internal_random_float() { #if LL_WINDOWS - return (F32)rand() / (F32)RAND_MAX; + return (F32)rand() / (F32)(RAND_MAX+1); #else return (F32)drand48(); #endif -- cgit v1.3 From 54f9ca5404c05a4031c1c12caf24b88048704cbd Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 17 Jul 2023 15:41:26 -0400 Subject: SL-18837: Merge branch 'actions' into actions-build-sh --- .github/workflows/build.yaml | 12 ++++-------- indra/llcommon/llprocessor.cpp | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index dc5fef4177..1cc29d95ea 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -13,19 +13,15 @@ jobs: matrix: runner: [windows-large, macos-12-xl] configuration: [Release] - addrsize: [64] python-version: ["3.11"] - developer_dir: ["", "/Applications/Xcode_14.0.1.app/Contents/Developer"] - exclude: - - runner: windows-large - developer_dir: "/Applications/Xcode_14.0.1.app/Contents/Developer" - ## nat 2023-07-07: trying to resolve the Windows Python permissions - ## problem; don't bother running Mac builds. + include: - runner: macos-12-xl + developer_dir: "/Applications/Xcode_14.0.1.app/Contents/Developer" runs-on: ${{ matrix.runner }} env: - AUTOBUILD_ADDRSIZE: ${{ matrix.addrsize }} + AUTOBUILD_ADDRSIZE: 64 AUTOBUILD_BUILD_ID: ${{ github.run_id }} + AUTOBUILD_CONFIGURATION: ${{ matrix.configuration }} # authorizes fetching private constituent packages AUTOBUILD_GITHUB_TOKEN: ${{ secrets.SHARED_AUTOBUILD_GITHUB_TOKEN }} AUTOBUILD_INSTALLABLE_CACHE: ${{ github.workspace }}/.autobuild-installables diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp index 4a1a81f083..28f8bc2b93 100644 --- a/indra/llcommon/llprocessor.cpp +++ b/indra/llcommon/llprocessor.cpp @@ -746,7 +746,7 @@ private: __cpuid(0x1, eax, ebx, ecx, edx); if(feature_infos[0] != (S32)edx) { - LL_ERRS() << "machdep.cpu.feature_bits doesn't match expected cpuid result!" << LL_ENDL; + LL_WARNS() << "machdep.cpu.feature_bits doesn't match expected cpuid result!" << LL_ENDL; } #endif // LL_RELEASE_FOR_DOWNLOAD -- cgit v1.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. --- .github/workflows/build.yaml | 23 +++++++++++++---------- build.sh | 24 +++++++++++++++++------- 2 files changed, 30 insertions(+), 17 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1cc29d95ea..f0c7fdd496 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -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 }} 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.3 From 6fd46b85f516d47626090e6c363b978519b3e1a3 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 18 Jul 2023 10:54:12 -0400 Subject: SL-18837: Detect msys bash as well as cygwin for native_path et al. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f0c7fdd496..9b56d800f7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -99,7 +99,7 @@ jobs: mkdir -p "$build_log_dir" mkdir -p "$BUILDSCRIPTS_SHARED/packages/lib/python" source "$BUILDSCRIPTS_SUPPORT_FUNCTIONS" - if [[ "$OSTYPE" == "cygwin" ]] + if [[ "$OSTYPE" =~ cygwin|msys ]] then native_path() { cygpath --windows "$1"; } shell_path() { cygpath --unix "$1"; } -- cgit v1.3 From dcb1403661f227b16fd5d5622c7e1a692b461c5b Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 18 Jul 2023 11:41:32 -0400 Subject: SL-18837: Re-delete redundant matrix.include python-version. This clarifies that the matrix.include entry is intended to supplement an existing runner configuration, rather than adding a new configuration for the same runner. --- .github/workflows/build.yaml | 1 - 1 file changed, 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a3097c9b36..9b56d800f7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -17,7 +17,6 @@ jobs: include: - runner: macos-12-xl developer_dir: "/Applications/Xcode_14.0.1.app/Contents/Developer" - python-version: "3.11" runs-on: ${{ matrix.runner }} env: AUTOBUILD_ADDRSIZE: 64 -- cgit v1.3 From 2b97587a14c596514cdea2f2c624445e272cc127 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 18 Jul 2023 15:25:09 -0400 Subject: SL-18837: Try to post installer and metadata for GH viewer release. --- .github/release.yaml | 18 ++++++++++++++++++ .github/workflows/build.yaml | 12 ++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 .github/release.yaml (limited to '.github/workflows') diff --git a/.github/release.yaml b/.github/release.yaml new file mode 100644 index 0000000000..0f4884c944 --- /dev/null +++ b/.github/release.yaml @@ -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: + - '*' diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9b56d800f7..517efa6fc6 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -232,3 +232,15 @@ jobs: # emitted by build.sh, zero or one lines path: | ${{ steps.build.outputs.physicstpv }} + + release: + needs: build + runs-on: [ubuntu-latest] + if: startsWith(github.ref, 'refs/tags/v') + steps: + - uses: softprops/action-gh-release@v1 + with: + generate_release_notes: true + files: | + ${{ steps.build.outputs.installer }} + ${{ steps.build.outputs.metadata }} -- cgit v1.3 From 0d4228b55aa786c3cbe0512acc5f0d9f91c6b87b Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 18 Jul 2023 15:38:44 -0400 Subject: SL-18837: Use secondlife -3p/action-gh-release instead of the original softprops/action-gh-release repo, because organization rules forbid directly using the softprops repo. --- .github/workflows/build.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 517efa6fc6..9930762167 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -238,7 +238,8 @@ jobs: runs-on: [ubuntu-latest] if: startsWith(github.ref, 'refs/tags/v') steps: - - uses: softprops/action-gh-release@v1 + # forked from softprops/action-gh-release + - uses: secondlife-3p/action-gh-release@v1 with: generate_release_notes: true files: | -- cgit v1.3 From 7cca3506b66cd6cbc04e795d84b1991b42b224d6 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 21 Jul 2023 14:02:00 -0400 Subject: SL-18837: Try triggering GH release for tag like "Second Life "... --- .github/workflows/build.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9930762167..35db50ef00 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -96,6 +96,7 @@ jobs: RUNNER_OS: ${{ runner.os }} run: | # set up things the viewer's build.sh script expects + set -x mkdir -p "$build_log_dir" mkdir -p "$BUILDSCRIPTS_SHARED/packages/lib/python" source "$BUILDSCRIPTS_SUPPORT_FUNCTIONS" @@ -165,7 +166,7 @@ jobs: # Build with a tag like "Second Life Project Shiny:abcdef0" to get a # viewer channel "Second Life Project Shiny" (ignoring ":hash", # needed to disambiguate tags). - if [[ "${GIT_REF:0:12}" == "Second Life " ]] + if [[ "$GITHUB_REF_TYPE" == "tag" && "${GITHUB_REF_NAME:0:12}" == "Second Life " ]] then export viewer_channel="${GIT_REF%:*}" else export viewer_channel="Second Life Test" fi @@ -236,7 +237,7 @@ jobs: release: needs: build runs-on: [ubuntu-latest] - if: startsWith(github.ref, 'refs/tags/v') + if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second Life ') steps: # forked from softprops/action-gh-release - uses: secondlife-3p/action-gh-release@v1 -- cgit v1.3 From 6605403661da96dde7ff6dfb6bcfa87fc087ff0e Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 21 Jul 2023 15:24:11 -0400 Subject: SL-18837: Tags can't have spaces or colons. Look for valid ones. --- .github/workflows/build.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 35db50ef00..4262d3b6ef 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -163,11 +163,12 @@ jobs: # seen before, so numerous tests don't know about it. [[ "$arch" == "MINGW6" ]] && arch=CYGWIN export AUTOBUILD="$(which autobuild)" - # Build with a tag like "Second Life Project Shiny:abcdef0" to get a - # viewer channel "Second Life Project Shiny" (ignoring ":hash", + # Build with a tag like "Second_Life_Project_Shiny#abcdef0" to get a + # viewer channel "Second Life Project Shiny" (ignoring "#hash", # needed to disambiguate tags). - if [[ "$GITHUB_REF_TYPE" == "tag" && "${GITHUB_REF_NAME:0:12}" == "Second Life " ]] - then export viewer_channel="${GIT_REF%:*}" + if [[ "$GITHUB_REF_TYPE" == "tag" && "${GITHUB_REF_NAME:0:12}" == "Second_Life_" ]] + then viewer_channel="${GITHUB_REF_NAME%#*}" + export viewer_channel="${viewer_channel//_/ }" else export viewer_channel="Second Life Test" fi @@ -237,7 +238,7 @@ jobs: release: needs: build runs-on: [ubuntu-latest] - if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second Life ') + if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life_') steps: # forked from softprops/action-gh-release - uses: secondlife-3p/action-gh-release@v1 -- cgit v1.3 From f9a30e7ed13091f81686d183c25e57d732cee957 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 22 Jul 2023 08:18:13 -0400 Subject: SL-18837: Try posting build.yaml step outputs as job outputs. --- .github/workflows/build.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4262d3b6ef..3ea58d9c09 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -18,6 +18,10 @@ jobs: - runner: macos-12-xl developer_dir: "/Applications/Xcode_14.0.1.app/Contents/Developer" runs-on: ${{ matrix.runner }} + outputs: + # pass these from build job to release job + installer: ${{ steps.build.outputs.installer }} + metadata: ${{ steps.build.outputs.metadata }} env: AUTOBUILD_ADDRSIZE: 64 AUTOBUILD_BUILD_ID: ${{ github.run_id }} @@ -245,5 +249,5 @@ jobs: with: generate_release_notes: true files: | - ${{ steps.build.outputs.installer }} - ${{ steps.build.outputs.metadata }} + ${{ jobs.build.outputs.installer }} + ${{ jobs.build.outputs.metadata }} -- cgit v1.3 From 73a857ba31a21add60db349fc29fb9f7a5edfa00 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 22 Jul 2023 08:32:21 -0400 Subject: SL-18837: Use 'needs' context, not 'jobs' context in release job to reference outputs from the build job. Also mark the release as prerelease, and fail the release action if we still can't find the files we're trying to post. --- .github/workflows/build.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3ea58d9c09..01f7f2bd7b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -247,7 +247,10 @@ jobs: # forked from softprops/action-gh-release - uses: secondlife-3p/action-gh-release@v1 with: + prerelease: true generate_release_notes: true + # the only reason we generate a GH release is to post build products + fail_on_unmatched_files: true files: | - ${{ jobs.build.outputs.installer }} - ${{ jobs.build.outputs.metadata }} + ${{ needs.build.outputs.installer }} + ${{ needs.build.outputs.metadata }} -- cgit v1.3 From 70e4c73baae5759b6a2bae9722fa64cfb8b0bb20 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 18 Aug 2023 11:28:15 -0400 Subject: SL-18837: Engage initial GH viewer release script. --- .github/workflows/build.yaml | 38 +++++++++++++++++++++++++++---------- .github/workflows/post_artifacts.py | 31 ++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 10 deletions(-) create mode 100755 .github/workflows/post_artifacts.py (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 01f7f2bd7b..1cdef55f5f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -241,16 +241,34 @@ jobs: release: needs: build - runs-on: [ubuntu-latest] + runs-on: ubuntu-latest if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life_') steps: - # forked from softprops/action-gh-release - - uses: secondlife-3p/action-gh-release@v1 + - name: Checkout code + uses: actions/checkout@v3 + with: + ref: ${{ github.sha }} + + - name: Setup python + uses: actions/setup-python@v4 with: - prerelease: true - generate_release_notes: true - # the only reason we generate a GH release is to post build products - fail_on_unmatched_files: true - files: | - ${{ needs.build.outputs.installer }} - ${{ needs.build.outputs.metadata }} + python-version: "3.11" + + - name: Install PyGithub + run: pip3 install PyGithub + + - name: Unpack artifacts + env: + BUILD: ${{ toJSON(needs.build) }} + run: .github/workflows/post_artifacts.py + +## # forked from softprops/action-gh-release +## - uses: secondlife-3p/action-gh-release@v1 +## with: +## prerelease: true +## generate_release_notes: true +## # the only reason we generate a GH release is to post build products +## fail_on_unmatched_files: true +## files: | +## ${{ needs.build.outputs.installer }} +## ${{ needs.build.outputs.metadata }} diff --git a/.github/workflows/post_artifacts.py b/.github/workflows/post_artifacts.py new file mode 100755 index 0000000000..bb51feb0a9 --- /dev/null +++ b/.github/workflows/post_artifacts.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python3 +"""\ +@file post_artifacts.py +@author Nat Goodspeed +@date 2023-08-18 +@brief Unpack and post artifacts from a GitHub Actions build + +$LicenseInfo:firstyear=2023&license=viewerlgpl$ +Copyright (c) 2023, Linden Research, Inc. +$/LicenseInfo$ +""" + +import github +import json +import os +import sys + +class Error(Exception): + pass + +def main(*raw_args): + buildstr = os.getenv('BUILD') + build = json.loads(buildstr) + from pprint import pprint + pprint(build) + +if __name__ == "__main__": + try: + sys.exit(main(*sys.argv[1:])) + except Error as err: + sys.exit(str(err)) -- cgit v1.3 From 929aa15c80c89555f1f5c5fc57c4d4c27650a1c8 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 28 Aug 2023 13:21:16 -0400 Subject: SL-18837: Experiment with download-artifact downloading all files. --- .github/workflows/build.yaml | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1cdef55f5f..440681edb1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -242,25 +242,30 @@ jobs: release: needs: build runs-on: ubuntu-latest - if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life_') + ##if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life_') steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - ref: ${{ github.sha }} - - - name: Setup python - uses: actions/setup-python@v4 - with: - python-version: "3.11" +## - name: Checkout code +## uses: actions/checkout@v3 +## with: +## ref: ${{ github.sha }} +## +## - name: Setup python +## uses: actions/setup-python@v4 +## with: +## python-version: "3.11" +## +## - name: Install PyGithub +## run: pip3 install PyGithub +## +## - name: Unpack artifacts +## env: +## BUILD: ${{ toJSON(needs.build) }} +## run: .github/workflows/post_artifacts.py - - name: Install PyGithub - run: pip3 install PyGithub + - uses: actions/download-artifact@v3 - - name: Unpack artifacts - env: - BUILD: ${{ toJSON(needs.build) }} - run: .github/workflows/post_artifacts.py + - name: Show what we downloaded + run: ls -R ## # forked from softprops/action-gh-release ## - uses: secondlife-3p/action-gh-release@v1 -- cgit v1.3 From 7779cebdcd1aecbce92c660072c00064185a95f1 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 29 Aug 2023 17:55:53 -0400 Subject: SL-18837: Introduce flatten_files.py and use to post release assets --- .github/workflows/build.yaml | 46 +++++---- .github/workflows/flatten_files.py | 180 ++++++++++++++++++++++++++++++++++++ .github/workflows/post_artifacts.py | 31 ------- 3 files changed, 206 insertions(+), 51 deletions(-) create mode 100755 .github/workflows/flatten_files.py delete mode 100755 .github/workflows/post_artifacts.py (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 440681edb1..61a1215d07 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -244,16 +244,16 @@ jobs: runs-on: ubuntu-latest ##if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life_') steps: -## - name: Checkout code -## uses: actions/checkout@v3 -## with: -## ref: ${{ github.sha }} -## -## - name: Setup python -## uses: actions/setup-python@v4 -## with: -## python-version: "3.11" -## + - name: Checkout code + uses: actions/checkout@v3 + with: + ref: ${{ github.sha }} + + - name: Setup python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + ## - name: Install PyGithub ## run: pip3 install PyGithub ## @@ -263,17 +263,23 @@ jobs: ## run: .github/workflows/post_artifacts.py - uses: actions/download-artifact@v3 + with: + path: artifacts - name: Show what we downloaded run: ls -R -## # forked from softprops/action-gh-release -## - uses: secondlife-3p/action-gh-release@v1 -## with: -## prerelease: true -## generate_release_notes: true -## # the only reason we generate a GH release is to post build products -## fail_on_unmatched_files: true -## files: | -## ${{ needs.build.outputs.installer }} -## ${{ needs.build.outputs.metadata }} + - name: Make output dir + run: mkdir assets + + - name: Reshuffle artifact files + run: .github/workflows/flatten_files.py assets artifacts + + # forked from softprops/action-gh-release + - uses: secondlife-3p/action-gh-release@v1 + with: + prerelease: true + generate_release_notes: true + # the only reason we generate a GH release is to post build products + fail_on_unmatched_files: true + files: "assets/*" diff --git a/.github/workflows/flatten_files.py b/.github/workflows/flatten_files.py new file mode 100755 index 0000000000..542fa0206b --- /dev/null +++ b/.github/workflows/flatten_files.py @@ -0,0 +1,180 @@ +#!/usr/bin/env python3 +"""\ +@file flatten_files.py +@author Nat Goodspeed +@date 2023-08-18 +@brief From an input directory tree, populate a single flat output directory. + +$LicenseInfo:firstyear=2023&license=viewerlgpl$ +Copyright (c) 2023, Linden Research, Inc. +$/LicenseInfo$ +""" + +DESCRIPTION = """\ +From an input directory tree, populate a single flat output directory. + +For files with colliding names, rename them to unambiguous names derived from +their relative pathname within the input tree. + +This is useful when downloading GitHub build artifacts from multiple platforms +to post them all as release assets without collisions. +""" + +from collections import defaultdict +from contextlib import suppress +import filecmp +import os +from pathlib import Path +import sys + +class Error(Exception): + pass + +def flatten(output, input='.', dry_run=False): + try: + in_stat = os.stat(input) + except FileNotFoundError as err: + raise Error(f'{input} does not exist') from err + + try: + out_stat = os.stat(output) + except FileNotFoundError: + # output doesn't yet exist - at this point that's okay + out_stat = None + + # use samestat() to avoid being fooled by different ways of expressing the + # same path + if out_stat and os.path.samestat(out_stat, in_stat): + # output directory same as input: in this case, don't prune output + # directory from input tree walk because we'd prune everything + out_stat = None + elif out_stat: + # distinct existing output directory (potentially containing, or + # contained by, the input directory) + outfiles = [f for f in Path(output).rglob('*') if f.is_file()] + if outfiles: + print(f'Warning: {output} already contains {len(outfiles)} files:', file=sys.stderr) + for f in sorted(outfiles): + print(' ', f.relative_to(output), file=sys.stderr) + + # Use os.walk() instead of Path.rglob() so we can prune unwanted + # directories. + infiles = [] + for parent, dirs, files in os.walk(input): + infiles.extend(Path(parent, f) for f in files) + # Prune directories: because we must modify the dirs list in-place, + # and because we're using indexes, traverse backwards so deletion + # won't affect subsequent iterations. Yes we really must subtract 1 + # that many times. + for idx in range(len(dirs)-1, -1, -1): + if dirs[idx].startswith('.'): + # skip dot-named directories + print(f'ignoring {dirs[idx]}', file=sys.stderr) + del dirs[idx] + elif out_stat and os.path.samestat(os.stat(os.path.join(parent, dirs[idx])), out_stat): + # output directory lives under input directory: ignore any + # previous contents + print(f'ignoring nested output directory {os.path.join(parent, dirs[idx])}', + file=sys.stderr) + del dirs[idx] + + # Now that we've traversed the input tree, create the output directory if + # needed. + output = Path(output) + output.mkdir(parents=True, exist_ok=True) + + # group files by basename to identify collisions + basenames = defaultdict(list) + for f in infiles: + basenames[f.name].append(f) + + # output names: populate it right away with unique basenames + outnames = { name: files[0] for name, files in basenames.items() + if len(files) == 1 } + + # now focus on the collisions + for name, files in basenames.items(): + if len(files) <= 1: + continue + + # Special case: are these colliding files equal? e.g. viewer_version.txt + # Pass shallow=False so we actually read the files in question. Even + # if they're identical, they've been downloaded from different + # artifacts and have different timestamps (which would fool the default + # shallow=True). This could be time-consuming if we were comparing two + # of our very large files, but (a) our very large files already have + # distinct names and so don't reach this call and (b) if we somehow do + # wind up in that situation, it would be even more important to post + # only a single copy. + if all(filecmp.cmp(files[0], f, shallow=False) for f in files[1:]): + # pick only one of them and use its simple basename + outnames[name] = files[0] + continue + + # Because of our intended use for GitHub Actions build artifacts, we + # assume the top-level artifact names are descriptive. We'd still like + # to eliminate mid-level directory names that don't help disambiguate, + # so for instance, given: + # Windows metadata/newview/viewer_version.txt + # macOS metadata/newview/viewer_version.txt + # we see no reason to retain the 'newview' pathname component. Try + # longer and longer prefixes of the pathname parents. (But don't + # forget to trim off the original input directory pathname.) + filepairs = [(f, f.relative_to(input)) for f in files] + partslen = max(len(rel.parts) for f, rel in filepairs) + # skip the basename itself, we'll append that explicitly + for prefixlen in range(partslen - 1): + # Consider these relative names (shouldn't occur, but...): + # parent/autobuild-package.xml + # parent/newview/autobuild-package.xml + # Unless these are in fact identical, they'll collide, meaning + # we'll see them here. But beware their unequal numbers of parts. + # partslen will be 3, so prefixlen will be 0, 1 -- but unless we + # constrain it with min(), for prefixlen == 1 we'd construct: + # ('parent', 'autobuild-package.xml', 'autobuild-package.xml') + # ('parent', 'newview', 'autobuild-package.xml') + # whereas of course the correct answer would be: + # ('parent', 'autobuild-package.xml') + # ('parent', 'newview', 'autobuild-package.xml') + # Since we already know the basename is identical for every f in + # files, though, we can omit it from our uniqueness testing. + trynames = { rel.parts[:min(prefixlen+1, len(rel.parts)-1)]: f + for f, rel in filepairs } + if len(trynames) == len(files): + # Found a prefix without collisions -- note that we're + # guaranteed to get here eventually since the full paths are + # distinct in the filesystem, we just want to try to shorten. + # Path.parts is specifically documented to be a tuple. Join + # the key tuple with some delimiter acceptable to the + # filesystem. + outnames.update(('-'.join(nametuple + (name,)), f) + for nametuple, f in trynames.items()) + # stop considering longer prefixlens + break + + # at this point outnames should have distinct keys -- move to the output + # directory + for name, f in outnames.items(): + newname = output / name + if (not dry_run) and newname != f: + newname = f.rename(newname) + print(f'{f} => {newname}') + +def main(*raw_args): + from argparse import ArgumentParser + parser = ArgumentParser(description=DESCRIPTION) + parser.add_argument('-n', '--dry-run', action='store_true', default=False, + help="""show what would happen without moving files""") + parser.add_argument('output', metavar='OUTDIR', + help="""populate OUTDIR with (possibly renamed) files""") + parser.add_argument('input', metavar='INDIR', nargs='?', default='.', + help="""recursively read files under INDIR tree""") + + args = parser.parse_args(raw_args) + flatten(args.output, args.input, dry_run=args.dry_run) + +if __name__ == "__main__": + try: + sys.exit(main(*sys.argv[1:])) + except Error as err: + sys.exit(str(err)) diff --git a/.github/workflows/post_artifacts.py b/.github/workflows/post_artifacts.py deleted file mode 100755 index bb51feb0a9..0000000000 --- a/.github/workflows/post_artifacts.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python3 -"""\ -@file post_artifacts.py -@author Nat Goodspeed -@date 2023-08-18 -@brief Unpack and post artifacts from a GitHub Actions build - -$LicenseInfo:firstyear=2023&license=viewerlgpl$ -Copyright (c) 2023, Linden Research, Inc. -$/LicenseInfo$ -""" - -import github -import json -import os -import sys - -class Error(Exception): - pass - -def main(*raw_args): - buildstr = os.getenv('BUILD') - build = json.loads(buildstr) - from pprint import pprint - pprint(build) - -if __name__ == "__main__": - try: - sys.exit(main(*sys.argv[1:])) - except Error as err: - sys.exit(str(err)) -- cgit v1.3 From b06aa53f59dcd2efa4c73bbaa84b17c0d080117e Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 29 Aug 2023 20:03:21 -0400 Subject: SL-18837: Only list the downloaded artifacts. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 61a1215d07..d62b640369 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -267,7 +267,7 @@ jobs: path: artifacts - name: Show what we downloaded - run: ls -R + run: ls -R artifacts - name: Make output dir run: mkdir assets -- cgit v1.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. --- .github/workflows/build.yaml | 45 ++++++++++++++++++++++++++++++---------- build.sh | 24 +++++++++++++-------- indra/newview/viewer_manifest.py | 6 ++++++ 3 files changed, 55 insertions(+), 20 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d62b640369..ad5925d266 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -19,9 +19,8 @@ jobs: developer_dir: "/Applications/Xcode_14.0.1.app/Contents/Developer" runs-on: ${{ matrix.runner }} outputs: - # pass these from build job to release job - installer: ${{ steps.build.outputs.installer }} - metadata: ${{ steps.build.outputs.metadata }} + viewer_channel: ${{ steps.build.outputs.viewer_channel }} + viewer_version: ${{ steps.build.outputs.viewer_version }} env: AUTOBUILD_ADDRSIZE: 64 AUTOBUILD_BUILD_ID: ${{ github.run_id }} @@ -175,6 +174,7 @@ jobs: export viewer_channel="${viewer_channel//_/ }" else export viewer_channel="Second Life Test" fi + echo "viewer_channel=$viewer_channel" >> "$GITHUB_OUTPUT" # On windows we need to point the build to the correct python # as neither CMake's FindPython nor our custom Python.cmake module @@ -207,24 +207,37 @@ jobs: - name: Upload installer uses: actions/upload-artifact@v3 with: - name: "${{ steps.build.outputs.artifact }} installer" + name: "${{ steps.build.outputs.artifact }}-installer" # emitted by build.sh, possibly multiple lines path: | ${{ steps.build.outputs.installer }} + - name: Upload executable + uses: actions/upload-artifact@v3 + with: + name: "${{ steps.build.outputs.artifact }}-exe + if: steps.build.outputs.viewer_exe + path: ${{ steps.build.outputs.viewer_exe }} + # The other upload of nontrivial size is the symbol file. Use a distinct # artifact for that too. - name: Upload symbol file uses: actions/upload-artifact@v3 with: - name: "${{ steps.build.outputs.artifact }} symbols" + name: "${{ steps.build.outputs.artifact }}-symbols" path: | ${{ steps.build.outputs.symbolfile }} - name: Upload metadata uses: actions/upload-artifact@v3 with: - name: "${{ steps.build.outputs.artifact }} metadata" + # Call this artifact just "Windows" or "macOS" because it's the only + # artifact in which we expect files from both platforms with + # colliding names (e.g. autobuild-package.xml). Our flatten_files.py + # (see release step) resolves collisions by prepending the artifact + # name, so when we anticipate collisions, it's good to keep the + # artifact name short and sweet. + name: "${{ steps.build.outputs.artifact }}" # emitted by build.sh, possibly multiple lines path: | ${{ steps.build.outputs.metadata }} @@ -234,15 +247,28 @@ jobs: # should only be set for viewer-private if: steps.build.outputs.physicstpv with: - name: "${{ steps.build.outputs.artifact }} physics" + name: "${{ steps.build.outputs.artifact }}-physics" # emitted by build.sh, zero or one lines path: | ${{ steps.build.outputs.physicstpv }} + post-windows-symbols: + needs: build + runs-on: ubuntu-latest + steps: + - name: Post windows symbols + uses: secondlife/viewer-post-bugsplat-windows + with: + username: ${{ secrets.BUGSPLAT_USER }} + password: ${{ secrets.BUGSPLAT_PASS }} + database: "SecondLife_Viewer_2018" + channel: ${{ needs.build.outputs.viewer_channel }} + version: ${{ needs.build.outputs.viewer_version }} + release: needs: build runs-on: ubuntu-latest - ##if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life_') + if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life_') steps: - name: Checkout code uses: actions/checkout@v3 @@ -269,9 +295,6 @@ jobs: - name: Show what we downloaded run: ls -R artifacts - - name: Make output dir - run: mkdir assets - - name: Reshuffle artifact files run: .github/workflows/flatten_files.py assets artifacts 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" diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 1e43485b9c..6c4f8cb2d4 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -480,6 +480,12 @@ class WindowsManifest(ViewerManifest): if self.is_packaging_viewer(): # Find secondlife-bin.exe in the 'configuration' dir, then rename it to the result of final_exe. self.path(src='%s/secondlife-bin.exe' % self.args['configuration'], dst=self.final_exe()) + # emit that as one of the GitHub step outputs + GITHUB_OUTPUT = os.getenv('GITHUB_OUTPUT') + if GITHUB_OUTPUT: + exepath = os.path.join(self.get_dst_prefix(), self.final_exe()) + with open(GITHUB_OUTPUT, 'a') as outf: + print(f'viewer_exe={exepath}', file=outf) with self.prefix(src=os.path.join(pkgdir, "VMP")): # include the compiled launcher scripts so that it gets included in the file_list -- cgit v1.3 From 58e8c3567f219703623f3a4755d3ba796ba4ef85 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 31 Aug 2023 16:06:13 -0400 Subject: SL-19243: Fix build.yaml syntax error. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ad5925d266..e0caee849a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -215,7 +215,7 @@ jobs: - name: Upload executable uses: actions/upload-artifact@v3 with: - name: "${{ steps.build.outputs.artifact }}-exe + name: "${{ steps.build.outputs.artifact }}-exe" if: steps.build.outputs.viewer_exe path: ${{ steps.build.outputs.viewer_exe }} -- cgit v1.3 From 348d7107070defa996b870691df23570694f1713 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 31 Aug 2023 16:09:12 -0400 Subject: SL-19243: Fix 'uses:' reference to viewer-post-bugsplat-windows --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e0caee849a..a6a8b49d26 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -257,7 +257,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Post windows symbols - uses: secondlife/viewer-post-bugsplat-windows + uses: secondlife/viewer-post-bugsplat-windows@main with: username: ${{ secrets.BUGSPLAT_USER }} password: ${{ secrets.BUGSPLAT_PASS }} -- cgit v1.3 From 3147b55cecb5fc8a0de71cee09b0e12b66b75a40 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 31 Aug 2023 17:28:25 -0400 Subject: SL-19243: Fix wonky 'if:' in build.yaml --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a6a8b49d26..526ac6999f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -213,10 +213,10 @@ jobs: ${{ steps.build.outputs.installer }} - name: Upload executable + if: steps.build.outputs.viewer_exe uses: actions/upload-artifact@v3 with: name: "${{ steps.build.outputs.artifact }}-exe" - if: steps.build.outputs.viewer_exe path: ${{ steps.build.outputs.viewer_exe }} # The other upload of nontrivial size is the symbol file. Use a distinct -- cgit v1.3 From 2ee8cb0e1601465737fad1fdc02dc237c4294330 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 1 Sep 2023 07:46:32 -0400 Subject: SL-19243: Job to post windows symbols must run on Windows. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 526ac6999f..901cd092af 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -254,7 +254,7 @@ jobs: post-windows-symbols: needs: build - runs-on: ubuntu-latest + runs-on: windows steps: - name: Post windows symbols uses: secondlife/viewer-post-bugsplat-windows@main -- cgit v1.3 From 7cedb1eb20c1263ad1b26af6a3d297e532d641e1 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 1 Sep 2023 10:53:02 -0400 Subject: SL-19243: Add post-mac-symbols job using viewer-post-bugsplat-mac. The initial viewer-post-bugsplat-mac is just a placeholder so far, but we can flesh it out while the viewer builds necessitated by this change are running, and then we can iterate on viewer-post-bugsplat-mac without having to rebuild the viewer. --- .github/workflows/build.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 901cd092af..a901e33ec1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -256,7 +256,7 @@ jobs: needs: build runs-on: windows steps: - - name: Post windows symbols + - name: Post Windows symbols uses: secondlife/viewer-post-bugsplat-windows@main with: username: ${{ secrets.BUGSPLAT_USER }} @@ -265,6 +265,19 @@ jobs: channel: ${{ needs.build.outputs.viewer_channel }} version: ${{ needs.build.outputs.viewer_version }} + post-mac-symbols: + needs: build + runs-on: macos + steps: + - name: Post Mac symbols + uses: secondlife/viewer-post-bugsplat-mac@main + with: + username: ${{ secrets.BUGSPLAT_USER }} + password: ${{ secrets.BUGSPLAT_PASS }} + database: "SecondLife_Viewer_2018" + channel: ${{ needs.build.outputs.viewer_channel }} + version: ${{ needs.build.outputs.viewer_version }} + release: needs: build runs-on: ubuntu-latest -- cgit v1.3 From 755f9d9ac9548e27d68ec701676e20c4824833f8 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 6 Sep 2023 17:03:22 -0400 Subject: SL-19243: Specify macos-latest for post-mac-symbols. We want to run on a GitHub-hosted runner rather than one of our own. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a901e33ec1..025fc1560e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -267,7 +267,7 @@ jobs: post-mac-symbols: needs: build - runs-on: macos + runs-on: macos-latest steps: - name: Post Mac symbols uses: secondlife/viewer-post-bugsplat-mac@main -- cgit v1.3 From 949909013e77e35fe59ed9507a2c40fdb31bc1fc Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 7 Sep 2023 11:38:00 -0400 Subject: SL-18837: Segregate ReleaseOS artifacts; don't even upload. Eliminate references to (no longer set) matrix.addrsize. --- .github/workflows/build.yaml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 69a7e4b6a6..46ec8fdeb9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -86,10 +86,10 @@ jobs: id: cache-installables with: path: .autobuild-installables - key: ${{ runner.os }}-${{ matrix.addrsize }}-${{ matrix.configuration }}-${{ hashFiles('autobuild.xml') }} + key: ${{ runner.os }}-64-${{ matrix.configuration }}-${{ hashFiles('autobuild.xml') }} restore-keys: | - ${{ runner.os }}-${{ matrix.addrsize }}-${{ matrix.configuration }}- - ${{ runner.os }}-${{ matrix.addrsize }}- + ${{ runner.os }}-64-${{ matrix.configuration }}- + ${{ runner.os }}-64- - name: Install windows dependencies if: runner.os == 'Windows' @@ -205,9 +205,14 @@ jobs: # platform, we must disambiguate on more than the platform name. # e.g. if we were still running Windows 32-bit builds, we'd need to # qualify the artifact with bit width. - echo "artifact=$RUNNER_OS" >> $GITHUB_OUTPUT + if [[ "$AUTOBUILD_CONFIGURATION" == "ReleaseOS" ]] + then cfg_suffix='OS' + else cfg_suffix='' + fi + echo "artifact=$RUNNER_OS$cfg_suffix" >> $GITHUB_OUTPUT - name: Upload installer + if: matrix.configuration != "ReleaseOS" uses: actions/upload-artifact@v3 with: name: "${{ steps.build.outputs.artifact }}-installer" @@ -216,7 +221,7 @@ jobs: ${{ steps.build.outputs.installer }} - name: Upload executable - if: steps.build.outputs.viewer_exe + if: matrix.configuration != "ReleaseOS" && steps.build.outputs.viewer_exe uses: actions/upload-artifact@v3 with: name: "${{ steps.build.outputs.artifact }}-exe" @@ -225,6 +230,7 @@ jobs: # The other upload of nontrivial size is the symbol file. Use a distinct # artifact for that too. - name: Upload symbol file + if: matrix.configuration != "ReleaseOS" uses: actions/upload-artifact@v3 with: name: "${{ steps.build.outputs.artifact }}-symbols" @@ -232,6 +238,7 @@ jobs: ${{ steps.build.outputs.symbolfile }} - name: Upload metadata + if: matrix.configuration != "ReleaseOS" uses: actions/upload-artifact@v3 with: # Call this artifact just "Windows" or "macOS" because it's the only @@ -248,7 +255,7 @@ jobs: - name: Upload physics package uses: actions/upload-artifact@v3 # should only be set for viewer-private - if: steps.build.outputs.physicstpv + if: matrix.configuration != "ReleaseOS" && steps.build.outputs.physicstpv with: name: "${{ steps.build.outputs.artifact }}-physics" # emitted by build.sh, zero or one lines -- cgit v1.3 From bac73831c0f92dcdff1d85dab60e18ce6f6dabda Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 7 Sep 2023 11:48:15 -0400 Subject: SL-18837: String literals are single-quoted in GitHub expressions. --- .github/workflows/build.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 46ec8fdeb9..89241071e3 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -212,7 +212,7 @@ jobs: echo "artifact=$RUNNER_OS$cfg_suffix" >> $GITHUB_OUTPUT - name: Upload installer - if: matrix.configuration != "ReleaseOS" + if: matrix.configuration != 'ReleaseOS' uses: actions/upload-artifact@v3 with: name: "${{ steps.build.outputs.artifact }}-installer" @@ -221,7 +221,7 @@ jobs: ${{ steps.build.outputs.installer }} - name: Upload executable - if: matrix.configuration != "ReleaseOS" && steps.build.outputs.viewer_exe + if: matrix.configuration != 'ReleaseOS' && steps.build.outputs.viewer_exe uses: actions/upload-artifact@v3 with: name: "${{ steps.build.outputs.artifact }}-exe" @@ -230,7 +230,7 @@ jobs: # The other upload of nontrivial size is the symbol file. Use a distinct # artifact for that too. - name: Upload symbol file - if: matrix.configuration != "ReleaseOS" + if: matrix.configuration != 'ReleaseOS' uses: actions/upload-artifact@v3 with: name: "${{ steps.build.outputs.artifact }}-symbols" @@ -238,7 +238,7 @@ jobs: ${{ steps.build.outputs.symbolfile }} - name: Upload metadata - if: matrix.configuration != "ReleaseOS" + if: matrix.configuration != 'ReleaseOS' uses: actions/upload-artifact@v3 with: # Call this artifact just "Windows" or "macOS" because it's the only @@ -255,7 +255,7 @@ jobs: - name: Upload physics package uses: actions/upload-artifact@v3 # should only be set for viewer-private - if: matrix.configuration != "ReleaseOS" && steps.build.outputs.physicstpv + if: matrix.configuration != 'ReleaseOS' && steps.build.outputs.physicstpv with: name: "${{ steps.build.outputs.artifact }}-physics" # emitted by build.sh, zero or one lines -- cgit v1.3 From 77227cf5c427b1be0481989f6cd9fd53a36dc487 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 7 Sep 2023 14:09:54 -0400 Subject: SL-18837: Suppress BUGSPLAT_DB for ReleaseOS builds. --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 89241071e3..77cb91cd85 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -34,8 +34,8 @@ jobs: AUTOBUILD_VARIABLES_FILE: ${{ github.workspace }}/.build-variables/variables AUTOBUILD_VSVER: "170" DEVELOPER_DIR: ${{ matrix.developer_dir }} - # Ensure that viewer builds engage Bugsplat. - BUGSPLAT_DB: "SecondLife_Viewer_2018" + # Ensure that Linden viewer builds engage Bugsplat. + BUGSPLAT_DB: ${{ matrix.configuration != 'ReleaseOS' && 'SecondLife_Viewer_2018' || '' }} BUGSPLAT_PASS: ${{ secrets.BUGSPLAT_PASS }} BUGSPLAT_USER: ${{ secrets.BUGSPLAT_USER }} build_coverity: false -- cgit v1.3 From c87d9c635b71d761e0ef84c1a9442759db721487 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 8 Sep 2023 14:30:05 -0400 Subject: SL-18837: Suppress ReleaseOS for now. --- .github/workflows/build.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 77cb91cd85..7e3d2b68de 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,7 +12,9 @@ jobs: strategy: matrix: runner: [windows-large, macos-12-xl] - configuration: [Release, ReleaseOS] + ## Skip ReleaseOS until we resolve + ## === FAILURE No installer found from /c/a/viewer/viewer + configuration: [Release] ##, ReleaseOS] python-version: ["3.11"] include: - runner: macos-12-xl -- cgit v1.3 From 2d04cc14d3805df982d51d96d2e3d180f5ef0b34 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 8 Sep 2023 17:01:46 -0400 Subject: SL-19242: Post -app artifact, not -exe, with entire install image. Previously we posted Windows-exe, macOS-exe artifacts that were a little inconsistent: Windows-exe contained just the Windows executable, whereas macOS-exe contained the whole .app tree (but without the .app directory). Change to post Windows-app, macOS-app artifacts that each contain the whole viewer install image, including the top-level application name directory. This is what we'll need to codesign and notarize. --- .github/workflows/build.yaml | 11 ++++++++--- indra/newview/viewer_manifest.py | 12 ++++++++---- 2 files changed, 16 insertions(+), 7 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7e3d2b68de..8146db36ee 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -223,11 +223,16 @@ jobs: ${{ steps.build.outputs.installer }} - name: Upload executable - if: matrix.configuration != 'ReleaseOS' && steps.build.outputs.viewer_exe + if: matrix.configuration != 'ReleaseOS' && steps.build.outputs.viewer_app uses: actions/upload-artifact@v3 with: - name: "${{ steps.build.outputs.artifact }}-exe" - path: ${{ steps.build.outputs.viewer_exe }} + name: "${{ steps.build.outputs.artifact }}-app" + # The directory specified as viewer_app contains the directory + # containing the application image. Strip out any other build + # detritus from the artifact. + path: | + ${{ steps.build.outputs.viewer_app }} + "!${{ steps.build.outputs.viewer_app }}/*.bat" # The other upload of nontrivial size is the symbol file. Use a distinct # artifact for that too. diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index f6282743bb..679a3441b9 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -489,8 +489,11 @@ class WindowsManifest(ViewerManifest): if self.is_packaging_viewer(): # Find secondlife-bin.exe in the 'configuration' dir, then rename it to the result of final_exe. self.path(src='%s/secondlife-bin.exe' % self.args['configuration'], dst=self.final_exe()) - # emit that as one of the GitHub step outputs - self.set_github_output_path('viewer_exe', self.final_exe()) + # Emit the whole app image as one of the GitHub step outputs. The + # current get_dst_prefix() is the top-level contents of the app + # directory -- so hop outward to the directory containing the app + # name. + self.set_github_output_path('viewer_app', os.pardir) with self.prefix(src=os.path.join(pkgdir, "VMP")): # include the compiled launcher scripts so that it gets included in the file_list @@ -853,8 +856,9 @@ class DarwinManifest(ViewerManifest): def construct(self): # copy over the build result (this is a no-op if run within the xcode script) self.path(os.path.join(self.args['configuration'], self.channel()+".app"), dst="") - # capture the entire destination app bundle - self.set_github_output_path('viewer_exe', '') + # capture the entire destination app bundle, including the containing + # .app directory + self.set_github_output_path('viewer_app', os.pardir) pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') relpkgdir = os.path.join(pkgdir, "lib", "release") -- cgit v1.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. --- .github/workflows/build.yaml | 4 +--- build.sh | 51 ++------------------------------------------ 2 files changed, 3 insertions(+), 52 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8146db36ee..acd30106c3 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,9 +12,7 @@ jobs: strategy: matrix: runner: [windows-large, macos-12-xl] - ## Skip ReleaseOS until we resolve - ## === FAILURE No installer found from /c/a/viewer/viewer - configuration: [Release] ##, ReleaseOS] + configuration: [Release, ReleaseOS] python-version: ["3.11"] include: - runner: macos-12-xl 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.3 From 29300a1fd356b7355ecfb56951e7d7ad0553ef15 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 11 Sep 2023 10:07:51 -0400 Subject: SL-19242: Try harder to post artifacts containing exactly app image. In a Windows build tree, we don't actually have an app-named top directory, so don't package its containing directory -- just the app dir itself, e.g. "newview/Release". In a Mac build tree, though we do have "Second Life Mumble.app", its parent directory also contains other large stuff. Try posting a temp directory containing a symlink to the .app. Ditch the "!*.bat" exclusion: the presence of a second path (even an exclusion) changes how upload-artifact nests its contents. --- .github/workflows/build.yaml | 4 ---- indra/newview/viewer_manifest.py | 46 +++++++++++++++++++++++++++++++--------- 2 files changed, 36 insertions(+), 14 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index acd30106c3..9f10275d7c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -225,12 +225,8 @@ jobs: uses: actions/upload-artifact@v3 with: name: "${{ steps.build.outputs.artifact }}-app" - # The directory specified as viewer_app contains the directory - # containing the application image. Strip out any other build - # detritus from the artifact. path: | ${{ steps.build.outputs.viewer_app }} - "!${{ steps.build.outputs.viewer_app }}/*.bat" # The other upload of nontrivial size is the symbol file. Use a distinct # artifact for that too. diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index dd9ca569ce..4084c1d9a4 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -37,6 +37,7 @@ import re import shutil import subprocess import sys +import tempfile import time viewer_dir = os.path.dirname(__file__) @@ -490,11 +491,8 @@ class WindowsManifest(ViewerManifest): if self.is_packaging_viewer(): # Find secondlife-bin.exe in the 'configuration' dir, then rename it to the result of final_exe. self.path(src='%s/secondlife-bin.exe' % self.args['configuration'], dst=self.final_exe()) - # Emit the whole app image as one of the GitHub step outputs. The - # current get_dst_prefix() is the top-level contents of the app - # directory -- so hop outward to the directory containing the app - # name. - self.set_github_output_path('viewer_app', os.pardir) + # Emit the whole app image as one of the GitHub step outputs. + self.set_github_output_path('viewer_app', '') with self.prefix(src=os.path.join(pkgdir, "VMP")): # include the compiled launcher scripts so that it gets included in the file_list @@ -855,11 +853,39 @@ class DarwinManifest(ViewerManifest): return bool(set(["package", "unpacked"]).intersection(self.args['actions'])) def construct(self): - # copy over the build result (this is a no-op if run within the xcode script) - self.path(os.path.join(self.args['configuration'], self.channel()+".app"), dst="") - # capture the entire destination app bundle, including the containing - # .app directory - self.set_github_output_path('viewer_app', os.pardir) + # copy over the build result (this is a no-op if run within the xcode + # script) + appname = self.channel() + ".app" + self.path(os.path.join(self.args['configuration'], appname), dst="") + RUNNER_TEMP = os.getenv('RUNNER_TEMP') + # When running as a GitHub Action job, RUNNER_TEMP is the recommended + # temp directory. If we're not running on GitHub, don't create this + # temp directory or this symlink: we don't clean them up, trusting + # that the runner is itself transient. On a dev machine, that would + # result in temp-directory clutter. + if RUNNER_TEMP: + # We want an artifact containing the "Second Life Mumble.app" + # directory, which in turn contains the whole app bundle. + # Unfortunately, the directory that contains the .app directory + # also contains other stuff, notably the xcarchive.zip, which is + # itself enormous. Create a temp directory containing only (a link + # to) our .app dir, and specify that as the directory to upload. + wrapdir = tempfile.mkdtemp(dir=RUNNER_TEMP) + applink = os.path.join(wrapdir, appname) + # This link will be used by a different job step, so link to an + # absolute path: we can't guarantee that the other step will have + # the same current directory. + # diagnostic output + parentdir = os.path.abspath(os.path.join(self.get_dst_prefix(), os.pardir)) + for dir in parentdir, os.path.join(parentdir, appname): + print(f'Contents of {dir}:') + for item in os.listdir(dir): + print(f' {item}') + # end diagnostic output + appreal = os.path.abspath(os.path.join(self.get_dst_prefix(), os.pardir, appname)) + print(f"Linking {applink} => {appreal}") + os.symlink(appreal, applink) + self.set_github_output_path('viewer_app', wrapdir) pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') relpkgdir = os.path.join(pkgdir, "lib", "release") -- cgit v1.3 From 0992a0af3bc1d9c78d611c3778eca86b575dbe4c Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 12 Sep 2023 12:46:28 -0400 Subject: SL-19243: Use consolidated viewer-build-util instead of distinct viewer-post-bugsplat-{windows,mac} repos. --- .github/workflows/build.yaml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9f10275d7c..7c1489e7fd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -265,10 +265,17 @@ jobs: post-windows-symbols: needs: build - runs-on: windows + runs-on: ubuntu-latest steps: + - name: Checkout viewer-build-util + uses: actions/checkout@v3 + with: + repository: secondlife/viewer-build-util + ref: main + path: .util + - name: Post Windows symbols - uses: secondlife/viewer-post-bugsplat-windows@main + uses: .util/post-bugsplat-windows with: username: ${{ secrets.BUGSPLAT_USER }} password: ${{ secrets.BUGSPLAT_PASS }} @@ -278,10 +285,17 @@ jobs: post-mac-symbols: needs: build - runs-on: macos-latest + runs-on: ubuntu-latest steps: + - name: Checkout viewer-build-util + uses: actions/checkout@v3 + with: + repository: secondlife/viewer-build-util + ref: main + path: .util + - name: Post Mac symbols - uses: secondlife/viewer-post-bugsplat-mac@main + uses: .util/post-bugsplat-mac with: username: ${{ secrets.BUGSPLAT_USER }} password: ${{ secrets.BUGSPLAT_PASS }} -- cgit v1.3 From d795b49f16ef77bf7453af228d121a1f7de5f1f9 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 12 Sep 2023 12:50:13 -0400 Subject: SL-19243: Job step 'uses' must specify action.yaml file instead of having it implied by specifying the containing directory. --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7c1489e7fd..8157b9559f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -275,7 +275,7 @@ jobs: path: .util - name: Post Windows symbols - uses: .util/post-bugsplat-windows + uses: .util/post-bugsplat-windows/action.yaml with: username: ${{ secrets.BUGSPLAT_USER }} password: ${{ secrets.BUGSPLAT_PASS }} @@ -295,7 +295,7 @@ jobs: path: .util - name: Post Mac symbols - uses: .util/post-bugsplat-mac + uses: .util/post-bugsplat-mac/action.yaml with: username: ${{ secrets.BUGSPLAT_USER }} password: ${{ secrets.BUGSPLAT_PASS }} -- cgit v1.3 From 3e86f26b408a33578482d20cd82ae9b5b5a5dc7c Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 12 Sep 2023 13:55:08 -0400 Subject: SL-19243: Try to convince GitHub that ./.util is really a path. --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8157b9559f..4286de7cd3 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -275,7 +275,7 @@ jobs: path: .util - name: Post Windows symbols - uses: .util/post-bugsplat-windows/action.yaml + uses: ./.util/post-bugsplat-windows with: username: ${{ secrets.BUGSPLAT_USER }} password: ${{ secrets.BUGSPLAT_PASS }} @@ -295,7 +295,7 @@ jobs: path: .util - name: Post Mac symbols - uses: .util/post-bugsplat-mac/action.yaml + uses: ./.util/post-bugsplat-mac with: username: ${{ secrets.BUGSPLAT_USER }} password: ${{ secrets.BUGSPLAT_PASS }} -- cgit v1.3 From b02249546edeab57bef45cc72400973aa673d866 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 12 Sep 2023 16:28:09 -0400 Subject: SL-19243: Directly reference action subdirs in viewer-build-util instead of trying to checkout viewer-build-util (which doesn't work) and then reference action subdirs from the filesystem. Also engage (initial placeholder) actions to sign and package the platform-specific application artifacts. --- .github/workflows/build.yaml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4286de7cd3..b1dbc08011 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -263,19 +263,26 @@ jobs: path: | ${{ steps.build.outputs.physicstpv }} + sign-and-package-windows: + needs: build + runs-on: windows + steps: + - name: Sign and package Windows viewer + uses: secondlife/viewer-build-util/sign-pkg-windows@main + + sign-and-package-mac: + needs: build + runs-on: macos-latest + steps: + - name: Sign and package Mac viewer + uses: secondlife/viewer-build-util/sign-pkg-mac@main + post-windows-symbols: needs: build runs-on: ubuntu-latest steps: - - name: Checkout viewer-build-util - uses: actions/checkout@v3 - with: - repository: secondlife/viewer-build-util - ref: main - path: .util - - name: Post Windows symbols - uses: ./.util/post-bugsplat-windows + uses: secondlife/viewer-build-util/post-bugsplat-windows@main with: username: ${{ secrets.BUGSPLAT_USER }} password: ${{ secrets.BUGSPLAT_PASS }} @@ -287,15 +294,8 @@ jobs: needs: build runs-on: ubuntu-latest steps: - - name: Checkout viewer-build-util - uses: actions/checkout@v3 - with: - repository: secondlife/viewer-build-util - ref: main - path: .util - - name: Post Mac symbols - uses: ./.util/post-bugsplat-mac + uses: secondlife/viewer-build-util/post-bugsplat-mac@main with: username: ${{ secrets.BUGSPLAT_USER }} password: ${{ secrets.BUGSPLAT_PASS }} -- cgit v1.3 From 7c351379fc534fb2a17cac3fe5f574786f82eef6 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 15 Sep 2023 15:17:40 -0400 Subject: SL-19242: Retrieve and decode Windows signing cert, pass to action. --- .github/workflows/build.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b1dbc08011..d04e105443 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -267,8 +267,18 @@ jobs: needs: build runs-on: windows steps: + - name: Decode certificate file + shell: bash + env: + SIGNING_CERT_WINDOWS: ${{ secrets.SIGNING_CERT_WINDOWS }} + run: | + mkdir -p .cert + echo "$SIGNING_CERT_WINDOWS" | base64 --decode > .cert/authenticode-cert.pfx + - name: Sign and package Windows viewer uses: secondlife/viewer-build-util/sign-pkg-windows@main + with: + certificate: .cert/authenticode-cert.pfx sign-and-package-mac: needs: build -- cgit v1.3 From 1184c383e20797c2c7df7a996663f9236b201cd4 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 18 Sep 2023 22:39:43 -0400 Subject: SL-19242: release job now depends on package jobs and uses new viewer-build-util/release-artifacts action. --- .github/workflows/build.yaml | 52 +++++------ .github/workflows/flatten_files.py | 180 ------------------------------------- 2 files changed, 22 insertions(+), 210 deletions(-) delete mode 100755 .github/workflows/flatten_files.py (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d04e105443..8a477e1a29 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -242,13 +242,7 @@ jobs: if: matrix.configuration != 'ReleaseOS' uses: actions/upload-artifact@v3 with: - # Call this artifact just "Windows" or "macOS" because it's the only - # artifact in which we expect files from both platforms with - # colliding names (e.g. autobuild-package.xml). Our flatten_files.py - # (see release step) resolves collisions by prepending the artifact - # name, so when we anticipate collisions, it's good to keep the - # artifact name short and sweet. - name: "${{ steps.build.outputs.artifact }}" + name: "${{ steps.build.outputs.artifact }}-metadata" # emitted by build.sh, possibly multiple lines path: | ${{ steps.build.outputs.metadata }} @@ -314,37 +308,35 @@ jobs: version: ${{ needs.build.outputs.viewer_version }} release: - needs: build + needs: [sign-and-package-windows, sign-and-package-mac] runs-on: ubuntu-latest if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life_') steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - ref: ${{ github.sha }} - - - name: Setup python - uses: actions/setup-python@v4 - with: - python-version: "3.11" - -## - name: Install PyGithub -## run: pip3 install PyGithub -## -## - name: Unpack artifacts -## env: -## BUILD: ${{ toJSON(needs.build) }} -## run: .github/workflows/post_artifacts.py - - uses: actions/download-artifact@v3 with: path: artifacts - - name: Show what we downloaded - run: ls -R artifacts - - name: Reshuffle artifact files - run: .github/workflows/flatten_files.py assets artifacts + run: secondlife/viewer-build-util/release-artifacts@main + with: + input-path: artifacts + output-path: assets + exclude: | + # The *-app artifacts are for use only by the signing and + # packaging steps. Once we've generated signed installers, we no + # longer need them, and we CERTAINLY don't want to publish + # thousands of individual files as separate URLs. + Windows-app + macOS-app + prefix: | + # Use just "Windows" or "macOS" prefix because these are the only + # artifacts in which we expect files from both platforms with + # colliding names (e.g. autobuild-package.xml). release-artifacts + # normally resolves collisions by prepending the artifact name, so + # when we anticipate collisions, it's good to keep the prefix + # short and sweet. + Windows-metadata=Windows + macOS-metadata=macOS # forked from softprops/action-gh-release - uses: secondlife-3p/action-gh-release@v1 diff --git a/.github/workflows/flatten_files.py b/.github/workflows/flatten_files.py deleted file mode 100755 index 542fa0206b..0000000000 --- a/.github/workflows/flatten_files.py +++ /dev/null @@ -1,180 +0,0 @@ -#!/usr/bin/env python3 -"""\ -@file flatten_files.py -@author Nat Goodspeed -@date 2023-08-18 -@brief From an input directory tree, populate a single flat output directory. - -$LicenseInfo:firstyear=2023&license=viewerlgpl$ -Copyright (c) 2023, Linden Research, Inc. -$/LicenseInfo$ -""" - -DESCRIPTION = """\ -From an input directory tree, populate a single flat output directory. - -For files with colliding names, rename them to unambiguous names derived from -their relative pathname within the input tree. - -This is useful when downloading GitHub build artifacts from multiple platforms -to post them all as release assets without collisions. -""" - -from collections import defaultdict -from contextlib import suppress -import filecmp -import os -from pathlib import Path -import sys - -class Error(Exception): - pass - -def flatten(output, input='.', dry_run=False): - try: - in_stat = os.stat(input) - except FileNotFoundError as err: - raise Error(f'{input} does not exist') from err - - try: - out_stat = os.stat(output) - except FileNotFoundError: - # output doesn't yet exist - at this point that's okay - out_stat = None - - # use samestat() to avoid being fooled by different ways of expressing the - # same path - if out_stat and os.path.samestat(out_stat, in_stat): - # output directory same as input: in this case, don't prune output - # directory from input tree walk because we'd prune everything - out_stat = None - elif out_stat: - # distinct existing output directory (potentially containing, or - # contained by, the input directory) - outfiles = [f for f in Path(output).rglob('*') if f.is_file()] - if outfiles: - print(f'Warning: {output} already contains {len(outfiles)} files:', file=sys.stderr) - for f in sorted(outfiles): - print(' ', f.relative_to(output), file=sys.stderr) - - # Use os.walk() instead of Path.rglob() so we can prune unwanted - # directories. - infiles = [] - for parent, dirs, files in os.walk(input): - infiles.extend(Path(parent, f) for f in files) - # Prune directories: because we must modify the dirs list in-place, - # and because we're using indexes, traverse backwards so deletion - # won't affect subsequent iterations. Yes we really must subtract 1 - # that many times. - for idx in range(len(dirs)-1, -1, -1): - if dirs[idx].startswith('.'): - # skip dot-named directories - print(f'ignoring {dirs[idx]}', file=sys.stderr) - del dirs[idx] - elif out_stat and os.path.samestat(os.stat(os.path.join(parent, dirs[idx])), out_stat): - # output directory lives under input directory: ignore any - # previous contents - print(f'ignoring nested output directory {os.path.join(parent, dirs[idx])}', - file=sys.stderr) - del dirs[idx] - - # Now that we've traversed the input tree, create the output directory if - # needed. - output = Path(output) - output.mkdir(parents=True, exist_ok=True) - - # group files by basename to identify collisions - basenames = defaultdict(list) - for f in infiles: - basenames[f.name].append(f) - - # output names: populate it right away with unique basenames - outnames = { name: files[0] for name, files in basenames.items() - if len(files) == 1 } - - # now focus on the collisions - for name, files in basenames.items(): - if len(files) <= 1: - continue - - # Special case: are these colliding files equal? e.g. viewer_version.txt - # Pass shallow=False so we actually read the files in question. Even - # if they're identical, they've been downloaded from different - # artifacts and have different timestamps (which would fool the default - # shallow=True). This could be time-consuming if we were comparing two - # of our very large files, but (a) our very large files already have - # distinct names and so don't reach this call and (b) if we somehow do - # wind up in that situation, it would be even more important to post - # only a single copy. - if all(filecmp.cmp(files[0], f, shallow=False) for f in files[1:]): - # pick only one of them and use its simple basename - outnames[name] = files[0] - continue - - # Because of our intended use for GitHub Actions build artifacts, we - # assume the top-level artifact names are descriptive. We'd still like - # to eliminate mid-level directory names that don't help disambiguate, - # so for instance, given: - # Windows metadata/newview/viewer_version.txt - # macOS metadata/newview/viewer_version.txt - # we see no reason to retain the 'newview' pathname component. Try - # longer and longer prefixes of the pathname parents. (But don't - # forget to trim off the original input directory pathname.) - filepairs = [(f, f.relative_to(input)) for f in files] - partslen = max(len(rel.parts) for f, rel in filepairs) - # skip the basename itself, we'll append that explicitly - for prefixlen in range(partslen - 1): - # Consider these relative names (shouldn't occur, but...): - # parent/autobuild-package.xml - # parent/newview/autobuild-package.xml - # Unless these are in fact identical, they'll collide, meaning - # we'll see them here. But beware their unequal numbers of parts. - # partslen will be 3, so prefixlen will be 0, 1 -- but unless we - # constrain it with min(), for prefixlen == 1 we'd construct: - # ('parent', 'autobuild-package.xml', 'autobuild-package.xml') - # ('parent', 'newview', 'autobuild-package.xml') - # whereas of course the correct answer would be: - # ('parent', 'autobuild-package.xml') - # ('parent', 'newview', 'autobuild-package.xml') - # Since we already know the basename is identical for every f in - # files, though, we can omit it from our uniqueness testing. - trynames = { rel.parts[:min(prefixlen+1, len(rel.parts)-1)]: f - for f, rel in filepairs } - if len(trynames) == len(files): - # Found a prefix without collisions -- note that we're - # guaranteed to get here eventually since the full paths are - # distinct in the filesystem, we just want to try to shorten. - # Path.parts is specifically documented to be a tuple. Join - # the key tuple with some delimiter acceptable to the - # filesystem. - outnames.update(('-'.join(nametuple + (name,)), f) - for nametuple, f in trynames.items()) - # stop considering longer prefixlens - break - - # at this point outnames should have distinct keys -- move to the output - # directory - for name, f in outnames.items(): - newname = output / name - if (not dry_run) and newname != f: - newname = f.rename(newname) - print(f'{f} => {newname}') - -def main(*raw_args): - from argparse import ArgumentParser - parser = ArgumentParser(description=DESCRIPTION) - parser.add_argument('-n', '--dry-run', action='store_true', default=False, - help="""show what would happen without moving files""") - parser.add_argument('output', metavar='OUTDIR', - help="""populate OUTDIR with (possibly renamed) files""") - parser.add_argument('input', metavar='INDIR', nargs='?', default='.', - help="""recursively read files under INDIR tree""") - - args = parser.parse_args(raw_args) - flatten(args.output, args.input, dry_run=args.dry_run) - -if __name__ == "__main__": - try: - sys.exit(main(*sys.argv[1:])) - except Error as err: - sys.exit(str(err)) -- cgit v1.3 From bd8ecbb389efa977908f80b1d04bd827745bc892 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 18 Sep 2023 22:43:16 -0400 Subject: SL-19242: Typo in changing from inline to reusable action. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8a477e1a29..cbdbac65cd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -317,7 +317,7 @@ jobs: path: artifacts - name: Reshuffle artifact files - run: secondlife/viewer-build-util/release-artifacts@main + uses: secondlife/viewer-build-util/release-artifacts@main with: input-path: artifacts output-path: assets -- cgit v1.3 From 763fcb02b89ae8e2149127f420bb5d9ca1594ccc Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 19 Sep 2023 09:15:30 -0400 Subject: SL-19242: Move comments out of YAML parameter text. --- .github/workflows/build.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cbdbac65cd..bb1b8bb08b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -321,20 +321,20 @@ jobs: with: input-path: artifacts output-path: assets - exclude: | - # The *-app artifacts are for use only by the signing and - # packaging steps. Once we've generated signed installers, we no - # longer need them, and we CERTAINLY don't want to publish - # thousands of individual files as separate URLs. + # The *-app artifacts are for use only by the signing and + # packaging steps. Once we've generated signed installers, we no + # longer need them, and we CERTAINLY don't want to publish + # thousands of individual files as separate URLs. + exclude: |- Windows-app macOS-app - prefix: | - # Use just "Windows" or "macOS" prefix because these are the only - # artifacts in which we expect files from both platforms with - # colliding names (e.g. autobuild-package.xml). release-artifacts - # normally resolves collisions by prepending the artifact name, so - # when we anticipate collisions, it's good to keep the prefix - # short and sweet. + # Use just "Windows" or "macOS" prefix because these are the only + # artifacts in which we expect files from both platforms with + # colliding names (e.g. autobuild-package.xml). release-artifacts + # normally resolves collisions by prepending the artifact name, so + # when we anticipate collisions, it's good to keep the prefix + # short and sweet. + prefix: |- Windows-metadata=Windows macOS-metadata=macOS -- cgit v1.3 From e8dfbbaf880314359c0c2d18c944199e3f26db07 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 20 Sep 2023 11:34:56 -0400 Subject: SL-19242: Pass channel and imagename to sign-pkg-mac/action.yaml. The viewer_manifest.py logic to determine the name of the viewer installer .dmg is a little convoluted. Make it tell viewer-build-util/sign-pkg-mac that name, rather than passing it all the relevant inputs and composing it redundantly. sign-pkg-mac also wants the viewer channel to determine the application name. --- .github/workflows/build.yaml | 4 ++++ indra/newview/viewer_manifest.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index bb1b8bb08b..b010115e9c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -24,6 +24,7 @@ jobs: outputs: viewer_channel: ${{ steps.build.outputs.viewer_channel }} viewer_version: ${{ steps.build.outputs.viewer_version }} + imagename: ${{ steps.build.outputs.imagename }} env: AUTOBUILD_ADDRSIZE: 64 AUTOBUILD_BUILD_ID: ${{ github.run_id }} @@ -280,6 +281,9 @@ jobs: steps: - name: Sign and package Mac viewer uses: secondlife/viewer-build-util/sign-pkg-mac@main + with: + channel: ${{ needs.build.outputs.viewer_channel }} + imagename: ${{ needs.build.outputs.imagename }} post-windows-symbols: needs: build diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 0c54981af3..10f38fa7d8 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -1273,6 +1273,7 @@ class DarwinManifest(ViewerManifest): volname=CHANNEL_VENDOR_BASE+" Installer" # DO NOT CHANGE without understanding comment above imagename = self.installer_base_name() + self.set_github_output('imagename', imagename) sparsename = imagename + ".sparseimage" finalname = imagename + ".dmg" @@ -1292,7 +1293,7 @@ class DarwinManifest(ViewerManifest): try: devfile = re.search("/dev/disk([0-9]+)[^s]", hdi_output).group(0).strip() - volpath = re.search('HFS\s+(.+)', hdi_output).group(1).strip() + volpath = re.search(r'HFS\s+(.+)', hdi_output).group(1).strip() # Copy everything in to the mounted .dmg -- cgit v1.3 From 50e3d4020d2431d01ae3b8c6cc28c49a2762d267 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 25 Sep 2023 11:19:38 -0400 Subject: SL-19242: Reference the actual stored GitHub repo secrets. Add a Mac signing step to unpack the credentials bundled into NOTARIZE_CREDS_MACOS so viewer-build-util/sign-pkg-mac need not know about that peculiarity of our secrets formatting. --- .github/workflows/build.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b010115e9c..d7bc4a84af 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -279,11 +279,36 @@ jobs: needs: build runs-on: macos-latest steps: + - name: Unpack Mac notarization credentials + id: note-creds + shell: bash + run: | + # In NOTARIZE_CREDS_MACOS we expect to find: + # USERNAME="..." + # PASSWORD="..." + # ASC_PROVIDER="..." + eval "${{ secrets.NOTARIZE_CREDS_MACOS }} + echo "::add-mask::$USERNAME" + echo "::add-mask::$PASSWORD" + echo "::add-mask::$ASC_PROVIDER" + echo "note_user=$USERNAME" >> "$GITHUB_OUTPUT" + echo "note_pass=$PASSWORD" >> "$GITHUB_OUTPUT" + echo "note_asc=$ASC_PROVIDER" >> "$GITHUB_OUTPUT" + # If we didn't manage to retrieve all of these credentials, better + # find out sooner than later. + [[ -n "$USERNAME" && -n "$PASSWORD && -n "$ASC_PROVIDER" ]] + - name: Sign and package Mac viewer uses: secondlife/viewer-build-util/sign-pkg-mac@main with: channel: ${{ needs.build.outputs.viewer_channel }} imagename: ${{ needs.build.outputs.imagename }} + cert_base64: ${{ secrets.SIGNING_CERT_MACOS }} + cert_name: ${{ secrets.SIGNING_CERT_MACOS_IDENTITY }} + cert_pass: ${{ secrets.SIGNING_CERT_MACOS_PASSWORD }} + note_user: ${{ steps.note-creds.outputs.note_user }} + note_pass: ${{ steps.note-creds.outputs.note_pass }} + note_asc: ${{ steps.note-creds.outputs.note_asc }} post-windows-symbols: needs: build -- cgit v1.3 From d2d3599080d7011aa45fc72922d4d46378d95bc8 Mon Sep 17 00:00:00 2001 From: Brad Linden Date: Mon, 25 Sep 2023 12:47:03 -0700 Subject: Attempt to fix SL-19242 notarize creds secrets loading --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d7bc4a84af..18f17a2084 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -287,7 +287,7 @@ jobs: # USERNAME="..." # PASSWORD="..." # ASC_PROVIDER="..." - eval "${{ secrets.NOTARIZE_CREDS_MACOS }} + eval "${{ secrets.NOTARIZE_CREDS_MACOS }}" echo "::add-mask::$USERNAME" echo "::add-mask::$PASSWORD" echo "::add-mask::$ASC_PROVIDER" @@ -296,7 +296,7 @@ jobs: echo "note_asc=$ASC_PROVIDER" >> "$GITHUB_OUTPUT" # If we didn't manage to retrieve all of these credentials, better # find out sooner than later. - [[ -n "$USERNAME" && -n "$PASSWORD && -n "$ASC_PROVIDER" ]] + [[ -n "$USERNAME" && -n "$PASSWORD" && -n "$ASC_PROVIDER" ]] - name: Sign and package Mac viewer uses: secondlife/viewer-build-util/sign-pkg-mac@main -- cgit v1.3 From e2ea42cb6a078d250a5d1c7ee81be355bde669bc Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 2 Oct 2023 16:52:11 -0400 Subject: SL-19242: Expect and pass Apple "Team ID" rather than "ASC Provider". "ASC Provider" was a credential accepted by altool, but switching from altool to notarytool requires a Team ID instead. Expect to find TEAM_ID in our repository secret NOTARIZE_CREDS_MACOS. Extract it and pass it to sign-pkg-mac. --- .github/workflows/build.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 18f17a2084..d1f617f301 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -286,17 +286,17 @@ jobs: # In NOTARIZE_CREDS_MACOS we expect to find: # USERNAME="..." # PASSWORD="..." - # ASC_PROVIDER="..." + # TEAM_ID="..." eval "${{ secrets.NOTARIZE_CREDS_MACOS }}" echo "::add-mask::$USERNAME" echo "::add-mask::$PASSWORD" - echo "::add-mask::$ASC_PROVIDER" + echo "::add-mask::$TEAM_ID" echo "note_user=$USERNAME" >> "$GITHUB_OUTPUT" echo "note_pass=$PASSWORD" >> "$GITHUB_OUTPUT" - echo "note_asc=$ASC_PROVIDER" >> "$GITHUB_OUTPUT" + echo "note_team=$TEAM_ID" >> "$GITHUB_OUTPUT" # If we didn't manage to retrieve all of these credentials, better # find out sooner than later. - [[ -n "$USERNAME" && -n "$PASSWORD" && -n "$ASC_PROVIDER" ]] + [[ -n "$USERNAME" && -n "$PASSWORD" && -n "$TEAM_ID" ]] - name: Sign and package Mac viewer uses: secondlife/viewer-build-util/sign-pkg-mac@main @@ -308,7 +308,7 @@ jobs: cert_pass: ${{ secrets.SIGNING_CERT_MACOS_PASSWORD }} note_user: ${{ steps.note-creds.outputs.note_user }} note_pass: ${{ steps.note-creds.outputs.note_pass }} - note_asc: ${{ steps.note-creds.outputs.note_asc }} + note_team: ${{ steps.note-creds.outputs.note_team }} post-windows-symbols: needs: build -- cgit v1.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. --- .github/workflows/build.yaml | 15 +- .github/workflows/pre-commit.yaml | 2 +- build.sh | 4 - indra/newview/viewer_manifest.py | 323 ++------------------------------------ 4 files changed, 20 insertions(+), 324 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d1f617f301..cb3212d56a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -57,7 +57,7 @@ jobs: variants: ${{ matrix.configuration }} steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha || github.sha }} @@ -67,14 +67,14 @@ jobs: python-version: ${{ matrix.python-version }} - name: Checkout build variables - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: secondlife/build-variables ref: viewer path: .build-variables - name: Checkout master-message-template - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: secondlife/master-message-template path: .master-message-template @@ -212,15 +212,6 @@ jobs: fi echo "artifact=$RUNNER_OS$cfg_suffix" >> $GITHUB_OUTPUT - - name: Upload installer - if: matrix.configuration != 'ReleaseOS' - uses: actions/upload-artifact@v3 - with: - name: "${{ steps.build.outputs.artifact }}-installer" - # emitted by build.sh, possibly multiple lines - path: | - ${{ steps.build.outputs.installer }} - - name: Upload executable if: matrix.configuration != 'ReleaseOS' && steps.build.outputs.viewer_app uses: actions/upload-artifact@v3 diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index 17c0ace02f..d626eef38d 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -11,7 +11,7 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: python-version: 3.x 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. diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 5039f3db83..7db0b75319 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -428,10 +428,11 @@ class ViewerManifest(LLManifest): print(delim, file=outf) -class WindowsManifest(ViewerManifest): +class Windows_x86_64_Manifest(ViewerManifest): # We want the platform, per se, for every Windows build to be 'win'. The # VMP will concatenate that with the address_size. build_data_json_platform = 'win' + address_size = 64 def final_exe(self): return self.exec_name()+".exe" @@ -492,7 +493,7 @@ class WindowsManifest(ViewerManifest): print("Doesn't exist:", src) def construct(self): - super(WindowsManifest, self).construct() + super().construct() pkgdir = os.path.join(self.args['build'], os.pardir, 'packages') relpkgdir = os.path.join(pkgdir, "lib", "release") @@ -575,20 +576,12 @@ class WindowsManifest(ViewerManifest): self.path("SLVoice.exe") # Vivox libraries - if (self.address_size == 64): - self.path("vivoxsdk_x64.dll") - self.path("ortp_x64.dll") - else: - self.path("vivoxsdk.dll") - self.path("ortp.dll") + self.path("vivoxsdk_x64.dll") + self.path("ortp_x64.dll") # OpenSSL - if (self.address_size == 64): - self.path("libcrypto-1_1-x64.dll") - self.path("libssl-1_1-x64.dll") - else: - self.path("libcrypto-1_1.dll") - self.path("libssl-1_1.dll") + self.path("libcrypto-1_1-x64.dll") + self.path("libssl-1_1-x64.dll") # HTTP/2 self.path("nghttp2.dll") @@ -598,14 +591,9 @@ class WindowsManifest(ViewerManifest): # BugSplat if self.args.get('bugsplat'): - if(self.address_size == 64): - self.path("BsSndRpt64.exe") - self.path("BugSplat64.dll") - self.path("BugSplatRc64.dll") - else: - self.path("BsSndRpt.exe") - self.path("BugSplat.dll") - self.path("BugSplatRc.dll") + self.path("BsSndRpt64.exe") + self.path("BugSplat64.dll") + self.path("BugSplatRc64.dll") self.path(src="licenses-win32.txt", dst="licenses.txt") self.path("featuretable.txt") @@ -767,8 +755,7 @@ class WindowsManifest(ViewerManifest): 'version' : '.'.join(self.args['version']), 'version_short' : '.'.join(self.args['version'][:-1]), 'version_dashes' : '-'.join(self.args['version']), - 'version_registry' : '%s(%s)' % - ('.'.join(self.args['version']), self.address_size), + 'version_registry' : '%s(64)' % '.'.join(self.args['version']), 'final_exe' : self.final_exe(), 'flags':'', 'app_name':self.app_name(), @@ -800,12 +787,8 @@ class WindowsManifest(ViewerManifest): Caption "%(caption)s" """ - if(self.address_size == 64): - engage_registry="SetRegView 64" - program_files="!define MULTIUSER_USE_PROGRAMFILES64" - else: - engage_registry="SetRegView 32" - program_files="" + engage_registry="SetRegView 64" + program_files="!define MULTIUSER_USE_PROGRAMFILES64" # Dump the installers/windows directory into the raw app image tree # because NSIS needs those files. But don't use path() because we @@ -830,72 +813,10 @@ class WindowsManifest(ViewerManifest): "%%ENGAGEREGISTRY%%":engage_registry, "%%DELETE_FILES%%":self.nsi_file_commands(False)}) - # If we're on a build machine, sign the code using our Authenticode certificate. JC - # note that the enclosing setup exe is signed later, after the makensis makes it. - # Unlike the viewer binary, the VMP filenames are invariant with respect to version, os, etc. - for exe in ( - self.final_exe(), - "SLVersionChecker.exe", - "llplugin/dullahan_host.exe", - ): - self.sign(exe) - - # Check two paths, one for Program Files, and one for Program Files (x86). - # Yay 64bit windows. - nsis_path = "makensis.exe" - try: - for program_files in os.getenv('programfiles'), os.getenv('programfiles(x86)'): - if program_files: - for subpath in 'NSIS', r'NSIS\Unicode': - possible_path = os.path.join(program_files, subpath, nsis_path) - if os.path.isfile(possible_path): - nsis_path = possible_path - # don't just break: we need to exit multiple - # levels of 'for' loop - raise StopIteration() - except StopIteration: - pass - - # Because we've written relative pathnames into tempfile, run nsis - # with their base directory as current. - try: - self.run_command([nsis_path, '/V2', tempfile], cwd=self.get_dst_prefix()) - except ManifestError as err: - print(f' {tempfile} '.center(72, '=')) - with open(self.dst_path_of(tempfile)) as nsi: - for line in nsi: - print(line, end='') # already includes '\n' - print(72 * '=') - raise - - self.sign(installer_file) - self.created_path(self.dst_path_of(installer_file)) - self.package_file = installer_file - - def sign(self, exe): - sign_py = os.environ.get('SIGN', r'C:\buildscripts\code-signing\sign.py') - python = os.environ.get('PYTHON', sys.executable) - if os.path.exists(sign_py): - dst_path = self.dst_path_of(exe) - print("about to run signing of: ", dst_path) - self.run_command([python, sign_py, dst_path]) - else: - print("Skipping code signing of %s %s: %s not found" % (self.dst_path_of(exe), exe, sign_py)) - - def escape_slashes(self, path): - return path.replace('\\', '\\\\\\\\') -class Windows_i686_Manifest(WindowsManifest): - # Although we aren't literally passed ADDRESS_SIZE, we can infer it from - # the passed 'arch', which is used to select the specific subclass. - address_size = 32 - -class Windows_x86_64_Manifest(WindowsManifest): - address_size = 64 - - -class DarwinManifest(ViewerManifest): +class Darwin_x86_64_Manifest(ViewerManifest): build_data_json_platform = 'mac' + address_size = 64 def finish_build_data_dict(self, build_data_dict): build_data_dict.update({'Bundle Id':self.args['bundleid']}) @@ -1012,7 +933,7 @@ class DarwinManifest(ViewerManifest): with self.prefix(dst="Resources"): # defer cross-platform file copies until we're in the # nested Resources directory - super(DarwinManifest, self).construct() + super().construct() # need .icns file referenced by Info.plist with self.prefix(src=self.icon_path(), dst="") : @@ -1260,221 +1181,9 @@ class DarwinManifest(ViewerManifest): self.path( "plugins.dat" ) def package_finish(self): - global CHANNEL_VENDOR_BASE - # MBW -- If the mounted volume name changes, it breaks the .DS_Store's background image and icon positioning. - # If we really need differently named volumes, we'll need to create multiple DS_Store file images, or use some other trick. - - volname=CHANNEL_VENDOR_BASE+" Installer" # DO NOT CHANGE without understanding comment above - imagename = self.installer_base_name() self.set_github_output('imagename', imagename) - sparsename = imagename + ".sparseimage" - finalname = imagename + ".dmg" - # make sure we don't have stale files laying about - self.remove(sparsename, finalname) - - self.run_command(['hdiutil', 'create', sparsename, - '-volname', volname, '-fs', 'HFS+', - '-type', 'SPARSE', '-megabytes', '1300', - '-layout', 'SPUD']) - - # mount the image and get the name of the mount point and device node - try: - hdi_output = subprocess.check_output(['hdiutil', 'attach', '-private', sparsename], text=True) - except subprocess.CalledProcessError as err: - sys.exit("failed to mount image at '%s'" % sparsename) - - try: - devfile = re.search("/dev/disk([0-9]+)[^s]", hdi_output).group(0).strip() - volpath = re.search(r'HFS\s+(.+)', hdi_output).group(1).strip() - - # Copy everything in to the mounted .dmg - - app_name = self.app_name() - - # Hack: - # Because there is no easy way to coerce the Finder into positioning - # the app bundle in the same place with different app names, we are - # adding multiple .DS_Store files to svn. There is one for release, - # one for release candidate and one for first look. Any other channels - # will use the release .DS_Store, and will look broken. - # - Ambroff 2008-08-20 - dmg_template = os.path.join( - 'installers', 'darwin', '%s-dmg' % self.channel_type()) - - if not os.path.exists (self.src_path_of(dmg_template)): - dmg_template = os.path.join ('installers', 'darwin', 'release-dmg') - - for s,d in list({self.get_dst_prefix():app_name + ".app", - os.path.join(dmg_template, "_VolumeIcon.icns"): ".VolumeIcon.icns", - os.path.join(dmg_template, "background.jpg"): "background.jpg", - os.path.join(dmg_template, "_DS_Store"): ".DS_Store"}.items()): - print("Copying to dmg", s, d) - self.copy_action(self.src_path_of(s), os.path.join(volpath, d)) - - # Hide the background image, DS_Store file, and volume icon file (set their "visible" bit) - for f in ".VolumeIcon.icns", "background.jpg", ".DS_Store": - pathname = os.path.join(volpath, f) - self.run_command(['SetFile', '-a', 'V', pathname]) - - # Create the alias file (which is a resource file) from the .r - self.run_command( - ['Rez', self.src_path_of("installers/darwin/release-dmg/Applications-alias.r"), - '-o', os.path.join(volpath, "Applications")]) - - # Set the alias file's alias and custom icon bits - self.run_command(['SetFile', '-a', 'AC', os.path.join(volpath, "Applications")]) - - # Set the disk image root's custom icon bit - self.run_command(['SetFile', '-a', 'C', volpath]) - - # Sign the app if requested; - # do this in the copy that's in the .dmg so that the extended attributes used by - # the signature are preserved; moving the files using python will leave them behind - # and invalidate the signatures. - if 'signature' in self.args: - app_in_dmg=os.path.join(volpath,self.app_name()+".app") - print("Attempting to sign '%s'" % app_in_dmg) - identity = self.args['signature'] - if identity == '': - identity = 'Developer ID Application' - - # Look for an environment variable set via build.sh when running in Team City. - try: - build_secrets_checkout = os.environ['build_secrets_checkout'] - except KeyError: - pass - else: - # variable found so use it to unlock keychain followed by codesign - home_path = os.environ['HOME'] - keychain_pwd_path = os.path.join(build_secrets_checkout,'code-signing-osx','password.txt') - keychain_pwd = open(keychain_pwd_path).read().rstrip() - - # Note: As of macOS Sierra, keychains are created with - # names postfixed with '-db' so for example, the SL - # Viewer keychain would by default be found in - # ~/Library/Keychains/viewer.keychain-db instead of - # just ~/Library/Keychains/viewer.keychain in - # earlier versions. - # - # Because we have old OS files from previous - # versions of macOS on the build hosts, the - # configurations are different on each host. Some - # have viewer.keychain, some have viewer.keychain-db - # and some have both. As you can see in the line - # below, this script expects the Linden Developer - # cert/keys to be in viewer.keychain. - # - # To correctly sign builds you need to make sure - # ~/Library/Keychains/viewer.keychain exists on the - # host and that it contains the correct cert/key. If - # a build host is set up with a clean version of - # macOS Sierra (or later) then you will need to - # change this line (and the one for 'codesign' - # command below) to point to right place or else - # pull in the cert/key into the default viewer - # keychain 'viewer.keychain-db' and export it to - # 'viewer.keychain' - viewer_keychain = os.path.join(home_path, 'Library', - 'Keychains', 'viewer.keychain') - self.run_command(['security', 'unlock-keychain', - '-p', keychain_pwd, viewer_keychain]) - sign_retries=3 - sign_retry_wait=15 - resources = app_in_dmg + "/Contents/Resources/" - plain_sign = glob.glob(resources + "llplugin/*.dylib") - deep_sign = [ - resources + "updater/SLVersionChecker", - resources + "SLPlugin.app/Contents/MacOS/SLPlugin", - app_in_dmg, - ] - for attempt in range(sign_retries): - if attempt: # second or subsequent iteration - print(f"codesign attempt {attempt+1} failed, " - f"waiting {sign_retry_wait:d} seconds before retrying", - file=sys.stderr) - time.sleep(sign_retry_wait) - sign_retry_wait*=2 - - try: - # Note: See blurb above about names of keychains - for signee in plain_sign: - self.run_command( - ['codesign', - '--force', - '--timestamp', - '--keychain', viewer_keychain, - '--sign', identity, - signee]) - for signee in deep_sign: - self.run_command( - ['codesign', - '--verbose', - '--deep', - '--force', - '--entitlements', self.src_path_of("slplugin.entitlements"), - '--options', 'runtime', - '--keychain', viewer_keychain, - '--sign', identity, - signee]) - break # if no exception was raised, the codesign worked - except ManifestError as err: - # 'err' goes out of scope - sign_failed = err - else: - print(f"{sign_retries} codesign attempts failed; giving up", - file=sys.stderr) - raise sign_failed - self.run_command(['spctl', '-a', '-texec', '-vvvv', app_in_dmg]) - self.run_command([self.src_path_of("installers/darwin/apple-notarize.sh"), - app_in_dmg]) - - finally: - # Unmount the image even if exceptions from any of the above - detach_retries = 3 - detach_retry_wait = 2 - # Empirically, on GitHub we've hit errors like: - # hdiutil: couldn't eject "disk10" - Resource busy - for attempt in range(detach_retries): - if attempt: # second or subsequent iteration - print(f'detach failed, waiting {detach_retry_wait} seconds before retrying', - file=sys.stderr) - # Try waiting a bit to see if that improves reliability. - time.sleep(detach_retry_wait) - detach_retry_wait *= 2 - - try: - self.run_command(['hdiutil', 'detach', '-force', devfile]) - # if no exception, the detach worked - break - except ManifestError as err: - detach_failed = err - else: - print(f'{detach_retries} detach attempts failed', file=sys.stderr) - ## can we carry on anyway?? - ## raise detach_failed - - print("Converting temp disk image to final disk image") - self.run_command(['hdiutil', 'convert', sparsename, '-format', 'UDZO', - '-imagekey', 'zlib-level=9', '-o', finalname]) - # get rid of the temp file - self.package_file = finalname - self.remove(sparsename) - - -class Darwin_i386_Manifest(DarwinManifest): - address_size = 32 - - -class Darwin_i686_Manifest(DarwinManifest): - """alias in case arch is passed as i686 instead of i386""" - pass - - -class Darwin_x86_64_Manifest(DarwinManifest): - address_size = 64 - class LinuxManifest(ViewerManifest): build_data_json_platform = 'lnx' -- cgit v1.3 From 764897839788d3bc19d564cf074675f498b5a77c Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 5 Oct 2023 15:25:54 -0400 Subject: SL-18837: Name the release for the build number to readily find it. --- .github/workflows/build.yaml | 3 +++ 1 file changed, 3 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cb3212d56a..2def307b94 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -361,6 +361,9 @@ jobs: # forked from softprops/action-gh-release - uses: secondlife-3p/action-gh-release@v1 with: + # name the release page for the build number so we can find it + # easily (analogous to looking up a codeticket build page) + name: "v${{ github.run_id }}" prerelease: true generate_release_notes: true # the only reason we generate a GH release is to post build products -- cgit v1.3 From 549e56572b821e8cfc15e591ce13861c2913d7c0 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 12 Oct 2023 17:25:30 -0400 Subject: PIE-1057: Engage viewer-build-util azure branch. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2def307b94..6c88c2ca5c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -262,7 +262,7 @@ jobs: echo "$SIGNING_CERT_WINDOWS" | base64 --decode > .cert/authenticode-cert.pfx - name: Sign and package Windows viewer - uses: secondlife/viewer-build-util/sign-pkg-windows@main + uses: secondlife/viewer-build-util/sign-pkg-windows@azure with: certificate: .cert/authenticode-cert.pfx -- cgit v1.3 From f6d872a027834bc83ee51d488336de933b703f74 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 13 Oct 2023 15:11:30 -0400 Subject: PIE-1057: Pass sign-pkg-windows@azure the Azure-related secrets. --- .github/workflows/build.yaml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6c88c2ca5c..daa647f257 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -253,18 +253,14 @@ jobs: needs: build runs-on: windows steps: - - name: Decode certificate file - shell: bash - env: - SIGNING_CERT_WINDOWS: ${{ secrets.SIGNING_CERT_WINDOWS }} - run: | - mkdir -p .cert - echo "$SIGNING_CERT_WINDOWS" | base64 --decode > .cert/authenticode-cert.pfx - - name: Sign and package Windows viewer uses: secondlife/viewer-build-util/sign-pkg-windows@azure with: - certificate: .cert/authenticode-cert.pfx + vault_uri: "${{ secrets.AZURE_KEY_VAULT_URI }}" + cert_name: "${{ secrets.AZURE_CERT_NAME }}" + client_id: "${{ secrets.AZURE_CLIENT_ID }}" + client_secret: "${{ secrets.AZURE_CLIENT_SECRET }}" + tenant_id: "${{ secrets.AZURE_TENANT_ID }}" sign-and-package-mac: needs: build -- cgit v1.3 From 2e8e96cfbcb383a667d1b938f364f0bbafcad5b4 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 18 Oct 2023 17:44:07 -0400 Subject: PIE-1057: viewer-build-util's azure branch has been merged to main. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index daa647f257..33a8cffa3f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -254,7 +254,7 @@ jobs: runs-on: windows steps: - name: Sign and package Windows viewer - uses: secondlife/viewer-build-util/sign-pkg-windows@azure + uses: secondlife/viewer-build-util/sign-pkg-windows@main with: vault_uri: "${{ secrets.AZURE_KEY_VAULT_URI }}" cert_name: "${{ secrets.AZURE_CERT_NAME }}" -- cgit v1.3 From e4d6a08941f9c4e81bda8ae14d481be5029353fd Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 25 Oct 2023 14:39:31 -0400 Subject: SL-18837: Build all branches on GitHub now. --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 33a8cffa3f..1cd0c2526f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,7 +4,7 @@ on: workflow_dispatch: pull_request: push: - branches: [main, "actions*"] + branches: ["*"] tags: ["*"] jobs: -- cgit v1.3 From 9b50c50bf2fe3fab2dbb0bcd18d7c8f5b9a13a1b Mon Sep 17 00:00:00 2001 From: Bennett Goble Date: Sun, 19 Nov 2023 19:35:40 -0800 Subject: Only download release artifacts for release Only download and publish installers on public releases. This simplifies the release process, as the flatten_files utility from viewer-build-utils is not necessary this way. More importantly, it doesn't clutter public releases with files that shouldn't be published such as debug symbols. --- .github/workflows/build.yaml | 48 ++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 22 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1cd0c2526f..d1737eeda4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -330,29 +330,29 @@ jobs: steps: - uses: actions/download-artifact@v3 with: - path: artifacts + name: Windows-installer - - name: Reshuffle artifact files - uses: secondlife/viewer-build-util/release-artifacts@main + - uses: actions/download-artifact@v3 + with: + name: macOS-installer + + - uses: actions/download-artifact@v3 with: - input-path: artifacts - output-path: assets - # The *-app artifacts are for use only by the signing and - # packaging steps. Once we've generated signed installers, we no - # longer need them, and we CERTAINLY don't want to publish - # thousands of individual files as separate URLs. - exclude: |- - Windows-app - macOS-app - # Use just "Windows" or "macOS" prefix because these are the only - # artifacts in which we expect files from both platforms with - # colliding names (e.g. autobuild-package.xml). release-artifacts - # normally resolves collisions by prepending the artifact name, so - # when we anticipate collisions, it's good to keep the prefix - # short and sweet. - prefix: |- - Windows-metadata=Windows - macOS-metadata=macOS + name: Windows-metadata + + - name: Rename windows metadata + run: | + mv autobuild-package.xml Windows-autobuild-package.xml + mv newview/viewer_version.txt Windows-viewer_version.txt + + - uses: actions/download-artifact@v3 + with: + name: macOS-metadata + + - name: Rename macOS metadata + run: | + mv autobuild-package.xml macOS-autobuild-package.xml + mv newview/viewer_version.txt macOS-viewer_version.txt # forked from softprops/action-gh-release - uses: secondlife-3p/action-gh-release@v1 @@ -364,4 +364,8 @@ jobs: generate_release_notes: true # the only reason we generate a GH release is to post build products fail_on_unmatched_files: true - files: "assets/*" + files: | + *.dmg + *.exe + *-autobuild-package.xml + *-viewer_version.txt -- cgit v1.3 From c0ab8b8f0cb1fb0b02bb42b5f7b2e8709bee5415 Mon Sep 17 00:00:00 2001 From: Bennett Goble Date: Mon, 20 Nov 2023 16:23:05 -0800 Subject: Switch to viewer-build-util@v1 Switch the build workflow from targeting the `main` branch of viewer-build-util (which may receive breaking changes) to the stable `v1` major version tag. --- .github/workflows/build.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1cd0c2526f..d8b9b5e8e0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -254,7 +254,7 @@ jobs: runs-on: windows steps: - name: Sign and package Windows viewer - uses: secondlife/viewer-build-util/sign-pkg-windows@main + uses: secondlife/viewer-build-util/sign-pkg-windows@v1 with: vault_uri: "${{ secrets.AZURE_KEY_VAULT_URI }}" cert_name: "${{ secrets.AZURE_CERT_NAME }}" @@ -286,7 +286,7 @@ jobs: [[ -n "$USERNAME" && -n "$PASSWORD" && -n "$TEAM_ID" ]] - name: Sign and package Mac viewer - uses: secondlife/viewer-build-util/sign-pkg-mac@main + uses: secondlife/viewer-build-util/sign-pkg-mac@v1 with: channel: ${{ needs.build.outputs.viewer_channel }} imagename: ${{ needs.build.outputs.imagename }} @@ -302,7 +302,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Post Windows symbols - uses: secondlife/viewer-build-util/post-bugsplat-windows@main + uses: secondlife/viewer-build-util/post-bugsplat-windows@v1 with: username: ${{ secrets.BUGSPLAT_USER }} password: ${{ secrets.BUGSPLAT_PASS }} @@ -315,7 +315,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Post Mac symbols - uses: secondlife/viewer-build-util/post-bugsplat-mac@main + uses: secondlife/viewer-build-util/post-bugsplat-mac@v1 with: username: ${{ secrets.BUGSPLAT_USER }} password: ${{ secrets.BUGSPLAT_PASS }} @@ -333,7 +333,7 @@ jobs: path: artifacts - name: Reshuffle artifact files - uses: secondlife/viewer-build-util/release-artifacts@main + uses: secondlife/viewer-build-util/release-artifacts@v1 with: input-path: artifacts output-path: assets -- cgit v1.3