feat(interop-tests): avoid re-building wasm-pack and wasm-opt

These two are currently always re-built on every run. We don't need `wasm-opt` if we build the WASM in debug mode and we can install `wasm-pack` by downloading it from a URL.

Pull-Request: #4497.
This commit is contained in:
Thomas Eizinger
2023-09-13 20:04:28 +10:00
committed by GitHub
parent 34b37987ca
commit 1fff308d19

View File

@@ -6,11 +6,8 @@ ADD . .
RUN rustup target add wasm32-unknown-unknown
RUN --mount=type=cache,target=/usr/local/cargo/registry \
cargo install wasm-pack@0.11.1 --locked
RUN --mount=type=cache,target=/usr/local/cargo/registry \
cargo install wasm-opt@0.113.0 --locked
RUN wget -q -O- https://github.com/rustwasm/wasm-pack/releases/download/v0.12.1/wasm-pack-v0.12.1-x86_64-unknown-linux-musl.tar.gz | tar -zx -C /usr/local/bin --strip-components 1 --wildcards "wasm-pack-*/wasm-pack"
RUN wget -q -O- https://github.com/WebAssembly/binaryen/releases/download/version_115/binaryen-version_115-x86_64-linux.tar.gz | tar -zx -C /usr/local/bin --strip-components 2 --wildcards "binaryen-version_*/bin/wasm-opt"
RUN --mount=type=cache,target=./target \
--mount=type=cache,target=/usr/local/cargo/registry \