[PR #144] [MERGED] Fix Windows binary builds and decouple npm publish from all-binaries-succeed requirement #276

Closed
opened 2026-03-07 20:42:38 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/DBDiff/DBDiff/pull/144
Author: @Copilot
Created: 3/7/2026
Status: Merged
Merged: 3/7/2026
Merged by: @jasdeepkhalsa

Base: masterHead: copilot/fix-binary-failures-and-npm-step


📝 Commits (2)

  • dba9222 Initial plan
  • 6a791a5 fix: Windows SPC source dir + resilient publish job after PHAR success

📊 Changes

1 file changed (+54 additions, -22 deletions)

View changed files

📝 .github/workflows/release.yml (+54 -22)

📄 Description

Windows builds (win32-x64, win32-arm64) consistently failed in the Release workflow, and the publish job was blocked from running whenever any binary failed.

Windows fix

Root cause: SPC v2.8.2 on Windows runs 7za -so archive.tar.xz | tar -C source\php-src --strip-components 1 during spc build, but never creates source\php-src beforehand — tar exits with "The system cannot find the path specified." The doctor --auto-fix step present on Unix was also absent from the Windows path.

Fix: Mirror Unix behaviour — run doctor --auto-fix first, then pre-create the source\ directory before download/build:

.\spc.exe doctor --auto-fix
New-Item -ItemType Directory -Force -Path source | Out-Null
.\spc.exe download "php-src,micro,..." --with-php="8.3"
.\spc.exe build "..." --build-micro

Note: darwin-x64 was listed as failed but was actually cancelled mid-run by a manual workflow cancellation — not a genuine build failure.

Resilient publish job

Root cause: needs: build-binary requires every matrix job to succeed; one Windows failure skipped the publish entirely — blocking the PHAR, Docker, and all successful Linux/macOS binaries from being released.

Changes:

  • needs: build-binaryneeds: [build-phar, build-binary] with if: ${{ !cancelled() && needs.build-phar.result == 'success' }} — publish runs whenever the PHAR is ready, regardless of individual binary failures
  • Binary copy step uses a copy_binary() helper that emits ::warning:: and continues on missing files instead of aborting
  • npm publish loop skips platform packages with no binary present (checks both dbdiff and dbdiff.exe)
  • GitHub Release files: uses globs (binaries/dbdiff-*/dbdiff, binaries/dbdiff-*/dbdiff.exe) so only produced binaries are attached; missing ones are silently omitted (already warned in the copy step)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • static-php.dev
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/DBDiff/DBDiff/pull/144 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 3/7/2026 **Status:** ✅ Merged **Merged:** 3/7/2026 **Merged by:** [@jasdeepkhalsa](https://github.com/jasdeepkhalsa) **Base:** `master` ← **Head:** `copilot/fix-binary-failures-and-npm-step` --- ### 📝 Commits (2) - [`dba9222`](https://github.com/DBDiff/DBDiff/commit/dba922245e8fb95a6b50b37d03293416818debc6) Initial plan - [`6a791a5`](https://github.com/DBDiff/DBDiff/commit/6a791a54b714ca23056ea980df0db7ce8dfc591a) fix: Windows SPC source dir + resilient publish job after PHAR success ### 📊 Changes **1 file changed** (+54 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/release.yml` (+54 -22) </details> ### 📄 Description Windows builds (`win32-x64`, `win32-arm64`) consistently failed in the Release workflow, and the `publish` job was blocked from running whenever any binary failed. ## Windows fix **Root cause:** SPC v2.8.2 on Windows runs `7za -so archive.tar.xz | tar -C source\php-src --strip-components 1` during `spc build`, but never creates `source\php-src` beforehand — tar exits with *"The system cannot find the path specified."* The `doctor --auto-fix` step present on Unix was also absent from the Windows path. **Fix:** Mirror Unix behaviour — run `doctor --auto-fix` first, then pre-create the `source\` directory before `download`/`build`: ```yaml .\spc.exe doctor --auto-fix New-Item -ItemType Directory -Force -Path source | Out-Null .\spc.exe download "php-src,micro,..." --with-php="8.3" .\spc.exe build "..." --build-micro ``` Note: `darwin-x64` was listed as failed but was actually cancelled mid-run by a manual workflow cancellation — not a genuine build failure. ## Resilient publish job **Root cause:** `needs: build-binary` requires every matrix job to succeed; one Windows failure skipped the publish entirely — blocking the PHAR, Docker, and all successful Linux/macOS binaries from being released. **Changes:** - `needs: build-binary` → `needs: [build-phar, build-binary]` with `if: ${{ !cancelled() && needs.build-phar.result == 'success' }}` — publish runs whenever the PHAR is ready, regardless of individual binary failures - Binary copy step uses a `copy_binary()` helper that emits `::warning::` and continues on missing files instead of aborting - npm publish loop skips platform packages with no binary present (checks both `dbdiff` and `dbdiff.exe`) - GitHub Release `files:` uses globs (`binaries/dbdiff-*/dbdiff`, `binaries/dbdiff-*/dbdiff.exe`) so only produced binaries are attached; missing ones are silently omitted (already warned in the copy step) > [!WARNING] > > <details> > <summary>Firewall rules blocked me from connecting to one or more addresses (expand for details)</summary> > > #### I tried to connect to the following addresses, but was blocked by firewall rules: > > - `static-php.dev` > - Triggering command: `/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js` (dns block) > > If you need me to access, download, or install something from one of these locations, you can either: > > - Configure [Actions setup steps](https://gh.io/copilot/actions-setup-steps) to set up my environment, which run before the firewall is enabled > - Add the appropriate URLs or hosts to the custom allowlist in this repository's [Copilot coding agent settings](https://github.com/DBDiff/DBDiff/settings/copilot/coding_agent) (admins only) > > </details> <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-07 20:42:38 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/DBDiff#276
No description provided.