forked from rust-lang/libc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit updates CI to resume testing WASI. This updates the container and testing scripts from historical processes to more modern ones, e.g. downloading wasi-sdk instead of compiling a custom toolchain. This should make it easier to update in the future and keep it in sync with rust-lang/rust as well. This also required a few minor fixes such as: * The `S_IFIFO` and `S_IFMT` constants had incorrect values. * The `CLOCK_*` definitions cause `ctest2`'s parsing to panic to they're skipped with a new `#[cfg]`. * A new `langinfo.h` header was added to the list to include. * Some historically skipped checks were removed since they're no longer necessary. * Checks for `__errno_location` are disabled since that doesn't actually exist in headers. * Checks for `select` are disabled because the Rust definition got the `const`-ness swapped for the final `timeval` argument.
- Loading branch information
1 parent
72cb7aa
commit 7c10562
Showing
7 changed files
with
80 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM ubuntu:24.04 | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
curl \ | ||
clang \ | ||
xz-utils | ||
|
||
# Wasmtime is used to execute tests and wasi-sdk is used to compile tests. | ||
# Download appropriate versions here and configure various flags below. | ||
ENV WASMTIME 24.0.0 | ||
ENV WASI_SDK 24 | ||
|
||
RUN curl -L https://github.com/bytecodealliance/wasmtime/releases/download/v$WASMTIME/wasmtime-v$WASMTIME-x86_64-linux.tar.xz | \ | ||
tar xJf - | ||
ENV PATH=$PATH:/wasmtime-v$WASMTIME-x86_64-linux | ||
|
||
RUN curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$WASI_SDK/wasi-sdk-$WASI_SDK.0-x86_64-linux.deb | ||
RUN dpkg -i ./wasi-sdk-*.deb | ||
|
||
# Note that `-D_WASI_EMULATED_PROCESS_CLOCKS` is used to enable access to | ||
# clock-related defines even though they're emulated. Also note that the usage | ||
# of `-Ctarget-feature=-crt-static` here forces usage of the external wasi-libc | ||
# installed via `wasi-sdk` instead of the version that comes with the standard | ||
# library. | ||
ENV CARGO_TARGET_WASM32_WASIP1_RUNNER=wasmtime \ | ||
CARGO_TARGET_WASM32_WASIP1_LINKER=/opt/wasi-sdk/bin/clang \ | ||
CARGO_TARGET_WASM32_WASIP1_RUSTFLAGS="-lwasi-emulated-process-clocks -Ctarget-feature=-crt-static" \ | ||
CC_wasm32_wasip1=/opt/wasi-sdk/bin/clang \ | ||
CFLAGS_wasm32_wasip1=-D_WASI_EMULATED_PROCESS_CLOCKS \ | ||
PATH=$PATH:/rust/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters