Skip to content

fix(ci): checkout 拉 submodules — 修 mac 端 qwen-asr build fail#282

Merged
appergb merged 1 commit into
mainfrom
fix/ci-checkout-submodules
May 6, 2026
Merged

fix(ci): checkout 拉 submodules — 修 mac 端 qwen-asr build fail#282
appergb merged 1 commit into
mainfrom
fix/ci-checkout-submodules

Conversation

@appergb
Copy link
Copy Markdown
Collaborator

@appergb appergb commented May 6, 2026

User description

现象

release-tauri run 25415755417 中 mac arm64 在 `cargo build` 阶段挂掉:

```
error: no such file or directory: 'vendor/qwen-asr/qwen_asr.c'
clang: error: no input files


Linux / Windows 这次同 run 都过了(验证 PR #281 的 Tauri 版本锁有效)。

## 根因
- \`build.rs\` 的 \`#[cfg(target_os = "macos")]\` 分支用 cc-rs 编译 \`vendor/qwen-asr/*.c\`
- \`vendor/qwen-asr\` 是 git submodule(\`.gitmodules\` → antirez/qwen-asr)
- CI \`actions/checkout@v4\` 默认 \*\*不\*\* 拉 submodule → 目录空 → cc 找不到源文件
- Linux / Windows \`build.rs\` 不进 cc 路径,没踩;mac 是唯一编译 qwen-asr 的平台

## 修复
\`release-tauri.yml\` + \`ci.yml\` 两处 \`actions/checkout@v4\` 都加 \`with: submodules: recursive\`。

ci.yml 实际只跑 windows,理论上不需要 submodule,但跟 release-tauri.yml 保持一致避免后续踩同一坑。

## Test plan
- [ ] PR CI 通过
- [ ] 合并后 \`workflow_dispatch release-tauri.yml\` 全 4 platform build 成功(这次 mac 应能编 qwen-asr)


___

### **PR Type**
Bug fix


___

### **Description**
- Enable recursive submodule checkout

- Fix macOS `qwen-asr` build failures

- Keep CI and release workflows aligned


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["actions/checkout@v4"] -- "without submodules" --> B["Empty vendor/qwen-asr"]
  B -- "macOS build.rs compiles C sources" --> C["cargo build fails"]
  A -- "with `submodules: recursive`" --> D["Submodule sources available"]
  D -- "shared workflow fix" --> E["CI and release builds succeed"]

File Walkthrough

Relevant files
Configuration changes
ci.yml
Fetch submodules in Windows CI                                                     

.github/workflows/ci.yml

  • Added submodules: recursive to actions/checkout@v4.
  • Ensures the Windows CI job also fetches vendor/qwen-asr.
  • Keeps CI checkout behavior consistent with the release workflow.
+4/-0     
Bug fix
release-tauri.yml
Fix release workflow submodule checkout                                   

.github/workflows/release-tauri.yml

  • Added recursive submodule checkout to the release workflow.
  • Prevents macOS cargo build failures caused by missing vendor/qwen-asr
    sources.
  • Documents why the submodule is required for build.rs.
+4/-0     

release-tauri.yml run 25415755417 mac arm64 在 cargo build 时挂在:

    error: no such file or directory: 'vendor/qwen-asr/qwen_asr.c'

根因:build.rs 的 #[cfg(target_os = "macos")] 分支用 cc-rs 编译
vendor/qwen-asr/*.c,但 vendor/qwen-asr 是 git submodule,CI 的
actions/checkout@v4 默认不拉 submodule,目录是空的。Linux/Windows
build.rs 不进 cc 编译路径,所以没踩;mac 是唯一编译 qwen-asr 的平台。

修:release-tauri.yml + ci.yml 的 actions/checkout@v4 都加
\`with: submodules: recursive\`,让所有平台都拉一致的源码树。
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected

@appergb appergb merged commit b1d65fa into main May 6, 2026
2 checks passed
@appergb appergb deleted the fix/ci-checkout-submodules branch May 6, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant