Skip to content

Disable WASI on CI #215

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

Merged
merged 1 commit into from
Oct 25, 2023
Merged
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
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ jobs:
- target: x86_64-pc-windows-gnu
rust: stable
os: ubuntu-latest
- target: wasm32-wasi
rust: stable
os: ubuntu-latest
# - target: wasm32-wasi
# rust: stable
# os: ubuntu-latest
- target: i686-pc-windows-msvc
rust: stable-i686-msvc
os: windows-2019
Expand Down
6 changes: 3 additions & 3 deletions ci/docker/wasm32-wasi/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM ubuntu:22.04

RUN apt-get update -y && apt-get install -y --no-install-recommends \
ca-certificates \
Expand All @@ -9,12 +9,11 @@ RUN apt-get update -y && apt-get install -y --no-install-recommends \
xz-utils \
libc6-dev

# cargo-wasi setup (cargo-wasi depends on wasmtime to be present)
RUN curl https://wasmtime.dev/install.sh -sSf | bash
ENV PATH="$PATH:/root/.wasmtime/bin"

# Install WASI-SDK
ENV WASI_VERSION=14
ENV WASI_VERSION=20
ENV WASI_VERSION_FULL=${WASI_VERSION}.0
RUN wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_VERSION}/wasi-sdk-${WASI_VERSION_FULL}-linux.tar.gz
RUN tar xvf wasi-sdk-${WASI_VERSION_FULL}-linux.tar.gz -C /root
Expand All @@ -23,6 +22,7 @@ RUN tar xvf wasi-sdk-${WASI_VERSION_FULL}-linux.tar.gz -C /root
ENV WASI_SDK_PATH=/root/wasi-sdk-${WASI_VERSION_FULL}
ENV CC_wasm32-wasi="${WASI_SDK_PATH}/bin/clang --sysroot=${WASI_SDK_PATH}/share/wasi-sysroot"
ENV CARGO_TARGET_WASM32_WASI_LINKER="${WASI_SDK_PATH}/bin/clang"
ENV CARGO_TARGET_WASM32_WASI_RUNNER=wasmtime

ENV RUSTFLAGS=-Ctarget-feature=-crt-static

1 change: 0 additions & 1 deletion ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ testcrate_dir="$(pwd)/testcrate"
set -ex

export CARGO_TARGET_AARCH64_APPLE_DARWIN_RUNNER=echo
export CARGO_TARGET_WASM32_WASI_RUNNER=wasmtime

cargo test --manifest-path "$testcrate_dir/Cargo.toml" --target $target -vvv
cargo test --manifest-path "$testcrate_dir/Cargo.toml" --target $target -vvv --release
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,8 @@ impl Build {
// -D_WASI_EMULATED_GETPID and link with -lwasi-emulated-getpid
// The link argument is output in the `Artifacts::print_cargo_metadata` method
"-D_WASI_EMULATED_GETPID",
// WASI doesn't have chmod right now, so don't try to use it.
"-DNO_CHMOD",
]);
}

Expand Down