修改CICD安装Rust环境bug5,尝试解决2
Some checks failed
build / build-rust (push) Failing after 3m24s

This commit is contained in:
soul-walker 2024-09-15 10:26:48 +08:00
parent 5b570cd036
commit b6d8aea3a9

View File

@ -18,11 +18,10 @@ jobs:
export RUSTUP_DIST_SERVER="https://rsproxy.cn"
export RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup"
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"
. "$HOME/.cargo/env"
rustup --version
echo "write env to ~/.bashrc"
echo "write source $HOME/.cargo/env to ~/.bashrc"
echo ". $HOME/.cargo/env" >> ~/.bashrc
cat ~/.bashrc
. ~/.bashrc
mkdir -p ~/.cargo
echo '[source.crates-io]' > ~/.cargo/config.toml
echo 'replace-with = "rsproxy-sparse"' >> ~/.cargo/config.toml
@ -38,6 +37,7 @@ jobs:
- uses: https://gitea.joylink.club/actions/rust-cache@v2
- name: build Release
run: |
cat ~/.bashrc
echo $PATH
rustup target add x86_64-unknown-linux-musl
cargo build --release --target x86_64-unknown-linux-musl