-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix and test sdist builds; reduce sdist size #337
Conversation
b58cd5e
to
eca6808
Compare
eca6808
to
8202723
Compare
9272a9d
to
d3e40c5
Compare
Ok, d3e40c5 reproduces the build error! Now we have a bit more freedom to try and fix it. |
deea1e1
to
377bc55
Compare
865a6cd
to
fae0ce9
Compare
This happens when we try to use a non-existent git command. It happens more often on Windows as we try to use more Git commands there.
fae0ce9
to
cbaa09e
Compare
@oerc0122 Looks like the problem is a bug in version.py; it will error out if any of the proposed Currently the sdist is not tested in the package-building workflow. Properly testing this sort of thing is tricky:
The new action in this PR was mostly intended for troubleshooting and doesn't actually run tests. Maybe it should be migrated to a manual-dispatch workflow that targets a particular git commit and checks if the Ubuntu sdist -> Windows tests loop works, to be used when tweaking the build process. Would it be very irresponsible to just roll out the version.py fix from this branch into a new release, without creating a bunch of new CI? |
Well, now I feel like an idiot. I think I originally had a I think that excluding the files from the sdist is easy enough and I think you're allowed to pass a directory to checkout, so we can probably do a bare checkout in the CI and call the In terms of irresponsibility? It needs fixing. We just did a major build-system overhaul, we knew from the start things like this were liable to happen and would need attention. We did the best we could. I thought, though, that |
There's an interesting discussion here where people suggest building an sdist and then using that as the source for cibuildwheel: |
The cibuildwheel docs suggest making the sdist in a separate step to the wheels, and having upload depend on both. That doesn't seem a bad idea, and would let some sdist tests run at the same time as other builds are being put together. https://cibuildwheel.pypa.io/en/stable/deliver-to-pypi/#github-actions |
This reworks the overall flow a bit: sdist is created first, then all wheels are produced from the same sdist. sdist is tested separately (hopefully while the wheels are being built and tested). Then finally if release everything is gathered and uploaded.
60df2f7
to
9222639
Compare
Tweaking the run conditions temporarily while troubleshooting this; these should be reverted.
- Don't get tags when building from sdist, everything should be there already - Try glob-matching the sdist location now we have the right path - ls fewer files
Here is the CI run that nearly pushes to PyPI (so lets us see what files it would have used...) https://github.com/pace-neutrons/Euphonic/actions/runs/12253702919/job/34183074026?pr=337 I've now restored the usual triggers. |
Mine now says:
|
I don't see a weird release or files on PyPI, anyway 🤷♂️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to update the sdist excludes here?
It'll automagically retarget so it doesn't make too much difference, but I would probably say merge #338 as this is really one job to |
## Update .gitattributes: exclude tests and workflows from archive meson-python uses git-archive to create the sdist. Some of euphonic's test files are on the large side and we don't need to include them with every copy of the source. This does have the downside that git-archive can no longer be used to produce a copy of the source with tests, but we weren't using that anyway. ## Build wheels from git checkout While the purity of building from sdist was appealing, it is difficult for cibuildwheel to cleanly run an external test suite as it containerizes the Linux build (to deal with ManyLinux requirements). We are still testing the sdist (on Windows) so just have to trust in cibuildwheel's own efforts to separate the testing and source from the installation. (Which it does seem to work quite hard at.)
Ok, I think remaining tasks here are:
|
Pipeline looks good, if you're happy we can merge this and I'll have a crack at a release-number-updating manual action. (They need bumping anyway, may as well have a go at setting it up.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks sane to me, let's hope it works.
Currently the release-building action tests the binary wheels (as part of cibuildwheel workflow) but not the source distribution.
The source-build release test is failing on (only?) windows so perhaps something is not quite right. Here is a workflow to look into that.