Skip to content

Commit

Permalink
Merge branch 'fraccaman/ci-fix-wasm' (#234)
Browse files Browse the repository at this point in the history
* fraccaman/ci-fix-wasm:
  [ci] docker use rust:1.61.0
  update wasm checksums
  [ci] run specific step in docker container
  • Loading branch information
tzemanovic committed Aug 1, 2022
2 parents 9587152 + fccf65a commit 9bf15e0
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 27 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 3 additions & 5 deletions docker/namada-wasm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@
# The version should be matching the version set in wasm/rust-toolchain.toml
FROM rust:1.61.0

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
34 changes: 17 additions & 17 deletions wasm/checksums.json
Original file line number Diff line number Diff line change
@@ -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"
}

0 comments on commit 9bf15e0

Please sign in to comment.