summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-05-13 13:46:42 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-05-13 13:46:42 -0400
commita4d2574df2af19f5baa57bf27b5c5f888b765ede (patch)
tree0b3901ae55362543befc788aad6fea241815b899 /.github
parent4f70946048def860e54117ce03f4e9e57c415491 (diff)
Run ReleaseOS builds, but only when a release page is requested.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yaml35
1 files changed, 26 insertions, 9 deletions
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index c500b3592d..3bf7964ba2 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -7,17 +7,24 @@ on:
branches: ["main", "release/*", "project/*"]
tags: ["Second_Life*"]
+env:
+ # Build with a tag like "Second_Life#abcdef0" to generate a release page
+ # (used for builds we are planning to deploy).
+ RELEASE_RUN: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life') && 'Y' }}
+
jobs:
build:
strategy:
matrix:
runner: [windows-large, macos-12-xl]
configuration: [Release]
+ Linden: [true]
include:
- runner: macos-12-xl
developer_dir: "/Applications/Xcode_14.0.1.app/Contents/Developer"
- runner: windows-large
configuration: ReleaseOS
+ Linden: false
runs-on: ${{ matrix.runner }}
outputs:
viewer_channel: ${{ steps.build.outputs.viewer_channel }}
@@ -39,7 +46,10 @@ jobs:
AUTOBUILD_VSVER: "170"
DEVELOPER_DIR: ${{ matrix.developer_dir }}
# Ensure that Linden viewer builds engage Bugsplat.
- BUGSPLAT_DB: ${{ matrix.configuration != 'ReleaseOS' && 'SecondLife_Viewer_2018' || '' }}
+ BUGSPLAT_DB: ${{ matrix.Linden && 'SecondLife_Viewer_2018' || '' }}
+ # Run BUILD steps for Release configuration.
+ # Run BUILD steps for ReleaseOS configuration only for release runs.
+ BUILD: ${{ (matrix.Linden || env.RELEASE_RUN) && 'Y' || '' }}
build_coverity: false
build_log_dir: ${{ github.workspace }}/.logs
build_viewer: true
@@ -58,16 +68,19 @@ jobs:
variants: ${{ matrix.configuration }}
steps:
- name: Checkout code
+ if: env.BUILD
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Setup python
+ if: env.BUILD
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Checkout build variables
+ if: env.BUILD
uses: actions/checkout@v4
with:
repository: secondlife/build-variables
@@ -75,17 +88,20 @@ jobs:
path: .build-variables
- name: Checkout master-message-template
+ if: env.BUILD
uses: actions/checkout@v4
with:
repository: secondlife/master-message-template
path: .master-message-template
- name: Install autobuild and python dependencies
+ if: env.BUILD
run: pip3 install autobuild llsd
- name: Cache autobuild packages
- uses: actions/cache@v4
id: cache-installables
+ if: env.BUILD
+ uses: actions/cache@v4
with:
path: .autobuild-installables
key: ${{ runner.os }}-64-${{ matrix.configuration }}-${{ hashFiles('autobuild.xml') }}
@@ -94,17 +110,19 @@ jobs:
${{ runner.os }}-64-
- name: Install windows dependencies
- if: runner.os == 'Windows'
+ if: env.BUILD && runner.os == 'Windows'
run: choco install nsis-unicode
- name: Determine source branch
id: which-branch
+ if: env.BUILD
uses: secondlife/viewer-build-util/which-branch@v2
with:
token: ${{ github.token }}
- name: Build
id: build
+ if: env.BUILD
shell: bash
env:
AUTOBUILD_VCS_BRANCH: ${{ steps.which-branch.outputs.branch }}
@@ -227,7 +245,7 @@ jobs:
echo "artifact=$RUNNER_OS$cfg_suffix" >> $GITHUB_OUTPUT
- name: Upload executable
- if: matrix.configuration != 'ReleaseOS' && steps.build.outputs.viewer_app
+ if: matrix.Linden && steps.build.outputs.viewer_app
uses: actions/upload-artifact@v4
with:
name: "${{ steps.build.outputs.artifact }}-app"
@@ -237,7 +255,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.Linden
uses: actions/upload-artifact@v4
with:
name: "${{ steps.build.outputs.artifact }}-symbols"
@@ -245,7 +263,7 @@ jobs:
${{ steps.build.outputs.symbolfile }}
- name: Upload metadata
- if: matrix.configuration != 'ReleaseOS'
+ if: matrix.Linden
uses: actions/upload-artifact@v4
with:
name: "${{ steps.build.outputs.artifact }}-metadata"
@@ -256,7 +274,7 @@ jobs:
- name: Upload physics package
uses: actions/upload-artifact@v4
# should only be set for viewer-private
- if: matrix.configuration != 'ReleaseOS' && steps.build.outputs.physicstpv
+ if: matrix.Linden && steps.build.outputs.physicstpv
with:
name: "${{ steps.build.outputs.artifact }}-physics"
# emitted by build.sh, zero or one lines
@@ -362,8 +380,7 @@ jobs:
release:
needs: [build, sign-and-package-windows, sign-and-package-mac]
runs-on: ubuntu-latest
- # Build with a tag like "Second_Life#abcdef0" to generate a release page (used for builds we are planning to deploy).
- if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life')
+ if: env.RELEASE_RUN
steps:
- uses: actions/download-artifact@v4
with: