Skip to content

ci: repair build workflows and gate publishing on tests - #384

Open
damaestro wants to merge 5 commits into
collabora:masterfrom
damaestro:damaestro/fix-windows-ci
Open

damaestro wants to merge 5 commits into
collabora:masterfrom
damaestro:damaestro/fix-windows-ci

Conversation

@damaestro

@damaestro damaestro commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Repairs the failing Build Wheels, Build Docker and Publish source workflows. It also updates the GitHub Actions they use. Publishing steps now run only on the upstream repo's master, and only after tests pass. Forks still build and test everything.

Fixes

  • Windows wheel builds failed with Cannot open include file: 'Eigen/Core'. libs/cnmatrix/CMakeLists.txt ran an unchecked git clone of Eigen. The clone is now shallow and retried, falls back to a release tarball, and stops with a clear error if Eigen is still missing. The Windows wheel job also installs Eigen through vcpkg.
  • Builds failed in repos without git tags (forks, shallow checkouts), because git describe aborted setup.py and the workflows. setup.py, publish-source.yml and cmake.yml now fall back to 0.0.0.. Tagged builds produce the same versions as before.
  • Docker push was refused with installation not allowed to Create organization package. The job now has packages: write, and the image is only pushed from upstream master.
  • Wheel artifacts were never uploaded, because the path pointed outside the checkout. They now upload dist/*.whl with a per-matrix artifact name.
  • build_nuget.yml had a stray tab that made the YAML invalid.
  • publish-source.yml used the retired ubuntu-20.04 runner and the deprecated ::set-output. It now uses ubuntu-latest and $GITHUB_OUTPUT.

Action updates

Updated every action to its latest release.

Publishing is gated

  • PyPI: each wheel gets an install-and-import smoke test, run with --no-deps. The upload is a separate publish job that needs every matrix leg and only runs on collabora/libsurvive at master.
  • Release assets: cmake.yml uploads from a release job that needs all build and test jobs. publish-source.yml first requires a successful "Build and Test" run for the same commit.
  • Docker: the image is always built, and pushed only from upstream master.
  • Fork builds: these jobs no longer touch the registry or PyPI.

- Install Eigen via vcpkg on Windows; make cnmatrix's Eigen download
  retry and fall back to a tarball, failing loudly if Eigen is missing
- Upload dist/*.whl with per-matrix artifact names
- Disable fail-fast; only run twine upload when TWINE_TOKEN is set

Assisted-by: Claude Code:claude-sonnet-5-5
- Update checkout, setup-python, upload-artifact and docker/* actions
- Pin cache-apt-pkgs-action instead of @latest
- Replace get-release/upload-release-asset with `gh release upload`
- Docker: push only on master/tags, grant packages: write
- publish-source: ubuntu-latest, $GITHUB_OUTPUT instead of set-output
- build_nuget: remove stray tab making the YAML invalid

Assisted-by: Claude Code:claude-sonnet-5-5
- Wheels: smoke-test each wheel; PyPI upload is a separate job gated on
  all matrix legs, upstream repo and master
- cmake: release asset upload moved to a job that needs all build/test jobs
- publish-source: require a successful Build and Test run for the commit
- docker: always build, push only on upstream master

Assisted-by: Claude Code:claude-sonnet-5-5
Forks and shallow checkouts without tags made `git describe` fail and
aborted the wheel build.

Assisted-by: Claude Code:claude-sonnet-5-5
…heels without deps

- publish-source/cmake: fall back to 0.0.0.<count> when git has no tags
- build_wheels: include python version in job and test step names
- build_wheels: install the wheel with --no-deps for the import smoke test
  (gooey -> wxpython cannot be built on the Linux runner)

Assisted-by: Claude Code:claude-sonnet-5-5
@damaestro damaestro changed the title ci: fix wheel build failures (Eigen fetch, artifact upload, fail-fast) ci: repair build workflows and gate publishing on tests Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant