Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

Run `cargo fetch` in a retry loop on CI (#13624)

Alex Crichton31fd0180714d
diff --git a/.github/actions/install-rust/action.yml b/.github/actions/install-rust/action.yml
index e01fd98147..7be1e2351c 100644
--- a/.github/actions/install-rust/action.yml
+++ b/.github/actions/install-rust/action.yml
@@ -80,3 +80,12 @@ runs:
- name: Install the WASI target
shell: bash
run: rustup target add wasm32-wasip2 wasm32-wasip1 wasm32-unknown-unknown
+
+ - name: Fetch all Cargo dependencies
+ shell: bash
+ run: |
+ for attempt in 1 2 3 4 5; do
+ [ "$attempt" = "5" ] && exit 1
+ cargo fetch --locked && break
+ sleep 5
+ done
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index aff0052edd..1444c433c0 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -710,8 +710,6 @@ jobs:
- uses: ./.github/actions/apt-get-install
with:
packages: ocaml-nox ocamlbuild ocaml-findlib libzarith-ocaml-dev
- - run: cargo fetch
- working-directory: ./fuzz
- run: cargo fuzz check --dev
- run: cargo fuzz check --dev --fuzz-dir ./cranelift/isle/fuzz
- run: cargo fuzz check --dev --fuzz-dir ./crates/environ/fuzz --features component-model
@@ -843,8 +841,6 @@ jobs:
run: echo "C:\msys64\mingw64\bin" >> $Env:GITHUB_PATH
if: matrix.target == 'x86_64-pc-windows-gnu'
- - run: cargo fetch --locked
-
- uses: ./.github/actions/apt-get-install
name: Install cross-compilation tools
if: matrix.gcc_package != ''