Expand wasm32 testing on CI (#360)
* Expand wasm32 testing on CI Run the full `run.sh` test script to get full assertions, including that nothing in the wasm compiler-builtins is panicking. Unfortunately it's currently panicking, so this is good to weed out! * Update libm
This commit is contained in:
parent
156fcf1d67
commit
4bf8cad593
|
@ -7,30 +7,6 @@ jobs:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
target:
|
|
||||||
- aarch64-unknown-linux-gnu
|
|
||||||
- arm-unknown-linux-gnueabi
|
|
||||||
- arm-unknown-linux-gnueabihf
|
|
||||||
- i586-unknown-linux-gnu
|
|
||||||
- i686-unknown-linux-gnu
|
|
||||||
- mips-unknown-linux-gnu
|
|
||||||
- mips64-unknown-linux-gnuabi64
|
|
||||||
- mips64el-unknown-linux-gnuabi64
|
|
||||||
- mipsel-unknown-linux-gnu
|
|
||||||
- powerpc-unknown-linux-gnu
|
|
||||||
- powerpc64-unknown-linux-gnu
|
|
||||||
- powerpc64le-unknown-linux-gnu
|
|
||||||
- thumbv6m-none-eabi
|
|
||||||
- thumbv7em-none-eabi
|
|
||||||
- thumbv7em-none-eabihf
|
|
||||||
- thumbv7m-none-eabi
|
|
||||||
- wasm32-unknown-unknown
|
|
||||||
- x86_64-unknown-linux-gnu
|
|
||||||
- x86_64-apple-darwin
|
|
||||||
- i686-pc-windows-msvc
|
|
||||||
- x86_64-pc-windows-msvc
|
|
||||||
- i686-pc-windows-gnu
|
|
||||||
- x86_64-pc-windows-gnu
|
|
||||||
include:
|
include:
|
||||||
- target: aarch64-unknown-linux-gnu
|
- target: aarch64-unknown-linux-gnu
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
|
@ -109,6 +85,7 @@ jobs:
|
||||||
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
|
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
|
||||||
shell: bash
|
shell: bash
|
||||||
- run: rustup target add ${{ matrix.target }}
|
- run: rustup target add ${{ matrix.target }}
|
||||||
|
- run: rustup component add llvm-tools-preview
|
||||||
- name: Download compiler-rt reference sources
|
- name: Download compiler-rt reference sources
|
||||||
run: |
|
run: |
|
||||||
curl -L -o code.tar.gz https://github.com/rust-lang/llvm-project/archive/rustc/8.0-2019-03-18.tar.gz
|
curl -L -o code.tar.gz https://github.com/rust-lang/llvm-project/archive/rustc/8.0-2019-03-18.tar.gz
|
||||||
|
@ -121,13 +98,9 @@ jobs:
|
||||||
if: matrix.os != 'ubuntu-latest'
|
if: matrix.os != 'ubuntu-latest'
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
# Wasm is special and is just build as a smoke test
|
|
||||||
- run: cargo build --target ${{ matrix.target }}
|
|
||||||
if: matrix.target == 'wasm32-unknown-unknown'
|
|
||||||
|
|
||||||
# Otherwise we use our docker containers to run builds
|
# Otherwise we use our docker containers to run builds
|
||||||
- run: cargo generate-lockfile && ./ci/run-docker.sh ${{ matrix.target }}
|
- run: cargo generate-lockfile && ./ci/run-docker.sh ${{ matrix.target }}
|
||||||
if: matrix.target != 'wasm32-unknown-unknown' && matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
|
|
||||||
rustfmt:
|
rustfmt:
|
||||||
name: Rustfmt
|
name: Rustfmt
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
FROM ubuntu:20.04
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
gcc libc6-dev ca-certificates
|
||||||
|
|
||||||
|
ENV CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_RUNNER=true
|
10
ci/run.sh
10
ci/run.sh
|
@ -32,7 +32,10 @@ case $1 in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
NM=nm
|
NM=$(find $(rustc --print sysroot) -name llvm-nm)
|
||||||
|
if [ "$NM" = "" ]; then
|
||||||
|
NM=${PREFIX}nm
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -d /target ]; then
|
if [ -d /target ]; then
|
||||||
path=/target/${1}/debug/deps/libcompiler_builtins-*.rlib
|
path=/target/${1}/debug/deps/libcompiler_builtins-*.rlib
|
||||||
|
@ -47,8 +50,7 @@ for rlib in $(echo $path); do
|
||||||
echo checking $rlib for duplicate symbols
|
echo checking $rlib for duplicate symbols
|
||||||
echo "================================================================"
|
echo "================================================================"
|
||||||
|
|
||||||
stdout=$($PREFIX$NM -g --defined-only $rlib 2>&1)
|
stdout=$($NM -g --defined-only $rlib 2>&1)
|
||||||
|
|
||||||
# NOTE On i586, It's normal that the get_pc_thunk symbol appears several
|
# NOTE On i586, It's normal that the get_pc_thunk symbol appears several
|
||||||
# times so ignore it
|
# times so ignore it
|
||||||
#
|
#
|
||||||
|
@ -94,7 +96,7 @@ CARGO_PROFILE_RELEASE_LTO=true \
|
||||||
# Ensure no references to a panicking function
|
# Ensure no references to a panicking function
|
||||||
for rlib in $(echo $path); do
|
for rlib in $(echo $path); do
|
||||||
set +ex
|
set +ex
|
||||||
$PREFIX$NM -u $rlib 2>&1 | grep panicking
|
$NM -u $rlib 2>&1 | grep panicking
|
||||||
|
|
||||||
if test $? = 0; then
|
if test $? = 0; then
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
extern crate panic_handler;
|
extern crate panic_handler;
|
||||||
|
|
||||||
#[cfg(all(not(thumb), not(windows)))]
|
#[cfg(all(not(thumb), not(windows), not(target_arch = "wasm32")))]
|
||||||
#[link(name = "c")]
|
#[link(name = "c")]
|
||||||
extern "C" {}
|
extern "C" {}
|
||||||
|
|
||||||
|
@ -340,11 +340,11 @@ fn run() {
|
||||||
something_with_a_dtor(&|| assert_eq!(bb(1), 1));
|
something_with_a_dtor(&|| assert_eq!(bb(1), 1));
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
fn rust_begin_unwind();
|
fn rust_begin_unwind(x: usize);
|
||||||
}
|
}
|
||||||
// if bb(false) {
|
// if bb(false) {
|
||||||
unsafe {
|
unsafe {
|
||||||
rust_begin_unwind();
|
rust_begin_unwind(0);
|
||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
2
libm
2
libm
|
@ -1 +1 @@
|
||||||
Subproject commit 8eedc2470531f51b978e4c873ee78a33c90e0fbd
|
Subproject commit fe396e00b7e47821a81c4c87a481ddc6af1d2cdf
|
|
@ -31,7 +31,7 @@
|
||||||
extern crate core;
|
extern crate core;
|
||||||
|
|
||||||
fn abort() -> ! {
|
fn abort() -> ! {
|
||||||
unsafe { core::intrinsics::abort() }
|
core::intrinsics::abort()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
|
Loading…
Reference in New Issue