Skip to content

Commit b7f6ea9

Browse files
frostebiteclaude
andcommitted
ci: use step-level continue-on-error for macOS builds
GitHub deprecated external check run conclusion updates (Feb 2025), so the Checks API approach to mark builds as neutral no longer works. Instead, move continue-on-error from the job level to the build step. The job always succeeds (green check), failed builds emit a warning annotation, and upload is skipped on failure. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8ccbfad commit b7f6ea9

File tree

1 file changed

+7
-36
lines changed

1 file changed

+7
-36
lines changed

.github/workflows/build-tests-mac.yml

Lines changed: 7 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,10 @@ concurrency:
88
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
99
cancel-in-progress: true
1010

11-
permissions:
12-
checks: write
13-
1411
jobs:
1512
buildForAllPlatformsMacOS:
1613
name: ${{ matrix.targetPlatform }} on ${{ matrix.unityVersion }}
1714
runs-on: macos-latest
18-
continue-on-error: true
1915
strategy:
2016
fail-fast: false
2117
matrix:
@@ -66,6 +62,8 @@ jobs:
6662
# Build #
6763
###########################
6864
- uses: ./
65+
id: build
66+
continue-on-error: true
6967
env:
7068
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
7169
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
@@ -81,43 +79,16 @@ jobs:
8179
# We use dirty build because we are replacing the default project settings file above
8280
allowDirtyBuild: true
8381

82+
- name: Warn on build failure
83+
if: steps.build.outcome == 'failure'
84+
run: echo "::warning::Build failed for ${{ matrix.targetPlatform }} on ${{ matrix.unityVersion }} (macOS builds are unstable)"
85+
8486
###########################
8587
# Upload #
8688
###########################
8789
- uses: actions/upload-artifact@v4
90+
if: steps.build.outcome == 'success'
8891
with:
8992
name: Build ${{ matrix.targetPlatform }} on MacOS (${{ matrix.unityVersion }})${{ matrix.buildProfile && ' With Build Profile' || '' }}
9093
path: build
9194
retention-days: 14
92-
93-
markUnstableBuilds:
94-
name: Mark unstable macOS builds
95-
needs: buildForAllPlatformsMacOS
96-
if: always()
97-
runs-on: ubuntu-latest
98-
steps:
99-
- uses: actions/github-script@v7
100-
with:
101-
script: |
102-
const { data: checkRuns } = await github.rest.checks.listForRef({
103-
owner: context.repo.owner,
104-
repo: context.repo.repo,
105-
ref: context.sha,
106-
per_page: 100,
107-
});
108-
109-
for (const run of checkRuns.check_runs) {
110-
if (run.conclusion !== 'failure' || run.app?.slug !== 'github-actions') continue;
111-
if (!run.name.includes('StandaloneOSX') && !run.name.includes('iOS')) continue;
112-
113-
await github.rest.checks.update({
114-
owner: context.repo.owner,
115-
repo: context.repo.repo,
116-
check_run_id: run.id,
117-
conclusion: 'neutral',
118-
output: {
119-
title: `${run.name} (unstable)`,
120-
summary: 'This macOS build is unstable and its failure does not block merging.',
121-
},
122-
});
123-
}

0 commit comments

Comments
 (0)