From 55942c59ec7d9ebdbc994d929b579455e006b193 Mon Sep 17 00:00:00 2001 From: Yezzi Hsueh Date: Fri, 27 Jun 2025 17:17:36 +0800 Subject: [PATCH] ci: update toolchain --- .gitea/workflows/cron.yml | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/cron.yml b/.gitea/workflows/cron.yml index e87ef78..e3fb6b8 100644 --- a/.gitea/workflows/cron.yml +++ b/.gitea/workflows/cron.yml @@ -9,18 +9,33 @@ jobs: Build: runs-on: ubuntu-22.04 steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Rust - uses: actions-rust-lang/setup-rust-toolchain@v1 + - uses: actions/checkout@v4 + - uses: actions/cache@v4 + env: + prefix-key: v0-rust with: - toolchain: stable - - name: Create Script - uses: actions-rs/cargo@v1 + key: ${{ env.prefix-key }}-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Cargo.lock') }} + restore-keys: | + ${{ env.prefix-key }}-${{ runner.os }}-${{ runner.arch }}- + ${{ env.prefix-key }}-${{ runner.os }}- + ${{ env.prefix-key }}- + path: | + ~/.cargo/bin + ~/.cargo/.crates.toml + ~/.cargo/.crates2.json + ~/.cargo/registry + ~/.cargo/git + ~/.rustup/toolchains + ./target + - uses: dtolnay/rust-toolchain@stable + with: + toolchain: 1.88.0 + - uses: actions-rs/cargo@v1 with: command: run -# - name: Upload Artifact -# uses: christopherhx/gitea-upload-artifact@v4 -# with: -# name: chn_list.rsc -# path: chn_list.rsc + - name: Upload Artifact + uses: christopherhx/gitea-upload-artifact@v4 + with: + name: chn_list.rsc + path: chn_list.rsc + retention-days: 7