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]
|
branches: [main, master]
|
||||||
|
|
||||||
env:
|
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:
|
jobs:
|
||||||
check:
|
check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
|
||||||
image: registry.cn-hangzhou.aliyuncs.com/library/rust:bookworm
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
run: |
|
run: |
|
||||||
@ -27,6 +26,11 @@ jobs:
|
|||||||
mkdir -p "$HOME/.cargo"
|
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"
|
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
|
- name: Install Node.js
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
apt-get update
|
||||||
@ -55,11 +59,10 @@ jobs:
|
|||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
|
||||||
image: registry.cn-hangzhou.aliyuncs.com/library/rust:bookworm
|
|
||||||
needs: check
|
needs: check
|
||||||
env:
|
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:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
run: |
|
run: |
|
||||||
@ -73,6 +76,11 @@ jobs:
|
|||||||
mkdir -p "$HOME/.cargo"
|
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"
|
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
|
- name: Install Node.js
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
apt-get update
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user