From f966c6df2babe7ffc103d80c76c14052ef62bfd5 Mon Sep 17 00:00:00 2001 From: laizy Date: Mon, 3 Apr 2023 11:32:29 +0800 Subject: [PATCH] pin rust nightly version to generate MVP wasm code (#1429) * pin rust nightly version * pin version --- wasmtest/gha-run-wasm-tests.sh | 6 ++++-- wasmtest/run-wasm-tests.sh | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/wasmtest/gha-run-wasm-tests.sh b/wasmtest/gha-run-wasm-tests.sh index a4a474e486..1975e74924 100644 --- a/wasmtest/gha-run-wasm-tests.sh +++ b/wasmtest/gha-run-wasm-tests.sh @@ -9,12 +9,14 @@ wget releases.llvm.org/9.0.0/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04.tar. tar xf clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz > /dev/null 2>&1 export PATH="$(pwd)/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04/bin":$PATH +RUST_VERSION=nightly-2022-12-07 + # ensure rust -curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly +curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUST_VERSION source $HOME/.cargo/env -rustup default nightly +rustup default $RUST_VERSION rustup target add wasm32-unknown-unknown which ontio-wasm-build || cargo install --git=https://github.com/ontio/ontio-wasm-build diff --git a/wasmtest/run-wasm-tests.sh b/wasmtest/run-wasm-tests.sh index 3a8cc33b1a..b7dbe6e6f5 100644 --- a/wasmtest/run-wasm-tests.sh +++ b/wasmtest/run-wasm-tests.sh @@ -9,10 +9,14 @@ if ! which clang-9 ; then export PATH="$(pwd)/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04/bin":$PATH fi + +RUST_VERSION=nightly-2022-12-07 + if ! which rustup ; then - curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly + curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUST_VERSION source $HOME/.cargo/env fi + rustup target add wasm32-unknown-unknown which ontio-wasm-build || cargo install --git=https://github.com/ontio/ontio-wasm-build