3333 ~/.cargo/registry
3434 **/Cargo.lock
3535 **/bindings/rust/target
36+ ~/.wasmtime
3637 key : ${{ runner.os }}-${{ runner.arch }}-cargo-${{ steps.get-date.outputs.date }}
3738
3839 - name : Environment
@@ -42,21 +43,14 @@ jobs:
4243 sysctl hw 2>/dev/null && echo --- || true
4344 env | sort
4445
45- - name : Install Rust
46- if : ${{ runner.os == 'Windows' && runner.arch == 'ARM64 ' }}
46+ - name : Install Wasmtime
47+ if : ${{ runner.os == 'Linux ' }}
4748 shell : bash
48- run : |
49- if ! which cargo > /dev/null 2>&1; then
50- curl -sSf -o rustup-init.exe https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe
51- ./rustup-init.exe --profile minimal --component clippy -y
52- fi
49+ run : [ -d ~/.wasmtime/bin ] || (curl https://wasmtime.dev/install.sh -sSf | bash)
5350
5451 - name : Rust
5552 shell : bash
5653 run : |
57- if [ -d "$HOME/.cargo/bin" ] && ! which cargo > /dev/null 2>&1; then
58- export PATH="$HOME/.cargo/bin:$PATH"
59- fi
6054 rustc --version --verbose
6155 export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
6256 cd bindings/rust
@@ -85,15 +79,16 @@ jobs:
8579 env BLST_TEST_NO_STD= \
8680 CARGO_TARGET_${triplet}_RUNNER="bash ulimit-s $stack_size" \
8781 cargo test --release
88- if [ $RUNNER_OS = "Linux" ]; then
82+ if [ -x ~/.wasmtime/bin/wasmtime ]; then
8983 echo '--- test wasm32-wasip1'
9084 echo
9185 rustup target add wasm32-wasip1
92- curl https://wasmtime.dev/install.sh -sSf | bash
9386 env CARGO_TARGET_WASM32_WASIP1_RUNNER=~/.wasmtime/bin/wasmtime \
9487 cargo test --release --target=wasm32-wasip1
9588 cargo clean -p blst --release --target=wasm32-wasip1
9689 echo
90+ fi
91+ if [ $RUNNER_OS = "Linux" ]; then
9792 if [ `uname -p` = "x86_64" ]; then
9893 echo '--- test -mlvi-hardening'
9994 echo
@@ -161,6 +156,7 @@ jobs:
161156 rm -rf target/*/{debug,release}/incremental
162157 rm -rf ~/.cargo/registry/src
163158 rm -rf ~/.cargo/registry/index/*/.cache
159+ mkdir -p ~/.wasmtime
164160
165161 - name : Go
166162 if : ${{ runner.os != 'Windows' || runner.arch != 'ARM64' }}
0 commit comments