Skip to content
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

Improved handling of wasmer-headless generation and use on local run #3562

Merged
merged 3 commits into from
Feb 2, 2023
Merged
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
30 changes: 27 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ endif

# Not really "all", just the default target that builds enough so make
# install will go through.
all: build-wasmer build-capi
all: build-wasmer build-capi build-capi-headless

check: check-wasmer check-wasmer-wasm check-capi

Expand Down Expand Up @@ -561,10 +561,10 @@ test-wasi-unit:
test-wasi:
$(CARGO_BINARY) test $(CARGO_TARGET_FLAG) --release --tests $(compiler_features) -- wasi::wasitests

test-integration-cli: build-wasmer build-capi package distribution
test-integration-cli: build-wasmer build-capi package-capi-headless package distribution
cp ./dist/wasmer.tar.gz ./link.tar.gz
rustup target add wasm32-wasi
$(CARGO_BINARY) test $(CARGO_TARGET_FLAG) --features webc_runner --no-fail-fast -p wasmer-integration-tests-cli -- --nocapture --test-threads=1
WASMER_DIR=`pwd`/package $(CARGO_BINARY) test $(CARGO_TARGET_FLAG) --features webc_runner --no-fail-fast -p wasmer-integration-tests-cli -- --nocapture --test-threads=1

# Before running this in the CI, we need to set up link.tar.gz and /cache/wasmer-[target].tar.gz
test-integration-cli-ci:
Expand Down Expand Up @@ -635,6 +635,10 @@ package-capi:
cp target/headless/$(CARGO_TARGET)/release/wasmer.dll package/lib/wasmer-headless.dll ;\
fi

if [ -f target/headless/$(HOST_TARGET)/release/wasmer.dll ]; then \
theduke marked this conversation as resolved.
Show resolved Hide resolved
cp target/headless/$(HOST_TARGET)/release/wasmer.dll package/lib/wasmer-headless.dll ;\
fi

if [ -f $(TARGET_DIR)/wasmer.dll.lib ]; then \
cp $(TARGET_DIR)/wasmer.dll.lib package/lib/wasmer.dll.lib ;\
fi
Expand All @@ -643,6 +647,10 @@ package-capi:
cp target/headless/$(CARGO_TARGET)/release/wasmer.dll.lib package/lib/wasmer-headless.dll.lib ;\
fi

if [ -f target/headless/$(HOST_TARGET)/release/wasmer.dll.lib ]; then \
cp target/headless/$(HOST_TARGET)/release/wasmer.dll.lib package/lib/wasmer-headless.dll.lib ;\
fi

if [ -f $(TARGET_DIR)/wasmer.lib ]; then \
cp $(TARGET_DIR)/wasmer.lib package/lib/wasmer.lib ;\
fi
Expand All @@ -651,6 +659,10 @@ package-capi:
cp target/headless/$(CARGO_TARGET)/release/wasmer.lib package/lib/wasmer-headless.lib ;\
fi

if [ -f target/headless/$(HOST_TARGET)/release/wasmer.lib ]; then \
cp target/headless/$(HOST_TARGET)/release/wasmer.lib package/lib/wasmer-headless.lib ;\
fi

if [ -f $(TARGET_DIR)/libwasmer.dylib ]; then \
cp $(TARGET_DIR)/libwasmer.dylib package/lib/libwasmer.dylib ;\
fi
Expand All @@ -659,6 +671,10 @@ package-capi:
cp target/headless/$(CARGO_TARGET)/release/libwasmer.dylib package/lib/libwasmer-headless.dylib ;\
fi

if [ -f target/headless/$(HOST_TARGET)/release/libwasmer.dylib ]; then \
cp target/headless/$(HOST_TARGET)/release/libwasmer.dylib package/lib/libwasmer-headless.dylib ;\
fi

if [ -f $(TARGET_DIR)/libwasmer.so ]; then \
cp $(TARGET_DIR)/libwasmer.so package/lib/libwasmer.so ;\
fi
Expand All @@ -667,6 +683,10 @@ package-capi:
cp target/headless/$(CARGO_TARGET)/release/libwasmer.so package/lib/libwasmer-headless.so ;\
fi

if [ -f target/headless/$(HOST_TARGET)/release/libwasmer.so ]; then \
cp target/headless/$(HOST_TARGET)/release/libwasmer.so package/lib/libwasmer-headless.so ;\
fi

if [ -f $(TARGET_DIR)/libwasmer.a ]; then \
cp $(TARGET_DIR)/libwasmer.a package/lib/libwasmer.a ;\
fi
Expand All @@ -675,6 +695,10 @@ package-capi:
cp target/headless/$(CARGO_TARGET)/release/libwasmer.a package/lib/libwasmer-headless.a ;\
fi

if [ -f target/headless/$(HOST_TARGET)/release/libwasmer.a ]; then \
cp target/headless/$(HOST_TARGET)/release/libwasmer.a package/lib/libwasmer-headless.a ;\
fi

if [ -f target/$(HOST_TARGET)/release/wasmer.dll ]; then \
cp target/$(HOST_TARGET)/release/wasmer.dll package/lib/wasmer.dll ;\
fi
Expand Down