You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.7 KiB

Build "min" artifacts on CI (#7315) * riscv64: Extend distance trampolines can jump 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. * Build "min" artifacts on CI 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. * Fix Windows unzip
1 year ago
#!/bin/bash
# Script to merge the outputs of a run on github actions to github releases.
# This is invoked from `.github/workflows/publish-artifacts.yml`. All previous
# artifacts from builds are located in `bins-*` folders. The main purpose of
# this script is to take the "min" build and merge it into the "normal" build to
# produce one final tarball. This means that the final artifacts will have both
# a normal and a min build in them for comparison and usage.
set -ex
# Prepare the upload folder and move all artifacts that aren't being merged into
Build "min" artifacts on CI (#7315) * riscv64: Extend distance trampolines can jump 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. * Build "min" artifacts on CI 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. * Fix Windows unzip
1 year ago
# this folder, e.g. the MSI installer and adapter wasm files.
rm -rf dist
mkdir dist
mv -t dist bins-*/*.{msi,wasm}
mv wasmtime-platform-header/* dist
Build "min" artifacts on CI (#7315) * riscv64: Extend distance trampolines can jump 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. * Build "min" artifacts on CI 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. * Fix Windows unzip
1 year ago
# Merge tarballs and zips by searching for `*-min` builds, unpacking the
# min/normal builds, into the same destination, and then repacking into a
# tarball.
#
# Note that for now xz compression is used for the final artifact to try to get
# small artifacts, but it's left at the default level since a lot of artifacts
# are processed here and turning it up to the max 9 compression might take
# quite awhile on CI for this one builder to process.
for min in bins-*-min/*.tar.*; do
normal=${min/-min\//\/}
filename=$(basename $normal)
dir=${filename%.tar.gz}
rm -rf tmp
mkdir tmp
tar xf $min -C tmp
tar xf $normal -C tmp
tar -cf - -C tmp $dir | xz -T0 > dist/$dir.tar.xz
rm $min $normal
done
for min in bins-*-min/*.zip; do
normal=${min/-min\//\/}
filename=$(basename $normal)
dir=${filename%.zip}
rm -rf tmp
mkdir tmp
(cd tmp && unzip -o ../$min)
(cd tmp && unzip -o ../$normal)
(cd tmp && 7z a ../dist/$dir.zip $dir/)
rm $min $normal
done
# Copy over remaining source tarball into the dist folder
mv -t dist bins-*/*.tar.*