-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Cache pyapp build on GHA #106
Comments
Because a I've played with the
This means that 382/383 stages are built the first time only, and just the EDITProof-of-concept Justfile to help along with properly caching builds...
Here's a minimal Justfile derived from my work-in-progress on easing the interface for building binaries from PyApp over at blakeNaccarato/buildsign. This kind of workflow benefits from build caching, and it's conceivable that a GitHub Actions workflow configured in tandem with the Justfile approach would speed up builds in CI. You can see a more involved (and specific) version over at the repo, but this should work for a typical project, and with some work on the Notice
|
thanks. I don’t use pyapp anymore because it is super slow to build. now switching to just ‘uv’ and cut the build time for Docker image alot . going to close this issue |
Thanks Blake, I am interested in improvements here! |
@ofek you're welcome, and thank you for a relatively accessible way to build Python binaries! It's really quite a feat. I don't know Rust, but your docs and some fiddling got me on the right track (hopefully). It seems the crux of it is that all the magic is done in that You're able to What paths are you interested in here?
I like that (1) exists, and greatly appreciate there being effort put in to make A solution like (2) may be more general, and could even be used to simplify implementations like (3), but could be similarly opaque to (1). The philosophy of cibuildwheel is representative of this approach. Again this is just my experience and opinion after a week or so trying to grok it all. But (3) alone would be an easier lift, though only enables GHA caching specifically, see e.g. Hynek's Build and Inspect Python Package – baipp GitHub Action. Option (4) aims to arm the reader with knowledge and flexibility of building manually, which would probably facilitate projects that already have some Rust code or are polyglot. It seems the Hatch helper you've already got is the most mature "easier" implementation so far, and any caching niceties could probably fit there. Now that I've gone through the manual build gauntlet I could probably go back to the hatch implementation and get it to work. 😅 It would be interesting if that ease of use could be isolated into its own utility package, distinct from Hatch! |
Hi, I think the pyapp compiled everytime CI run even no code change and I have enabled cache-to, cache-from in
docker/build-push-action
. Is there a way for us to cache the pyapp build?The text was updated successfully, but these errors were encountered: