[PR #146] [MERGED] Fix Windows binary builds and publish job artifact download failure #274

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/146
Author: @jasdeepkhalsa
Created: 3/7/2026
Status: Merged
Merged: 3/7/2026
Merged by: @jasdeepkhalsa

Base: masterHead: fix/windows-binaries


📝 Commits (3)

  • af60f48 fix: use postgresql-win and libiconv-win in SPC_WINDOWS_LIBS
  • 5be4b18 fix: filter download-artifact to dbdiff-* to skip Docker build cache artifacts
  • 06728ce fix: add PHP 8.1 and 8.2 to all test matrices, docker-compose, and docs

📊 Changes

6 files changed (+193 additions, -10 deletions)

View changed files

📝 .github/workflows/release.yml (+12 -3)
📝 .github/workflows/tests.yml (+4 -4)
📝 DOCKER.md (+10 -0)
📝 README.md (+1 -1)
📝 docker-compose.yml (+130 -0)
📝 start.sh (+36 -2)

📄 Description

Fix Windows binary builds and publish job artifact download failure

  • Expanded PHP versions in test matrix to include 8.1 (minimum supported version) and 8.2 everywhere

win32-x64 / win32-arm64 — wrong library names in spc download

Root cause: SPC_WINDOWS_LIBS used bare names postgresql and libiconv,
which download the Unix source tarballs and register download locks under those
names. SPC's Windows build system then looks for postgresql-win and
libiconv-win (pre-built Visual C++ binary packages), finds no lock entry, and
fails immediately:

Building required lib [postgresql-win]
Source [postgresql-win] not downloaded or not locked, you should download it first!

Fix: Use the correct Windows package names in SPC_WINDOWS_LIBS:

# Before
libiconv,libxml2,postgresql,sqlite

# After — explicit -win suffix for the VC++ prebuilt packages
libiconv-win,libxml2,postgresql-win,sqlite

libxml2 and sqlite are built from source on all platforms and have no -win variant.


Publish job — Docker build-cache artifacts crash the download step

Root cause: The download-artifact step had no pattern filter, so it
attempted to download every artifact in the run — including
DBDiff~DBDiff~*.dockerbuild build-cache blobs uploaded by the Docker job.
Those are internal BuildKit cache references that cannot be downloaded as normal
artifacts, causing:

Unable to download artifact(s): Unable to download and extract artifact:
Artifact download failed after 5 retries.

This killed the entire publish job even when all required dbdiff-* artifacts
were available.

Fix: Add pattern: dbdiff-* to the download-artifact step so only PHAR
and binary artifacts are fetched:

- uses: actions/download-artifact@v4
  with:
    path: binaries/
    pattern: dbdiff-*
    merge-multiple: false

🔄 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/146 **Author:** [@jasdeepkhalsa](https://github.com/jasdeepkhalsa) **Created:** 3/7/2026 **Status:** ✅ Merged **Merged:** 3/7/2026 **Merged by:** [@jasdeepkhalsa](https://github.com/jasdeepkhalsa) **Base:** `master` ← **Head:** `fix/windows-binaries` --- ### 📝 Commits (3) - [`af60f48`](https://github.com/DBDiff/DBDiff/commit/af60f48fefc9e9bb517c4a1e1deafe5e7b987271) fix: use postgresql-win and libiconv-win in SPC_WINDOWS_LIBS - [`5be4b18`](https://github.com/DBDiff/DBDiff/commit/5be4b18e141fa6ba2dbe33956b27eb1ca4eb65aa) fix: filter download-artifact to dbdiff-* to skip Docker build cache artifacts - [`06728ce`](https://github.com/DBDiff/DBDiff/commit/06728ceb96dd8cd6c0e326e9474cdc57c3377a0d) fix: add PHP 8.1 and 8.2 to all test matrices, docker-compose, and docs ### 📊 Changes **6 files changed** (+193 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/release.yml` (+12 -3) 📝 `.github/workflows/tests.yml` (+4 -4) 📝 `DOCKER.md` (+10 -0) 📝 `README.md` (+1 -1) 📝 `docker-compose.yml` (+130 -0) 📝 `start.sh` (+36 -2) </details> ### 📄 Description ## Fix Windows binary builds and publish job artifact download failure * Expanded PHP versions in test matrix to include 8.1 (minimum supported version) and 8.2 everywhere ### win32-x64 / win32-arm64 — wrong library names in `spc download` **Root cause:** `SPC_WINDOWS_LIBS` used bare names `postgresql` and `libiconv`, which download the Unix source tarballs and register download locks under those names. SPC's Windows build system then looks for `postgresql-win` and `libiconv-win` (pre-built Visual C++ binary packages), finds no lock entry, and fails immediately: ``` Building required lib [postgresql-win] Source [postgresql-win] not downloaded or not locked, you should download it first! ``` **Fix:** Use the correct Windows package names in `SPC_WINDOWS_LIBS`: ``` # Before libiconv,libxml2,postgresql,sqlite # After — explicit -win suffix for the VC++ prebuilt packages libiconv-win,libxml2,postgresql-win,sqlite ``` `libxml2` and `sqlite` are built from source on all platforms and have no `-win` variant. --- ### Publish job — Docker build-cache artifacts crash the download step **Root cause:** The `download-artifact` step had no `pattern` filter, so it attempted to download every artifact in the run — including `DBDiff~DBDiff~*.dockerbuild` build-cache blobs uploaded by the Docker job. Those are internal BuildKit cache references that cannot be downloaded as normal artifacts, causing: ``` Unable to download artifact(s): Unable to download and extract artifact: Artifact download failed after 5 retries. ``` This killed the entire publish job even when all required `dbdiff-*` artifacts were available. **Fix:** Add `pattern: dbdiff-*` to the `download-artifact` step so only PHAR and binary artifacts are fetched: ```yaml - uses: actions/download-artifact@v4 with: path: binaries/ pattern: dbdiff-* merge-multiple: false ``` --- <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#274
No description provided.