From 8f6ed67e5dc61455482299b4ac1529e3d59237a1 Mon Sep 17 00:00:00 2001 From: Gianmarco Fraccaroli <> Date: Thu, 28 Jul 2022 18:57:53 +0200 Subject: [PATCH 1/3] [ci] run specific step in docker container --- .github/workflows/build-and-test.yml | 10 ++++++---- Makefile | 2 +- docker/namada-wasm/Dockerfile | 10 ++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 80b131b3df6..1508cbc57f2 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: diff --git a/Makefile b/Makefile index d1feaa2235c..ea42642e83b 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 1e710f5977f..05d954c8e0c 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 From ed84bdacbbfdfe79f0e81429bc1d3b0c8ec6a90e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Zemanovi=C4=8D?= Date: Mon, 1 Aug 2022 12:03:00 +0200 Subject: [PATCH 2/3] update wasm checksums --- wasm/checksums.json | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/wasm/checksums.json b/wasm/checksums.json index 3eb2eafc3de..1495d6f6f54 100644 --- a/wasm/checksums.json +++ b/wasm/checksums.json @@ -1,19 +1,19 @@ { - "tx_bond.wasm": "tx_bond.18d1b20d435eb26c6c7b60de94a31fc1eb3c867042ab76d64d40182290b477a2.wasm", - "tx_from_intent.wasm": "tx_from_intent.1cbae38be36df73bc8a74ec327c7dde3e2bbd12762bca5e41b3ac8bb258785f9.wasm", - "tx_ibc.wasm": "tx_ibc.b3a031223817894e05f979d37fe944518c979a690b56956e2458e7a4578702b1.wasm", - "tx_init_account.wasm": "tx_init_account.cb9bf19d6d334f18a87f892954a32728e0594f8830d733a7adabf91e726f72a1.wasm", - "tx_init_nft.wasm": "tx_init_nft.4ff22d8fc8a15f87564c4bc1af407b381e9db6bed32809172656e7edd62b018f.wasm", - "tx_init_proposal.wasm": "tx_init_proposal.349d2de1bda086a993e2db67ff3bb1b4bf5e706416017fb8cf21595938b12fa8.wasm", - "tx_init_validator.wasm": "tx_init_validator.75b38ea3f67557ceb6ae3615d5137083913b813f559bd12c423c82f554baf2f3.wasm", - "tx_mint_nft.wasm": "tx_mint_nft.458e62a21e7604577cde351c709eed9b23340a20b3afca4cbe81457bab194636.wasm", - "tx_transfer.wasm": "tx_transfer.44129c4825752aadc21801c443fb02b2c210a01f5b6d3f02b54b9925f0f51fc7.wasm", - "tx_unbond.wasm": "tx_unbond.6f4932a9574ad7678fd3e1882f14043b6cd5aa779df7eab10f8e0bf3332e74a8.wasm", - "tx_update_vp.wasm": "tx_update_vp.7c3131c75b8baac1949cdb1ff1e607ce613cd3eb7cd345a8657ab22c7807bec4.wasm", - "tx_vote_proposal.wasm": "tx_vote_proposal.70f114d8774d0ed945b7cc460a479c2106c518e94229be5905c697a0e26b3dba.wasm", - "tx_withdraw.wasm": "tx_withdraw.801b8c466f3420a8a27e52d4dad5ca4d437752c19f05e019fab462a21004343e.wasm", - "vp_nft.wasm": "vp_nft.fa92e0db61f98347ef5460230edbdd899a6a5cdbe90207702d1ddeb5c371eeea.wasm", - "vp_testnet_faucet.wasm": "vp_testnet_faucet.d750fc71f51fb4a0e1cd32bb6de389195d31ab25536f23b45b5ceffbe939bf4c.wasm", - "vp_token.wasm": "vp_token.8c67dad65c5ed4ad859b7037f45a8b1e40abc57160dd63e587a282acdaf90c5e.wasm", - "vp_user.wasm": "vp_user.74e4c673d215833f04cff5f9d71a60a0809ac6ec3fa2dd8c8dbf4f5418493200.wasm" + "tx_bond.wasm": "tx_bond.302172cc7d0a7e2278ce58299809875f354925364b25c9b64e92461995c51950.wasm", + "tx_from_intent.wasm": "tx_from_intent.19099ad11a5f59272bd5dbd8b7bc7093ae66ae7a2b25034300f1b34d3e37ffd1.wasm", + "tx_ibc.wasm": "tx_ibc.9aec1969a37705f9ae5d6e95d13126e0f37e78171ef37c2f0fdd0eb16ac49270.wasm", + "tx_init_account.wasm": "tx_init_account.7a45233a98978c67ff005bf8a1fb8f3f7689a75f98684c1735617776f98fabad.wasm", + "tx_init_nft.wasm": "tx_init_nft.b0dd29e0e982c3bd04c7a8c4dcd0184d9d827df6a4211794dd74fbdced1e7430.wasm", + "tx_init_proposal.wasm": "tx_init_proposal.45be75dc2c22048dce23ae346c895b2be19737a39844416436aac62914847388.wasm", + "tx_init_validator.wasm": "tx_init_validator.5a7c9a3a115883359246a4145af11f748ded043b5b36d1cb71e54fb3ef169183.wasm", + "tx_mint_nft.wasm": "tx_mint_nft.fd8932515db71638263193930f60c14cec54c11e72e6ab40d8201d0247db0c1a.wasm", + "tx_transfer.wasm": "tx_transfer.9e51e5b48ba3ddee699fed334e14fe9a81b7e299b0cfcbf10482b9f784c092c2.wasm", + "tx_unbond.wasm": "tx_unbond.020d22fa306850b0a4aade96f711087d03568ed45276fff60226a80de47cc455.wasm", + "tx_update_vp.wasm": "tx_update_vp.00d828bdf510d92d971ca59015945c8c00f285a802a655451cc5ee87c5ee99bc.wasm", + "tx_vote_proposal.wasm": "tx_vote_proposal.b8aa22d6d22c31fa6c1f4619a81eaa43aa40c8865b91f71449a5f3c65b84eacf.wasm", + "tx_withdraw.wasm": "tx_withdraw.b8538e5acfc2945e98b76cc17eb11a03c545021e8f70cf6e5b436219e749b559.wasm", + "vp_nft.wasm": "vp_nft.d272e0c50f17c020fe806e03278e83377ec45b81e88432316ce836ee24605f6e.wasm", + "vp_testnet_faucet.wasm": "vp_testnet_faucet.79c1da702d67f464453af0b145872bba28913b029508f1257b4a22f69123ec1e.wasm", + "vp_token.wasm": "vp_token.04482a8132e91ab726b4a9027f44a84c885c36e3d608e9c4e153d0cfe4f88449.wasm", + "vp_user.wasm": "vp_user.e390d55fc2e797fcc4c43bd40b93ea1c3d58544d5f086301a0dbc38bd93388ba.wasm" } \ No newline at end of file From fccf65a787cdbac531e704f0ba68448dea9421a1 Mon Sep 17 00:00:00 2001 From: Gianmarco Fraccaroli <> Date: Mon, 1 Aug 2022 18:00:41 +0200 Subject: [PATCH 3/3] [ci] docker use rust:1.61.0 --- docker/namada-wasm/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/namada-wasm/Dockerfile b/docker/namada-wasm/Dockerfile index 05d954c8e0c..2c7009d1017 100644 --- a/docker/namada-wasm/Dockerfile +++ b/docker/namada-wasm/Dockerfile @@ -1,7 +1,7 @@ # 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 +FROM rust:1.61.0 WORKDIR /__w/namada/namada