Skip to content

Commit

Permalink
feat(interop-tests): avoid re-building wasm-pack and wasm-opt
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
thomaseizinger authored Sep 13, 2023
1 parent 34b3798 commit 1fff308
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions interop-tests/Dockerfile.chromium
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 1fff308

Please sign in to comment.