From 3c41a80bf40cdc28862e14af29faa5b22dd5eafa Mon Sep 17 00:00:00 2001 From: pjh456 <147148383@qq.com> Date: Sat, 10 Oct 2026 11:22:40 +0000 Subject: [PATCH] =?UTF-8?q?ci:=20build=20=E4=B8=8E=20test=20=E5=85=B1?= =?UTF-8?q?=E7=94=A8=20rust-cache=20=E9=94=AE=E9=98=B2=E9=99=88=E6=97=A7?= =?UTF-8?q?=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci-test.yml | 5 +++++ .github/workflows/ci.yml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index a628f171..e9618587 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -42,6 +42,11 @@ jobs: submodules: true - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 + with: + # 与 ci.yml 的 build job 同键:复用 build 的 target/ 缓存,只补编 + # test harness。自定义键避免按 profile 自动分键(build/test 各一) + # 导致 test 恢复陈旧缓存、重链接时走默认 ld 报 cannot find ld。 + key: oxide-target-ubuntu-v1 - uses: ./.github/actions/setup-tools - name: Test run: cargo nextest run ${{ matrix.group.args }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 97d99fb7..1d3fddae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,6 +54,11 @@ jobs: submodules: true - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 + with: + # 与 ci-test.yml 的 test job 同键:test 复用 build 的 target/ 缓存, + # 只补编 test harness、不重编整个 workspace。自定义键避免按 profile + # 自动分键(build/test 各一)导致 test 恢复陈旧缓存。 + key: oxide-target-ubuntu-v1 - uses: ./.github/actions/setup-tools - name: Build run: cargo build --verbose