diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 465ad1107c..1508cbc57f 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -24,8 +24,9 @@ jobs: build-wasm: timeout-minutes: 30 runs-on: ${{ matrix.os }} - container: + container: image: ghcr.io/anoma/namada:wasm-0.6.1 + options: -v /home/runner/work/namada":"/usr/local/rust/wasm strategy: fail-fast: false matrix: @@ -35,10 +36,11 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v3 - - name: Show rust toolchain info - run: rustup show + - name: Duplicate checksums file + run: cp wasm/checksums.json wasm/original-checksums.json - name: Build WASM - run: cp wasm/checksums.json wasm/original-checksums.json && make build-wasm-scripts + run: | + make build-wasm-scripts - name: Upload wasm artifacts uses: actions/upload-artifact@v3 with: @@ -96,7 +98,7 @@ jobs: cache_key: anoma cache_version: v1 wait_for: anoma-release (ubuntu-latest, ABCI Release build, anoma-e2e-release, v1) - tendermint_artifact: tendermint-unreleased-29e5fbcc648510e4763bd0af0b461aed92c21f30 + tendermint_artifact: tendermint-unreleased-559fb33ff9b27503ce7ac1c7d8589fe1d8b3e900 env: CARGO_INCREMENTAL: 0 diff --git a/Makefile b/Makefile index d1feaa2235..ea42642e83 100644 --- a/Makefile +++ b/Makefile @@ -229,7 +229,7 @@ build-wasm-image-docker: docker build -t namada-wasm - < docker/namada-wasm/Dockerfile build-wasm-scripts-docker: build-wasm-image-docker - docker run --rm -v ${PWD}:/usr/local/rust/wasm namada-wasm make build-wasm-scripts + docker run --rm -v ${PWD}:/__w/namada/namada namada-wasm make build-wasm-scripts # Build the validity predicate, transactions, matchmaker and matchmaker filter wasm build-wasm-scripts: diff --git a/docker/namada-wasm/Dockerfile b/docker/namada-wasm/Dockerfile index 1e710f5977..05d954c8e0 100644 --- a/docker/namada-wasm/Dockerfile +++ b/docker/namada-wasm/Dockerfile @@ -1,18 +1,16 @@ # This docker is used for deterministic wasm builds # The version should be matching the version set in wasm/rust-toolchain.toml -FROM rust:1.61.0 +FROM rust:1.61 -WORKDIR /usr/local/rust/wasm +WORKDIR /__w/namada/namada # The version should be matching the version set above -RUN rustup toolchain install 1.61.0 --component rustc cargo rust-std rust-docs rls rust-analysis rustfmt +RUN rustup toolchain install 1.61.0 --profile minimal RUN rustup target add wasm32-unknown-unknown -# Download binaryen and verify checksum +# Download binaryen and extract wasm-opt ADD https://github.com/WebAssembly/binaryen/releases/download/version_109/binaryen-version_109-x86_64-linux.tar.gz /tmp/binaryen.tar.gz - -# Extract and install wasm-opt RUN tar -xf /tmp/binaryen.tar.gz RUN mv binaryen-version_*/bin/wasm-opt /usr/local/bin RUN rm -rf binaryen-version_*/ /tmp/binaryen.tar.gz