From ebbba106088ed1a6809f9b3c0049c339fedab7dd Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Tue, 7 May 2024 11:25:02 -0500 Subject: [PATCH] Try a workaround for macOS CI failures CARGO_NET_GIT_FETCH_WITH_CLI uses the `git` executable instead of the rust git2 crate/lib, which speeds things up and is known to resolve some issues fetching the registry or individual crates. This is to work around a specific issue with git-resident Cargo.toml dependencies (e.g. terminfo) that keep randomly failing to download under macOS CI. --- .github/workflows/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f42198ef0..5135d29c5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -152,6 +152,10 @@ jobs: runs-on: macos-latest + env: + # macOS runners keep having issues loading Cargo.toml dependencies from git (GitHub) instead + # of crates.io, so give this a try. It's also sometimes significantly faster on all platforms. + CARGO_NET_GIT_FETCH_WITH_CLI: true steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@1.70