From 06527a52a4ec330bb1d7cf7e63cf4f5c1246ca4e Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Thu, 5 Feb 2026 14:58:53 +0000 Subject: [PATCH] fix: update CI workflow to use actions-rs/toolchain@v1 --- .gitea/workflows/ci.yml | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 93d7089..e9a5ed1 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -2,24 +2,43 @@ name: CI on: push: - branches: [main] + branches: + - main pull_request: - branches: [main] + branches: + - main jobs: test: runs-on: ubuntu-latest + timeout: 600 steps: - - name: Checkout repository + - name: Checkout code uses: actions/checkout@v4 - - name: Setup Rust + - name: Set up Rust uses: actions-rs/toolchain@v1 with: toolchain: stable profile: minimal override: true + - name: Cache cargo registry + uses: actions/cache@v4 + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-registry- + + - name: Cache cargo build + uses: actions/cache@v4 + with: + path: target + key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-build- + - name: Build project run: cargo build --all-features @@ -30,4 +49,4 @@ jobs: run: cargo clippy --all-features -- -D warnings - name: Check formatting - run: cargo fmt --check + run: cargo fmt --check -- --color=never