Files
wasmtime/ci/build-tarballs.sh
Alex Crichton d1aa86f91a Add AArch64 tests to CI (#1526)
* Add AArch64 tests to CI

This commit enhances our CI with an AArch64 builder. Currently we have
no physical hardware to run on so for now we run all tests in an
emulator. The AArch64 build is cross-compiled from x86_64 from Linux.
Tests all happen in release mode with a recent version of QEMU (recent
version because it's so much faster, and in release mode because debug
mode tests take quite a long time in an emulator).

The goal here was not to get all tests passing on CI, but rather to get
AArch64 running on CI and get it green at the same time. To achieve that
goal many tests are now ignored on aarch64 platforms. Many tests fail
due to unimplemented functionality in the aarch64 backend (#1521), and
all wasmtime tests involving compilation are also disabled due to
panicking attempting to generate generate instruction offset information
for trap symbolication (#1523).

Despite this, though, all Cranelift tests and other wasmtime tests
should be runnin on AArch64 through QEMU with this PR. Additionally
we'll have an AArch64 binary release of Wasmtime for Linux, although it
won't be too useful just yet since it will panic on almost all wasm
modules.

* Review comments
2020-04-22 12:56:54 -05:00

57 lines
1.6 KiB
Bash
Executable File

#!/bin/bash
# A small shell script invoked from CI on the final Linux builder which actually
# assembles the release artifacts for a particular platform. This will take the
# binary artifacts of previous builders and create associated tarballs to
# publish to GitHub.
#
# The first argument of this is the "platform" name to put into the tarball, and
# the second argument is the name of the github actions platform which is where
# we source binaries from. The final third argument is ".exe" on Windows to
# handle executable extensions right.
#
# Usage: build-tarballs.sh PLATFORM [.exe]
# where PLATFORM is e.g. x86_64-linux, aarch64-linux, ...
set -ex
platform=$1
exe=$2
rm -rf tmp
mkdir tmp
mkdir -p dist
mktarball() {
dir=$1
if [ "$exe" = "" ]; then
tar cJf dist/$dir.tar.xz -C tmp $dir
else
(cd tmp && zip -r ../dist/$dir.zip $dir)
fi
}
# Create the main tarball of binaries
bin_pkgname=wasmtime-$TAG-$platform
mkdir tmp/$bin_pkgname
cp LICENSE README.md tmp/$bin_pkgname
mv bins-$platform/wasmtime$exe tmp/$bin_pkgname
chmod +x tmp/$bin_pkgname/wasmtime$exe
mktarball $bin_pkgname
if [ "$exe" = ".exe" ]; then
mv bins-$platform/installer.msi dist/$bin_pkgname.msi
fi
# Create tarball of API libraries
api_pkgname=wasmtime-$TAG-$platform-c-api
mkdir tmp/$api_pkgname
mkdir tmp/$api_pkgname/lib
mkdir tmp/$api_pkgname/include
cp LICENSE README.md tmp/$api_pkgname
mv bins-$platform/* tmp/$api_pkgname/lib
cp crates/c-api/wasm-c-api/include/wasm.h tmp/$api_pkgname/include
cp crates/c-api/include/{wasmtime,wasi}.h tmp/$api_pkgname/include
mktarball $api_pkgname