diff --git a/.gitea/workflows/desktop.yml b/.gitea/workflows/desktop.yml index 6bac8c3..84bedd7 100644 --- a/.gitea/workflows/desktop.yml +++ b/.gitea/workflows/desktop.yml @@ -70,16 +70,38 @@ jobs: - name: Setup Rust - shell: powershell + shell: bash run: | - $ErrorActionPreference = "Stop" + set -euxo pipefail - rustup update stable - rustup default stable - rustup target add x86_64-pc-windows-msvc + RUST_VERSION="1.98.1" - rustc --version - cargo --version + rm -f /tmp/rustup-init + + curl \ + --fail \ + --location \ + --retry 5 \ + --retry-delay 3 \ + --retry-all-errors \ + --connect-timeout 20 \ + https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init \ + -o /tmp/rustup-init + + chmod +x /tmp/rustup-init + + /tmp/rustup-init \ + -y \ + --profile minimal \ + --default-toolchain "${RUST_VERSION}" \ + --default-host x86_64-unknown-linux-gnu \ + --no-modify-path + + echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" + + "$HOME/.cargo/bin/rustc" --version + "$HOME/.cargo/bin/cargo" --version + "$HOME/.cargo/bin/rustup" --version - name: Show build tools