This commit is contained in:
chenwj113 2024-08-21 16:32:37 +08:00
parent 672094484c
commit 56311d6351
1 changed files with 19 additions and 11 deletions

View File

@ -115,21 +115,29 @@ runs:
if [[ ! -f ~/.cargo/config ]]; then
mkdir -p ~/.cargo
cat > ~/.cargo/config <<EOF
[source.crates-io]
replace-with = 'rsproxy-sparse'
[source.crates-io]
replace-with = 'rsproxy-sparse'
[source.rsproxy]
registry = "https://rsproxy.cn/crates.io-index"
[source.rsproxy]
registry = "https://rsproxy.cn/crates.io-index"
[source.rsproxy-sparse]
registry = "sparse+https://rsproxy.cn/index/"
[source.rsproxy-sparse]
registry = "sparse+https://rsproxy.cn/index/"
[registries.rsproxy]
index = "https://rsproxy.cn/crates.io-index"
[registries.rsproxy]
index = "https://rsproxy.cn/crates.io-index"
[net]
git-fetch-with-cli = true
EOF
[net]
git-fetch-with-cli = true
EOF
fi
- name: Install Rust toolchain
if: runner.os != 'Windows'
shell: bash
run: |
if ! command -v rustup &> /dev/null ; then
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://rsproxy.cn/rustup-init.sh" | sh -s -- --default-toolchain none -y
fi
- name: Install Rust toolchain