Skip to content
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 "min" artifacts on CI #7315

Merged
merged 3 commits into from
Oct 23, 2023

Conversation

alexcrichton
Copy link
Member

This commit updates the binary artifacts produced by CI to include "min"
builds where all default features are disabled. Additionally all the
stops are pulled in terms of build flags, nightly versions, etc, to get
a build that is as small as possible without actual source code changes.
This effectively codifies the instructions in #7282 into an easily
downloadable artifact.

No new tarballs are created for github releases but instead tarballs
that previously had a wasmtime executable for example now have a
wasmtime-min executable. Furthermore the C API which previously had
libwasmtime.so for example now has libwasmtime-min.so. The intention
is that the minimum-size artifacts are handy for determining a rough
size of Wasmtime but they're not so important that it seems worthwhile
to dedicate entire release entries for.

CI is refactored to support these minimum builds with separate builders.
This means that a single tarball produced as a final result is actually
two separate tarballs merged together, one for the normal build we do
today plus a new "min" tarball produced on the new "min" builders.
Various scripts and CI organization has been adjusted accordingly.

While here I went ahead and enabled panic=abort and debuginfo
stripping in our current release artifacts. While this doesn't affect a
whole lot it's less to upload to GitHub Actions all the time.

Use a PIC-friendly set of instructions to enable destination of the
trampoline to be more than 4k away from the tail call site of the
trampoline itself.
This commit updates the binary artifacts produced by CI to include "min"
builds where all default features are disabled. Additionally all the
stops are pulled in terms of build flags, nightly versions, etc, to get
a build that is as small as possible without actual source code changes.
This effectively codifies the instructions in bytecodealliance#7282 into an easily
downloadable artifact.

No new tarballs are created for github releases but instead tarballs
that previously had a `wasmtime` executable for example now have a
`wasmtime-min` executable. Furthermore the C API which previously had
`libwasmtime.so` for example now has `libwasmtime-min.so`. The intention
is that the minimum-size artifacts are handy for determining a rough
size of Wasmtime but they're not so important that it seems worthwhile
to dedicate entire release entries for.

CI is refactored to support these minimum builds with separate builders.
This means that a single tarball produced as a final result is actually
two separate tarballs merged together, one for the normal build we do
today plus a new "min" tarball produced on the new "min" builders.
Various scripts and CI organization has been adjusted accordingly.

While here I went ahead and enabled `panic=abort` and debuginfo
stripping in our current release artifacts. While this doesn't affect a
whole lot it's less to upload to GitHub Actions all the time.
@alexcrichton alexcrichton requested review from a team as code owners October 20, 2023 22:41
@alexcrichton alexcrichton requested review from fitzgen and removed request for a team October 20, 2023 22:41
@alexcrichton
Copy link
Member Author

Two notes on this:

  • I've prepared an example release in my own repository which has sample artifacts produced through CI.
  • This PR required the first commit which is a riscv64-specific fix to handle what would otherwise result in a relocation error.

@github-actions github-actions bot added the wasmtime:docs Issues related to Wasmtime's documentation label Oct 20, 2023
@alexcrichton alexcrichton added this pull request to the merge queue Oct 23, 2023
Merged via the queue into bytecodealliance:main with commit a80da75 Oct 23, 2023
18 checks passed
@alexcrichton alexcrichton deleted the min-builds branch October 23, 2023 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasmtime:docs Issues related to Wasmtime's documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants