ci: back to runner host with tsinghua rustup mirror
This commit is contained in:
parent
cb137cfdfb
commit
c8182f89da
@ -7,13 +7,12 @@ on:
|
||||
branches: [main, master]
|
||||
|
||||
env:
|
||||
CARGO_NET_OFFLINE: false
|
||||
RUSTUP_UPDATE_ROOT: https://mirrors.tuna.tsinghua.edu.cn/rustup/rustup
|
||||
RUSTUP_DIST_SERVER: https://mirrors.tuna.tsinghua.edu.cn/rustup
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/library/rust:bookworm
|
||||
steps:
|
||||
- name: Checkout
|
||||
run: |
|
||||
@ -27,6 +26,11 @@ jobs:
|
||||
mkdir -p "$HOME/.cargo"
|
||||
printf '%s\n' '[source.crates-io]' "replace-with = 'ustc'" '' "[source.ustc]" 'registry = "sparse+https://mirrors.ustc.edu.cn/crates.io-index/"' > "$HOME/.cargo/config.toml"
|
||||
|
||||
- name: Install Rust toolchain
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Install Node.js
|
||||
run: |
|
||||
apt-get update
|
||||
@ -55,11 +59,10 @@ jobs:
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/library/rust:bookworm
|
||||
needs: check
|
||||
env:
|
||||
CARGO_NET_OFFLINE: false
|
||||
RUSTUP_UPDATE_ROOT: https://mirrors.tuna.tsinghua.edu.cn/rustup/rustup
|
||||
RUSTUP_DIST_SERVER: https://mirrors.tuna.tsinghua.edu.cn/rustup
|
||||
steps:
|
||||
- name: Checkout
|
||||
run: |
|
||||
@ -73,6 +76,11 @@ jobs:
|
||||
mkdir -p "$HOME/.cargo"
|
||||
printf '%s\n' '[source.crates-io]' "replace-with = 'ustc'" '' "[source.ustc]" 'registry = "sparse+https://mirrors.ustc.edu.cn/crates.io-index/"' > "$HOME/.cargo/config.toml"
|
||||
|
||||
- name: Install Rust toolchain
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Install Node.js
|
||||
run: |
|
||||
apt-get update
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user