mirror of
https://github.com/bensuperpc/dockcross.git
synced 2026-07-26 04:48:08 +02:00
Test decentralized
This commit is contained in:
@@ -9,7 +9,11 @@ ENV WASI_VERSION=27
|
||||
ENV WASI_VERSION_FULL=${WASI_VERSION}.0
|
||||
|
||||
ENV WASMTIME_HOME=/wasi-runtimes/wasmtime
|
||||
RUN mkdir -p ${WASMTIME_HOME} && curl https://wasmtime.dev/install.sh -sSf | bash
|
||||
# Pinned below v47.0.0: that release removes wasi-threads/wasi-common support
|
||||
# entirely (see https://github.com/bytecodealliance/rfcs/pull/47), which the
|
||||
# wasi-sdk sysroot test suite below relies on for its threaded targets.
|
||||
ENV WASMTIME_VERSION=v46.0.1
|
||||
RUN mkdir -p ${WASMTIME_HOME} && curl https://wasmtime.dev/install.sh -sSf | bash -s -- --version ${WASMTIME_VERSION}
|
||||
ENV PATH="$WASMTIME_HOME/bin:$PATH"
|
||||
|
||||
COPY download-build-install-wasi-sdk.sh /usr/local/bin/
|
||||
|
||||
@@ -17,6 +17,22 @@ git fetch origin --tags
|
||||
git remote add upstream https://github.com/WebAssembly/wasi-sdk
|
||||
git fetch upstream wasi-sdk-${WASI_VERSION}
|
||||
|
||||
# Recent wasmtime releases require the threads and shared-memory wasm
|
||||
# features to be enabled explicitly. WASI_SDK_RUNWASI is a single cache
|
||||
# variable shared by every test target (wasi, wasip1, wasip2, and their
|
||||
# -threads variants), so overriding it globally breaks the non-threads
|
||||
# targets. Instead, route only the `*-threads` targets through the
|
||||
# wrapper by patching the per-test runner selection in tests/CMakeLists.txt.
|
||||
cat > /usr/local/bin/wasmtime-run-threads.sh <<'EOS'
|
||||
#!/usr/bin/env bash
|
||||
exec wasmtime run -W threads=y,shared-memory=y -S threads=y,cli=y "$@"
|
||||
EOS
|
||||
chmod +x /usr/local/bin/wasmtime-run-threads.sh
|
||||
sed -i '/if(target MATCHES threads)/a\
|
||||
if(runwasi)\
|
||||
set(runwasi "/usr/local/bin/wasmtime-run-threads.sh")\
|
||||
endif()' tests/CMakeLists.txt
|
||||
|
||||
./ci/build.sh
|
||||
cd build/dist
|
||||
tar xzf wasi-toolchain-*.tar.gz --strip-components=1 -C /opt/wasi-sdk
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
BASE_IMAGE_REGISTRY ?= docker.io
|
||||
BASE_IMAGE_PATH ?= dockcross
|
||||
BASE_IMAGE_NAME = base
|
||||
BASE_IMAGE_TAG = latest
|
||||
|
||||
OUTPUT_IMAGE_REGISTRY ?= docker.io
|
||||
OUTPUT_IMAGE_PATH ?= dockcross
|
||||
OUTPUT_IMAGE_NAME = web-wasi-emulated-threads
|
||||
Reference in New Issue
Block a user