summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2023-06-07 13:46:29 -0700
committerBrad Linden <brad@lindenlab.com>2023-06-07 14:02:01 -0700
commitf57de07f73871bc7be6c338ea18893a494d104eb (patch)
treec79bc6260a8d4eb7053cbac91f40282522845f93 /.github
parent8140dd050e8eddcb8c513200fdca3adfa566853a (diff)
Attempt to port some build.yaml improvements from DRTVWR-559 over to actions branch
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yaml47
1 files changed, 34 insertions, 13 deletions
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