Skip to content

Split Viewer and Test builds into separate jobs in GHA to reduce potential for disk space exhaustion#5168

Merged
akleshchev merged 1 commit intosecondlife:develop-linuxfrom
RyeMutt:rye/fixbuildfail
Dec 17, 2025
Merged

Split Viewer and Test builds into separate jobs in GHA to reduce potential for disk space exhaustion#5168
akleshchev merged 1 commit intosecondlife:develop-linuxfrom
RyeMutt:rye/fixbuildfail

Conversation

@RyeMutt
Copy link
Copy Markdown
Contributor

@RyeMutt RyeMutt commented Dec 17, 2025

Description

Splits Viewer and Test builds into separate jobs in GHA to reduce potential for disk space exhaustion

Related Issues

Issue Link: #4677


Checklist

Please ensure the following before requesting review:

  • I have provided a clear title and detailed description for this pull request.
  • If useful, I have included media such as screenshots and video to show off my changes.
  • The PR is linked to a relevant issue with sufficient context.
  • I have tested the changes locally and verified they work as intended.
  • All new and existing tests pass.
  • Code follows the project's style guidelines.
  • Documentation has been updated if needed.
  • Any dependent changes have been merged and published in downstream modules
  • I have reviewed the contributing guidelines.

Additional Notes

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR splits Viewer and Test builds into separate GitHub Actions matrix jobs to mitigate disk space exhaustion issues. The changes introduce a new build_variant matrix dimension with values Viewer and Tests, and modify the build script to handle test execution separately from viewer builds.

Key Changes

  • Added a build_variant matrix dimension to create separate job instances for Viewer and Tests builds
  • Modified build.sh to support a build_tests mode that only builds and runs tests, skipping viewer-specific build steps
  • Adjusted artifact upload conditions to only run for Viewer builds, as test builds don't produce viewer artifacts

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/build.yaml Added build_variant matrix dimension, updated environment variables to conditionally set build_viewer and build_tests, modified artifact upload conditions to only run for Viewer builds, updated cache keys to include build variant, removed macOS disk cleanup, and restricted Linux disk cleanup to Viewer builds only
build.sh Added TESTING variable initialization, added conditional logic to check build_tests flag and set TESTING=ON, modified build() function to handle test builds separately with BUILD_AND_RUN_TESTS target, removed inline ctest execution from viewer build path

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

matrix:
runner: ${{ fromJson((github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/Second_Life')) && '["windows-large","macos-15-xlarge","linux-large"]' || '["windows-2022","macos-15-xlarge","ubuntu-22.04"]') }}
configuration: ${{ fromJson(needs.setup.outputs.configurations) }}
build_variant: [Viewer, Tests]
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding the build_variant matrix dimension creates multiple build job instances for each runner/configuration combination. This causes downstream jobs (sign-and-package-windows, sign-and-package-mac, post-windows-symbols, post-mac-symbols) to have ambiguous dependencies since they use "needs: build" but there are now multiple build jobs (Viewer and Tests).

The downstream jobs will fail because GitHub Actions cannot determine which build job output to use. Consider either:

  1. Adding a conditional to exclude the Tests variant from the matrix (e.g., using matrix.exclude)
  2. Filtering downstream jobs to only run for the Viewer variant
  3. Separating the build job outputs for Viewer vs Tests variants

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure copilot is correct about causing the downstream jobs to fail. The build job only outputs artifacts when running the Viewer variant and I've been using an extremely similar build.yaml in alchemy for nearly a year.

Comment thread .github/workflows/build.yaml
…ntial for disk space exhaustion

Signed-off-by: Rye <rye@alchemyviewer.org>
@akleshchev akleshchev merged commit 3ff35b8 into secondlife:develop-linux Dec 17, 2025
16 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 17, 2025
@RyeMutt RyeMutt deleted the rye/fixbuildfail branch December 19, 2025 18:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants