mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-09-29 12:07:05 -07:00
All StandaloneOSX matrix cells on macOS - three different Unity versions, plus two duplicate 6000.0.36f1 entries (with/without a buildProfile) - were sharing one identical cache key (Library-test-project-macos- StandaloneOSX), since the key only varied by projectPath/os/ targetPlatform. Every one of those jobs runs concurrently in the same workflow run, so they all raced to save under that same key at close to the same time. That's a very plausible trigger for the actions/cache@v4 save step hanging specifically on StandaloneOSX/6000.0.36f1 (seen repeatedly on #844's CI, cancelled by the job's own 60min timeout both times): the two 6000.0.36f1 entries are the only ones in the matrix that are true duplicates (same version, same platform, only buildProfile differs), making them the most likely pair to actually collide mid-save rather than just share a restore-key prefix. Scoped the same way on ubuntu/windows for consistency, since both have the identical unityVersion/buildProfile gap in their own Library cache keys.
97 lines
3.5 KiB
YAML
97 lines
3.5 KiB
YAML
name: Builds - MacOS
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
buildForAllPlatformsMacOS:
|
|
name: ${{ matrix.targetPlatform }} on ${{ matrix.unityVersion }}
|
|
runs-on: macos-latest
|
|
# A per-step timeout doesn't bound an action's own implicit post-run
|
|
# cleanup step (e.g. actions/cache@v4's cache-save), which is exactly
|
|
# what's been observed hanging here - real builds finish in well under
|
|
# 40m, but a hung "Post Run actions/cache@v4" step has left jobs stuck
|
|
# "in_progress" for 1.5h+. A job-level timeout is the only thing that
|
|
# bounds that too, converting a silent multi-hour hang into a clear,
|
|
# fast failure.
|
|
timeout-minutes: 60
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
projectPath:
|
|
- test-project
|
|
unityVersion:
|
|
- 2021.3.45f2
|
|
- 2022.3.62f3
|
|
- 2023.2.22f1
|
|
targetPlatform:
|
|
- StandaloneOSX # Build a MacOS executable
|
|
- iOS # Build an iOS executable
|
|
include:
|
|
# Additionally test enableGpu build for a standalone windows target
|
|
- unityVersion: 6000.0.36f1
|
|
targetPlatform: StandaloneOSX
|
|
- unityVersion: 6000.0.36f1
|
|
targetPlatform: StandaloneOSX
|
|
buildProfile: 'Assets/Settings/Build Profiles/Sample macOS Build Profile.asset'
|
|
|
|
steps:
|
|
###########################
|
|
# Checkout #
|
|
###########################
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
lfs: true
|
|
|
|
###########################
|
|
# Cache #
|
|
###########################
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: ${{ matrix.projectPath }}/Library
|
|
key: Library-${{ matrix.projectPath }}-macos-${{ matrix.targetPlatform }}-${{ matrix.unityVersion }}-${{ matrix.buildProfile }}
|
|
restore-keys: |
|
|
Library-${{ matrix.projectPath }}-macos-
|
|
Library-
|
|
|
|
###########################
|
|
# Set Scripting Backend #
|
|
###########################
|
|
- name: Set Scripting Backend To il2cpp
|
|
run: |
|
|
mv -f "./test-project/ProjectSettings/ProjectSettingsIl2cpp.asset" "./test-project/ProjectSettings/ProjectSettings.asset"
|
|
|
|
###########################
|
|
# Build #
|
|
###########################
|
|
- uses: ./
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
|
with:
|
|
buildName: 'GameCI Test Build'
|
|
projectPath: ${{ matrix.projectPath }}
|
|
unityVersion: ${{ matrix.unityVersion }}
|
|
targetPlatform: ${{ matrix.targetPlatform }}
|
|
buildProfile: ${{ matrix.buildProfile }}
|
|
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
|
|
# We use dirty build because we are replacing the default project settings file above
|
|
allowDirtyBuild: true
|
|
|
|
###########################
|
|
# Upload #
|
|
###########################
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: Build ${{ matrix.targetPlatform }} on MacOS (${{ matrix.unityVersion }})${{ matrix.buildProfile && ' With Build Profile' || '' }}
|
|
path: build
|
|
retention-days: 14
|