-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
build: Move to single-file builds for craft #203
Conversation
This PR reduces the build times dramatically (10x) by generating a minimized single-file build of Craft binary via `esbuild`. Using a single-file build makes is more portable so one can simply do `curl <CRAFT-URL>` and use craft directly instead of doing an `npm install`. This is especially useful for our centralized publish repo flows and actions.
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.
🏄
@BYK You and I talked about this elsewhere, doesn't feel great to sacrifice functionality for technical reasons. If we must, we must. |
@tonyo I took the path for adding |
This reverts commit 6aec865.
This reverts commit 6090064.
@chadwhitacre I walked back from using |
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.
Approving with the following caveats:
- It's too bad we have to choose between
update-notifier
andesbuild
. :-/ - I don't see that we actually use the Docker image ourselves, not sure why we bother building that.
- I'm not sure I trust that we won't hit a bug at some point because of the other warnings we're ignoring.
- I don't really understand why we're adding
dist/craft
to the GitHub artifacts we're uploading, since we will becurl
ing from elsewhere inaction-prepare-release
(and continuing to craft as an action via GitHub ref inprepare
).
We can get similar functionality by ourselves or resort back to using
It is being used by the Craft GitHub Action: Lines 17 to 24 in d34cf65
This action is being used in the publish repo: https://github.com/getsentry/publish/blob/514489dfce586772287ce3bcc7a01c86f49b1ce1/.github/workflows/publish.yml#L60-L65
I'll revisit our
These will be used when cutting a release to GitHub where we attach all the assets from the build to the release tag. |
... and presumably this copies the assets over so the 90-day retention period doesn't apply. |
Yup. As far as I'm aware release assets are stored indefinitely. |
This PR reduces the build times dramatically (10x) by generating
a minimized single-file build of Craft binary via
esbuild
. Usinga single-file build makes is more portable so one can simply do
curl <CRAFT-URL>
and use craft directly instead of doing annpm install
. This is especially useful for our centralized publishrepo flows and actions.
IMPORTANT: This PR sacrifices the update checker as it uses lazy imports for certain things. We can try to make it work with static builds but I'm not sure if it's a feature that's worth the effort.