diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 7d559cb..e28c1c1 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -34,13 +34,14 @@ jobs: done [ "$miss" = 0 ] - - name: Verify Rust toolchain + - name: Install Rust toolchain run: | - set -euo pipefail - # Use the host toolchain as is; CI must not update or change it. - command -v cargo >/dev/null || { echo "::error::cargo is not installed on the runner"; exit 1; } - cargo fmt --version - cargo clippy --version + if ! command -v rustup >/dev/null; then + curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal + fi + . "$HOME/.cargo/env" 2>/dev/null || true + rustup toolchain install stable --profile minimal -c rustfmt -c clippy + rustup component add rustfmt clippy cargo --version - name: Cache cargo