Skip to content

[EXPERIMENTAL] CI testing #143353

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

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/bootstrap/src/core/sanity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,22 @@ than building it.
.entry(*target)
.or_insert_with(|| Target::from_triple(&target.triple));

// compiler-rt c fallbacks for wasm cannot be built with gcc
if target.contains("wasm")
&& (build.config.optimized_compiler_builtins(*target)
|| build.config.rust_std_features.contains("compiler-builtins-c"))
{
let cc_tool = build.cc_tool(*target);
if !cc_tool.is_like_clang() {
panic!(
"Clang is required to build C code for Wasm targets, got `{}` instead\n\
this is because compiler-builtins is configured to build C source. Either \
ensure Clang is used, or adjust this configuration.",
cc_tool.path().display()
);
}
}

if (target.contains("-none-") || target.contains("nvptx"))
&& build.no_std(*target) == Some(false)
{
Expand Down
6 changes: 6 additions & 0 deletions src/ci/docker/host-x86_64/dist-various-1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ RUN ./install-riscv64-none-elf.sh
COPY host-x86_64/dist-various-1/install-riscv32-none-elf.sh /build
RUN ./install-riscv32-none-elf.sh

COPY host-x86_64/dist-various-1/install-emscripten.sh /build
RUN ./install-emscripten.sh

# Add Emscripten to PATH
ENV PATH="/build/emsdk:/build/emsdk/upstream/emscripten:/build/emsdk/node/current/bin:${PATH}"

# Suppress some warnings in the openwrt toolchains we downloaded
ENV STAGING_DIR=/tmp

Expand Down
12 changes: 12 additions & 0 deletions src/ci/docker/host-x86_64/dist-various-1/install-emscripten.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -ex

apt-get update
apt-get install -y --no-install-recommends \
nodejs \
default-jre

git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
4 changes: 4 additions & 0 deletions src/ci/docker/host-x86_64/dist-various-2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ ENV \
CXX_i686_unknown_uefi=clang++-11 \
CC_x86_64_unknown_uefi=clang-11 \
CXX_x86_64_unknown_uefi=clang++-11 \
CC_wasm32_unknown_unknown=clang-11 \
CXX_wasm32_unknown_unknown=clang++-11 \
CC_wasm32v1_none=clang-11 \
CXX_wasm32v1_none=clang++-11 \
CC=gcc-9 \
CXX=g++-9

Expand Down
7 changes: 4 additions & 3 deletions src/ci/docker/host-x86_64/test-various/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
clang-11 \
llvm-11 \
gcc-multilib \
g++ \
make \
ninja-build \
Expand Down Expand Up @@ -59,8 +60,8 @@ RUN curl -L https://github.com/bytecodealliance/wasmtime/releases/download/v19.0
tar -xJ
ENV PATH "$PATH:/wasmtime-v19.0.0-x86_64-linux"

ENV WASM_TARGETS=wasm32-wasip1
ENV WASM_SCRIPT python3 /checkout/x.py --stage 2 test --host='' --target $WASM_TARGETS \
ENV WASM_WASIP_TARGET=wasm32-wasip1
ENV WASM_WASIP_SCRIPT python3 /checkout/x.py --stage 2 test --host='' --target $WASM_WASIP_TARGET \
tests/run-make \
tests/ui \
tests/mir-opt \
Expand Down Expand Up @@ -90,4 +91,4 @@ ENV UEFI_TARGETS=aarch64-unknown-uefi,i686-unknown-uefi,x86_64-unknown-uefi \
ENV UEFI_SCRIPT python3 /checkout/x.py --stage 2 build --host='' --target $UEFI_TARGETS && \
python3 -u /uefi_qemu_test/run.py

ENV SCRIPT $WASM_SCRIPT && $NVPTX_SCRIPT && $MUSL_SCRIPT && $UEFI_SCRIPT
ENV SCRIPT $WASM_WASIP_SCRIPT && $NVPTX_SCRIPT && $MUSL_SCRIPT && $UEFI_SCRIPT
Loading