ci(build): install Rosetta only when the x86_64 relinker job cannot run x86_64 code #14332
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14332"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-01T09:40:49Z.
What
The macOS x86_64 relinker job in
.github/workflows/build.ymlrunssudo softwareupdate --install-rosetta --agree-to-licenseunconditionally. On pull request #14315's run (41290340866, job124801037258), that step failed withRosetta 2 update is not availableand exit 1. Every later step was then skipped, so the job reported a failure before it built or tested anything. The message suggests Rosetta was already installed on that runner image; that is inferred from the message, not confirmed on the runner.The step now runs the install only when an x86_64 binary cannot run:
Commit
5c7cfdb30f, one line.Tested
Linux, Python 3.11.2 for the YAML check, on
upstream/main26fa1212b8plus this commit. The macOS runner was not available here, so the step's control flow was checked with mocks.bash --noprofile --norc -e -o pipefail, which is the shell GitHub uses forrun:on macOS. The mocks arearch,sudoandsoftwareupdateonPATH. Three cases:softwareupdatereports it unavailablesoftwareupdatecalledsoftwareupdatenot called/usr/bin/python3 -c "import yaml; yaml.safe_load(...)"onbuild.yml: parses, 7 jobs.python3 tools/check_conventions.py --base upstream/mainandgit diff --check upstream/main: clean.Not run: the workflow on GitHub, and a macOS x86_64 relinker job on a real runner. Whether the runner image already has Rosetta is inferred from the failure message.
Checklist
mainNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-02T06:11:50Z.
Review: COMMENTED
Reviewed — no blocking findings
The x86_64 macOS relinker step now installs Rosetta only when
arch -x86_64 /usr/bin/truefails. The macOS x86_64 relinker job that ran on this head passed, and its Rosetta step exited without installing anything, so the probe succeeded on that runner. The install branch itself did not run.What I ran
5c7cfdb30f3064d9b7f1f709fdab451054701ec4; base26fa1212b82f76dd49cf12d65e445d6ff3e0844c. 1 file, one line changed:.github/workflows/build.yml(the Rosetta step formatrix.architectures == 'x86_64').arch -x86_64 /usr/bin/true || sudo softwareupdate --install-rosetta --agree-to-license.relinker (macos-latest, clang++, x86_64), job 124813042057) ran the step at 10:04:05 UTC with no output, which means the probe exited 0. Its CTest run passed 538 of 538, includingto_rosetta.Results
arch -x86_64natively, so the probe succeeds there tooRead-only check output
Precheck was not run: no PR-head code is run here. Diff check: passed. Conventions: passed. ABI audit: not applicable. Stack check: passed. Hosted:
gh api repos/boykopovar/AnyPS5/commits/5c7cfdb30f3064d9b7f1f709fdab451054701ec4/check-runs, and the macOS x86_64 relinker job log.Negative control
Not run here. A negative control would need a macOS runner without Rosetta, and none is in this run.
Findings
Blocking
None.
Non-blocking
||also installs Rosetta when the probe fails for a reason other than a missing Rosetta. That is acceptable, because installing is the old behaviour, but the step cannot tell the two causes apart.Sources
github.com/boykopovar/AnyPS5@5c7cfdb30f/.github/workflows/build.yml(line 331)Not verified
To get this to a good state