From e302e80cc9969f0bb579f029e99d4c1c31a14ff2 Mon Sep 17 00:00:00 2001 From: fristyxd Date: Wed, 11 Nov 2026 17:48:42 +0300 Subject: [PATCH] ci: cache the Windows cargo build and check arm64 in debug Add the cargo cache to the CI Windows job and the release Windows CLI job, and build the arm64 CLI in debug mode for CI so the matrix job stops dominating the run. --- .gitea/workflows/ci.yml | 17 ++++++++++++++--- .gitea/workflows/release.yml | 5 ++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 2fe94f8..a8c7ad0 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -63,6 +63,17 @@ jobs: steps: - uses: actions/checkout@v7 + - name: Cache cargo + uses: actions/cache@v6 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + cli/target + key: ${{ runner.os }}-cargo-check-${{ hashFiles('cli/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-check- + - name: Install Rust shell: powershell run: | @@ -141,10 +152,10 @@ jobs: ~/.cargo/registry ~/.cargo/git cli/target - key: ${{ runner.os }}-cargo-arm64-${{ hashFiles('cli/Cargo.lock') }} + key: ${{ runner.os }}-cargo-arm64-check-${{ hashFiles('cli/Cargo.lock') }} restore-keys: | - ${{ runner.os }}-cargo-arm64- + ${{ runner.os }}-cargo-arm64-check- - name: Cross-compile for arm64 working-directory: cli - run: cargo zigbuild --release --target aarch64-unknown-linux-musl --no-default-features + run: cargo zigbuild --target aarch64-unknown-linux-musl --no-default-features diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 6e69dd2..af4cc37 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -74,7 +74,6 @@ jobs: - uses: actions/checkout@v7 - name: Cache cargo - if: matrix.os != 'windows-latest' uses: actions/cache@v6 with: path: | @@ -194,9 +193,9 @@ jobs: ~/.cargo/registry ~/.cargo/git cli/target - key: ${{ runner.os }}-cargo-arm64-${{ hashFiles('cli/Cargo.lock') }} + key: ${{ runner.os }}-cargo-arm64-release-${{ hashFiles('cli/Cargo.lock') }} restore-keys: | - ${{ runner.os }}-cargo-arm64- + ${{ runner.os }}-cargo-arm64-release- - name: Stamp the version env: