Skip to content

Commit fe15980

Browse files
authored
test: update all tools used for running tests (#548)
This updates: - `wasi-sdk` to v24 - Wasmtime to v26.0.1 - `wasm-tools` to v1.220.0
1 parent dfecba3 commit fe15980

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ jobs:
125125
export WASIP1_DIR=$(realpath $($CLANG_DIR/clang -print-resource-dir)/lib/wasip1/)
126126
export WASIP2_DIR=$(realpath $($CLANG_DIR/clang -print-resource-dir)/lib/wasip2/)
127127
mkdir -p $WASI_DIR $WASIP1_DIR $WASIP2_DIR
128-
cp download/lib/wasi/libclang_rt.builtins-wasm32.a $WASI_DIR
129-
cp download/lib/wasi/libclang_rt.builtins-wasm32.a $WASIP1_DIR
130-
cp download/lib/wasi/libclang_rt.builtins-wasm32.a $WASIP2_DIR
128+
cp download/libclang_rt.builtins-wasm32.a $WASI_DIR
129+
cp download/libclang_rt.builtins-wasm32.a $WASIP1_DIR
130+
cp download/libclang_rt.builtins-wasm32.a $WASIP2_DIR
131131
TARGET_TRIPLE=wasm32-wasi make test
132132
rm -r build
133133
TARGET_TRIPLE=wasm32-wasip1 make test

test/Makefile

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ TARGET_TRIPLE ?= wasm32-wasi
2222

2323
LIBC_TEST_URL ?= https://github.com/bytecodealliance/libc-test
2424
LIBC_TEST = $(DOWNDIR)/libc-test
25-
LIBRT_URL ?= https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-16/libclang_rt.builtins-wasm32-wasi-16.0.tar.gz
26-
LIBRT = $(DOWNDIR)/lib/wasi/libclang_rt.builtins-wasm32.a
27-
WASMTIME_URL ?= https://github.com/bytecodealliance/wasmtime/releases/download/v17.0.0/wasmtime-v17.0.0-x86_64-linux.tar.xz
25+
LIBRT_URL ?= https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-24/libclang_rt.builtins-wasm32-wasi-24.0.tar.gz
26+
LIBRT = $(DOWNDIR)/libclang_rt.builtins-wasm32.a
27+
WASMTIME_URL ?= https://github.com/bytecodealliance/wasmtime/releases/download/v26.0.1/wasmtime-v26.0.1-x86_64-linux.tar.xz
2828
WASMTIME = $(DOWNDIR)/$(shell basename $(WASMTIME_URL) .tar.xz)/wasmtime
29-
WASM_TOOLS_URL ?= https://github.com/bytecodealliance/wasm-tools/releases/download/wasm-tools-1.0.54/wasm-tools-1.0.54-x86_64-linux.tar.gz
29+
WASM_TOOLS_URL ?= https://github.com/bytecodealliance/wasm-tools/releases/download/v1.220.0/wasm-tools-1.220.0-x86_64-linux.tar.gz
3030
WASM_TOOLS = $(DOWNDIR)/$(shell basename $(WASM_TOOLS_URL) .tar.gz)/wasm-tools
31-
ADAPTER_URL ?= https://github.com/bytecodealliance/wasmtime/releases/download/v17.0.0/wasi_snapshot_preview1.command.wasm
31+
ADAPTER_URL ?= https://github.com/bytecodealliance/wasmtime/releases/download/v26.0.1/wasi_snapshot_preview1.command.wasm
3232
ADAPTER = $(DOWNDIR)/wasi_snapshot_preview1.command.wasm
3333

3434
TO_DOWNLOAD = $(LIBC_TEST) $(LIBRT) $(WASMTIME)
@@ -44,10 +44,11 @@ $(DOWNDIR):
4444
$(LIBC_TEST): | $(DOWNDIR)
4545
git clone --depth 1 $(LIBC_TEST_URL) $@
4646

47-
# TODO install target to place into...
47+
# TODO: add install target to copy builtins library directly into a Clang
48+
# installation.
4849
$(LIBRT): | $(DOWNDIR)
4950
wget --no-clobber --directory-prefix=$(DOWNDIR) $(LIBRT_URL)
50-
tar --extract --file=$(DOWNDIR)/$(shell basename $(LIBRT_URL)) --directory=$(DOWNDIR)/
51+
tar --extract --file=$(DOWNDIR)/$(shell basename $(LIBRT_URL)) --strip-components=1 --directory=$(DOWNDIR)/
5152

5253
$(WASMTIME): | $(DOWNDIR)
5354
wget --no-clobber --directory-prefix=$(DOWNDIR) $(WASMTIME_URL)
@@ -61,7 +62,7 @@ $(ADAPTER): | $(DOWNDIR)
6162
wget --no-clobber --directory-prefix=$(DOWNDIR) $(ADAPTER_URL)
6263

6364
clean::
64-
rm -rf download
65+
rm -rf $(DOWNDIR)
6566

6667
##### BUILD ####################################################################
6768

@@ -145,7 +146,7 @@ endif
145146
# due to a missing `libclang_rt.builtins-wasm32.a` in the Clang lib directory.
146147
# This location is system-dependent, but could be fixed by something like:
147148
# $ sudo mkdir /usr/lib64/clang/14.0.5/lib/wasi
148-
# $ sudo cp download/lib/wasi/libclang_rt.builtins-wasm32.a /usr/lib64/clang/14.0.5/lib/wasi/
149+
# $ sudo cp download/libclang_rt.builtins-wasm32.a /usr/lib64/clang/14.0.5/lib/wasi/
149150
build: download $(WASMS)
150151

151152
$(WASMS): | $(OBJDIRS)

0 commit comments

Comments
 (0)