Skip to content

ci(release): install and use the built wheel and sdist before publishing - #527

Merged
vjaganat90 merged 1 commit into
PolusAI:masterfrom
vjaganat90:ci/release-artifact-check
Oct 13, 2026
Merged

vjaganat90 merged 1 commit into
PolusAI:masterfrom
vjaganat90:ci/release-artifact-check

Conversation

@vjaganat90

Copy link
Copy Markdown
Member

Stacked on #525 (fix/yaml-layer-is-yaml). Merge that first; this PR's own changes are the commits above it.

What

  • Before anything is uploaded, the built wheel and sdist are each installed in a fresh environment, with nothing from the checkout on the path. Each install is then used the way a user uses it: sophios --version must match the release version, plus --help, an import of the Python API, --explain wic016, --generate_config, and a compile of the packaged helloworld tutorial. A new action, .github/actions/check-artifacts, does this. In test_and_publish_pypi.yml, publish (the only job that runs twine) now needs it, and build_wheel.yml runs the same check on every PR.
  • tests/core/test_release.py pins the gate: the upload needs the check, the check gets the version the build resolved, and it installs both artifacts.

Why
Nothing installed the built artifacts before they were published. A wheel missing its package data, or an sdist that cannot build, would have reached PyPI. Locally, a wheel with its cwl_adapters removed fails at the compile step, and a wrong expected version fails the version step.

One thing left alone: when the sdist is built during a user's install, setup.py writes ~/wic/global_config.json pointing at pip's temporary build tree. The check uses a throwaway HOME so that doesn't affect it. Phase 4 removes ~/wic.

@vjaganat90
vjaganat90 force-pushed the ci/release-artifact-check branch 5 times, most recently from 866f61a to 6d4970d Compare October 13, 2026 15:50

@darkclad darkclad 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.

LGTM

@vjaganat90
vjaganat90 force-pushed the ci/release-artifact-check branch 3 times, most recently from 11cebed to 516f143 Compare October 13, 2026 17:41
Nothing installed what the publish job built: a wheel missing its package
data (adapters, tutorials, _version.py) or an sdist that cannot build from
source would have reached PyPI. The build job now hands its artifacts to a
check-artifacts job that installs each one into a fresh virtual environment
with nothing from the checkout on the path, and uses it from outside the
checkout: --version against the version the build resolved, --help, an
import of the Python API and the language package, --explain, and a
helloworld compile with the config and adapters the package ships. The
publish job uploads only after that job passes. build_wheel.yml runs the
same job on every pull request, so a packaging break is seen before a
release.
@vjaganat90
vjaganat90 force-pushed the ci/release-artifact-check branch from 516f143 to a62d5a0 Compare October 13, 2026 17:50
@vjaganat90
vjaganat90 merged commit fcaad61 into PolusAI:master Oct 13, 2026
3 checks passed
@vjaganat90
vjaganat90 deleted the ci/release-artifact-check branch October 13, 2026 18:05
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.

2 participants