From 05ef7d9ec88dd032d30a449af7c563ed9903c324 Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Wed, 4 Feb 2026 16:04:11 +0000 Subject: [PATCH] fix: resolve CI workflow failures with Rust toolchain setup --- .gitea/workflows/ci.yml | 46 +++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 0110126..3ada91b 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -12,39 +12,55 @@ jobs: steps: - name: Set up Rust run: | - rustup install stable - rustup default stable + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable + export PATH="$HOME/.cargo/bin:$PATH" + rustc --version + cargo --version - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y libgit2-dev pkg-config + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y libgit2-dev pkg-config cmake libssl-dev - - name: Build project - run: cargo build --release + - name: Build + run: | + export PATH="$HOME/.cargo/bin:$PATH" + cargo build --release 2>&1 - name: Run tests - run: cargo test --all + run: | + export PATH="$HOME/.cargo/bin:$PATH" + cargo test --all 2>&1 lint: runs-on: ubuntu-latest steps: - name: Set up Rust run: | - rustup install stable - rustup default stable + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable + export PATH="$HOME/.cargo/bin:$PATH" + rustup component add clippy - - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y libgit2-dev pkg-config + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y libgit2-dev pkg-config cmake libssl-dev - name: Run clippy - run: cargo clippy --all-features -- -D warnings + run: | + export PATH="$HOME/.cargo/bin:$PATH" + cargo clippy --all-features -- -D warnings 2>&1 format: runs-on: ubuntu-latest steps: - name: Set up Rust run: | - rustup install stable - rustup default stable + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable + export PATH="$HOME/.cargo/bin:$PATH" + rustup component add rustfmt - name: Check formatting - run: cargo fmt --all -- --check + run: | + export PATH="$HOME/.cargo/bin:$PATH" + cargo fmt --all -- --check 2>&1