修改CICD安装Rust环境bug4,尝试解决
Some checks failed
build / build-rust (push) Failing after 51s

This commit is contained in:
soul-walker 2024-09-15 10:21:15 +08:00
parent d27bfdda08
commit 5b570cd036

View File

@ -20,8 +20,9 @@ jobs:
curl --proto '=https' --tlsv1.2 -sSf https://rsproxy.cn/rustup-init.sh | sh -s -- -y curl --proto '=https' --tlsv1.2 -sSf https://rsproxy.cn/rustup-init.sh | sh -s -- -y
echo "\n execute source $HOME/.cargo/env and validate rustup version" echo "\n execute source $HOME/.cargo/env and validate rustup version"
. "$HOME/.cargo/env" . "$HOME/.cargo/env"
echo $PATH
rustup --version rustup --version
echo "write env to ~/.bashrc"
echo ". $HOME/.cargo/env" >> ~/.bashrc
mkdir -p ~/.cargo mkdir -p ~/.cargo
echo '[source.crates-io]' > ~/.cargo/config.toml echo '[source.crates-io]' > ~/.cargo/config.toml
echo 'replace-with = "rsproxy-sparse"' >> ~/.cargo/config.toml echo 'replace-with = "rsproxy-sparse"' >> ~/.cargo/config.toml
@ -33,7 +34,7 @@ jobs:
echo 'index = "https://rsproxy.cn/crates.io-index"' >> ~/.cargo/config.toml echo 'index = "https://rsproxy.cn/crates.io-index"' >> ~/.cargo/config.toml
echo '[net]' >> ~/.cargo/config.toml echo '[net]' >> ~/.cargo/config.toml
echo 'git-fetch-with-cli = true' >> ~/.cargo/config.toml echo 'git-fetch-with-cli = true' >> ~/.cargo/config.toml
cat ~/.cargo/config.toml cat $HOME/.cargo/config.toml
- uses: https://gitea.joylink.club/actions/rust-cache@v2 - uses: https://gitea.joylink.club/actions/rust-cache@v2
- name: build Release - name: build Release
run: | run: |