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