From d1f7db2ab7a160bc32bb2ae24089b435e8ff6709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E7=94=B7?= Date: Fri, 24 Apr 2026 08:07:30 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=20sibling=20=E6=A3=80=E5=87=BA=20AuthCor?= =?UTF-8?q?e=20=E4=BB=A5=E5=8C=B9=E9=85=8D=20Cargo=20[patch]=20../AuthCore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GHA 默认只检出 huike-back,导致 ../AuthCore 不存在。将本仓库检出到 huike-back/、AuthCore 检出到同级目录,并在子目录运行 cargo check;rust-cache 指向 huike-back workspace。 根 Cargo.toml 保留 ../AuthCore patch,避免把 AuthCore 嵌进本 workspace(否则会继承 huike-back 的 workspace.dependencies 而缺依赖)。 Made-with: Cursor --- .github/workflows/ci.yml | 14 +++++++++++++- Cargo.toml | 3 +++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5928081..f2d3944 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,8 +13,17 @@ jobs: timeout-minutes: 30 steps: - - name: Checkout + # Two sibling directories: `huike-back/` (this repo) and `AuthCore/` — matches root `Cargo.toml` [patch] paths `../AuthCore/...`. + - name: Checkout huike-back uses: actions/checkout@v4 + with: + path: huike-back + + - name: Checkout AuthCore (Cargo path patch) + uses: actions/checkout@v4 + with: + repository: alchemy-studio/AuthCore + path: AuthCore - name: Install system dependencies run: | @@ -26,6 +35,9 @@ jobs: - name: Cache cargo registry and target uses: Swatinem/rust-cache@v2 + with: + workspaces: huike-back - name: Cargo check workspace + working-directory: huike-back run: cargo check --workspace --all-targets diff --git a/Cargo.toml b/Cargo.toml index 5d31898..b98b730 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,8 @@ members = [ ] resolver = "2" +# Path must stay *outside* this workspace so patched crates keep AuthCore's own [workspace.dependencies]. +# Clone/symlink: monorepo `AuthCore` as sibling `../AuthCore` (see `.github/workflows/ci.yml`). [patch."https://github.com/alchemy-studio/AuthCore.git"] htycommons = { path = "../AuthCore/htycommons" } htyuc_models = { path = "../AuthCore/htyuc_models" } @@ -19,6 +21,7 @@ htyuc_remote = { path = "../AuthCore/htyuc_remote" } version = "0.1.0" authors = ["阿男 ", "buddy"] edition = "2021" +license = "MIT" [workspace.dependencies] htycommons = { git = "https://github.com/alchemy-studio/AuthCore.git" }