From cfa5397fdedb554e4be7b10848050db1fed7eb6d Mon Sep 17 00:00:00 2001 From: Marvin Date: Tue, 25 Aug 2026 20:04:53 +0000 Subject: [PATCH] ci: replace dtolnay action with portable rust install --- .gitea/workflows/ci.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index e750815..cf9c407 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -20,9 +20,16 @@ jobs: fi - uses: actions/checkout@v4 - name: Install Rust - uses: dtolnay/rust-toolchain@stable - with: - components: rustfmt, clippy + run: | + if command -v rustc >/dev/null 2>&1 && command -v cargo >/dev/null 2>&1; then + echo "Rust already present" + elif command -v apk >/dev/null 2>&1; then + apk add --no-cache rust cargo rustfmt clippy + elif command -v apt-get >/dev/null 2>&1; then + apt-get update && apt-get install -y rustc cargo rustfmt clippy + else + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --component rustfmt,clippy + fi - name: cargo check run: cargo check - name: cargo clippy