Skip to content

Commit f1e9bf5

Browse files
committed
ci: improve clone link
1 parent 0d26fcc commit f1e9bf5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

install-wasmtime.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ set -euo pipefail -x
44
VER=v0.30.0
55
wget https://github.com/bytecodealliance/wasmtime/releases/download/${VER}/wasmtime-${VER}-x86_64-linux-c-api.tar.xz
66
tar -xvf ./wasmtime-${VER}-x86_64-linux-c-api.tar.xz > /dev/null
7+
mv wasmtime-${VER}-x86_64-linux-c-api wasmtime-c-api
78
if echo "int main(void) {}" | gcc -o /dev/null -v -x c - &> /dev/stdout| grep collect | tr -s " " "\012" | grep musl; then
89
# build from source code if the libc is musl
9-
git clone git@github.com:bytecodealliance/wasmtime -b ${VER} \
10+
git clone https://github.com/bytecodealliance/wasmtime -b ${VER} --depth 1 \
1011
&& cd wasmtime \
1112
&& git submodule update --init \
1213
&& RUSTFLAGS="-C target-feature=-crt-static" \
13-
cargo build --release --manifest-path crates/c-api/Cargo.toml
14+
cargo build --release --manifest-path crates/c-api/Cargo.toml \
15+
&& mv target/release/libwasmtime.* ../wasmtime-c-api/lib \
16+
&& cd ..
1417
fi
15-
mv wasmtime-${VER}-x86_64-linux-c-api wasmtime-c-api

0 commit comments

Comments
 (0)