Skip to content

fix(macos): build x86_64 with the standalone spc binary - #2

Merged
pjcdawkins merged 2 commits into
mainfrom
fix/macos-intel-standalone-spc
Sep 25, 2026
Merged

pjcdawkins merged 2 commits into
mainfrom
fix/macos-intel-standalone-spc

Conversation

@pjcdawkins

Copy link
Copy Markdown
Contributor

setup-php no longer supports Intel macOS runners, since Homebrew dropped them (setup-php#1112). The macOS x86_64 job hung for ~27 minutes in "Setup PHP" and failed with "Could not setup PHP 8.4", twice, so the 8.4.26 build created no release.

The Intel job now downloads the standalone spc binary from the pinned static-php-cli release (spc-macos-x86_64.tar.gz) instead of cloning it, so it needs no PHP or Composer on the runner. The other jobs are unchanged.

spc doctor --auto-fix still installs re2c, automake and bison with Homebrew on the Intel runner. That worked in the test run, but may need replacing if Homebrew stops working there.

Tested with a dispatch on this branch (8.4.26, no release): https://github.com/upsun/cli-php-builds/actions/runs/36150992001. All platforms passed, and the darwin-amd64 artifact is an x86_64 Mach-O binary with PHP 8.4.26.

🤖 Generated with Claude Code

setup-php no longer supports Intel macOS runners, since Homebrew dropped
them: the macOS x86_64 job hung for ~27 minutes in "Setup PHP" and then
failed with "Could not setup PHP 8.4", so no release was created.

Download the standalone spc binary of the pinned static-php-cli release
instead of cloning it, which needs no PHP or Composer on the runner.

See: shivammathur/setup-php#1112

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@upsun-dispatch upsun-dispatch Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Note

Reviewed — No blocking findings · 🔵 2 minor points

🔍 Full review · 1 file reviewed

🔵 Minor points

  • .github/workflows/build-php.yml:180 — The run: step has no shell:, so GitHub Actions runs it with bash -e {0}, which has no pipefail. If curl fails (for example a 404 on the release asset or a network error), the pipeline's exit status is tar's. bsdtar may accept the empty stdin and exit 0. The step then fails later at mv spc/spc spc/bin/spc with "No such file or directory", not at the download. Add set -o pipefail or shell: bash so the failure is reported where it happens.
  • .github/workflows/build-php.yml:180 — The job downloads a prebuilt spc executable from a GitHub release and runs it (--version, doctor --auto-fix, download, build) without checking it against a known SHA-256. Release assets can be replaced after upload, so pinning SPC_VERSION does not pin the bytes that run. This binary produces the PHP that is published in the release. Store the expected hash next to SPC_VERSION and run shasum -a 256 -c before extracting.
Verification
  • The binary moves to spc/bin/spc and later steps run after cd spc, so output still lands in spc/buildroot/bin/php, the uploaded path.
  • The download URL uses the same SPC_VERSION (2.8.5) as the other jobs, so the release body's 'Built with static-php-cli v2.8.5' stays accurate.
  • The Intel job no longer needs setup-php or composer, and GITHUB_TOKEN still comes from the workflow env for spc download.
  • The download, build and upload steps are unchanged, so artifact naming and create-release inputs are the same.

No automated test covers this: the workflow only runs on workflow_dispatch. The only evidence is the manual test dispatch linked in the PR description.

Review details
  • Commit: 253e3e7
  • Model: claude-opus-5-5

Review 1 of 10 for this pull request · View the full run

Address review feedback:

- Check the tarball against a pinned SHA-256, since a release asset can
  be replaced after upload and the binary builds the published PHP. The
  hash matches the digest GitHub recorded for the 2.8.5 asset.
- Download to a file instead of piping curl into tar, so a failed
  download fails the step at curl rather than later at a missing file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pjcdawkins
pjcdawkins merged commit 3fe4858 into main Sep 25, 2026
8 checks passed
@pjcdawkins
pjcdawkins deleted the fix/macos-intel-standalone-spc branch September 25, 2026 15:34
pjcdawkins added a commit to upsun/cli that referenced this pull request Sep 25, 2026
Security fixes since 8.4.23 in code the CLI uses include:

- OpenSSL: TLS hostname verification fell back to the CN after a SAN
  mismatch (CVE-2026-91769), and a heap buffer overflow on a crafted
  wildcard CN (CVE-2026-91767).
- HTTP stream wrapper: a cross-origin credential leak on redirects
  (CVE-2026-91766), and an out-of-bounds read on an empty Location
  header (CVE-2026-93682).
- Phar: TAR entry injection via an integer overflow (CVE-2026-6103),
  and a crash via recursive symlinks (CVE-2026-7260, 8.4.24).
- Windows: reserved device names were not rejected before file I/O
  (CVE-2026-17545).

The binaries come from upsun/cli-php-builds, whose macOS x86_64 build
now uses the standalone static-php-cli binary (upsun/cli-php-builds#2).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant