From 910ee192946f6e2e944754988f0806917a79727e Mon Sep 17 00:00:00 2001 From: Smirk1921 Date: Sun, 25 Oct 2026 02:40:17 +0800 Subject: [PATCH 1/2] fix(ci): prepare sidecar stub for tauri-build cargo check (pitfall 44) externalBin bin/tts-hub is gitignored by design (built locally via copy-product.mjs), so tauri-build failed on CI at cargo check with 'resource path doesn't exist'. Copy the runner's node.exe as a stub: check only validates existence, not content. Real release sidecar is still produced locally by copy-product.mjs. --- .github/workflows/ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e74cfe..e6f9691 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,6 +50,16 @@ jobs: - name: Build (frontend) run: npm run build + # tauri-build 校验 externalBin 存在性(坑 44):sidecar 本体是 node.exe 改名 + # (见 copy-product.mjs 目录映射),check 阶段只验存在、不验内容,直接复用 + # setup-node 装好的 node.exe。⚠️ 真正打进安装包的 sidecar 仍由本地 + # copy-product.mjs 生成(release 流程不变),此处仅为满足 cargo check。 + - name: Prepare sidecar stub for tauri-build + shell: pwsh + run: | + New-Item -ItemType Directory -Force -Path src-tauri/bin | Out-Null + Copy-Item (Get-Command node).Source "src-tauri/bin/tts-hub-x86_64-pc-windows-msvc.exe" -Force + # 缓存必须在 cargo check **之前**:actions/cache 在步骤开始时恢复,命中即省掉 # 依赖下载与全量编译;未命中时它注册 post 钩子,在 job 结束时保存本次产物。 # 用官方 actions/cache 而非 Swatinem/rust-cache(第三方 action,此处不需要它的 From 408ecdb71b894196a50f40fb67a7ddb414d0304e Mon Sep 17 00:00:00 2001 From: Smirk1921 Date: Sun, 25 Oct 2026 03:31:12 +0800 Subject: [PATCH 2/2] fix(ci): also stub resources/sidecar dir for tauri-build (pitfall 44b) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit First CI run revealed a second missing path: bundle.resources declares resources/sidecar (copy-product.mjs output, gitignored) — tauri-build fails 'resource path resources\sidecar doesn't exist'. Create the dir with a placeholder file; examples/ and vscode-ext/ are tracked already. --- .github/workflows/ci.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6f9691..a4d876c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,15 +50,19 @@ jobs: - name: Build (frontend) run: npm run build - # tauri-build 校验 externalBin 存在性(坑 44):sidecar 本体是 node.exe 改名 + # tauri-build 校验 externalBin/resources 存在性(坑 44):sidecar 本体是 node.exe 改名 # (见 copy-product.mjs 目录映射),check 阶段只验存在、不验内容,直接复用 - # setup-node 装好的 node.exe。⚠️ 真正打进安装包的 sidecar 仍由本地 - # copy-product.mjs 生成(release 流程不变),此处仅为满足 cargo check。 + # setup-node 装好的 node.exe;resources/sidecar/ 同样是 copy-product.mjs 的本地 + # 产物(gitignore),建空目录占位即可(examples/vscode-ext 已入库无需处理)。 + # ⚠️ 真正打进安装包的 sidecar 与资源仍由本地 copy-product.mjs 生成 + # (release 流程不变),此处仅为满足 cargo check。 - name: Prepare sidecar stub for tauri-build shell: pwsh run: | New-Item -ItemType Directory -Force -Path src-tauri/bin | Out-Null Copy-Item (Get-Command node).Source "src-tauri/bin/tts-hub-x86_64-pc-windows-msvc.exe" -Force + New-Item -ItemType Directory -Force -Path src-tauri/resources/sidecar | Out-Null + Set-Content -Path src-tauri/resources/sidecar/.ci-placeholder -Value "stub for cargo check only" # 缓存必须在 cargo check **之前**:actions/cache 在步骤开始时恢复,命中即省掉 # 依赖下载与全量编译;未命中时它注册 post 钩子,在 job 结束时保存本次产物。