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\`,让所有平台都拉一致的源码树。
55 lines
1.5 KiB
YAML
55 lines
1.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main, dev]
|
|
pull_request:
|
|
branches: [main, dev]
|
|
|
|
jobs:
|
|
windows-tauri:
|
|
name: Windows Tauri checks
|
|
runs-on: windows-latest
|
|
defaults:
|
|
run:
|
|
working-directory: openless-all/app
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
# vendor/qwen-asr 是 macOS 上 build.rs 必须的 git submodule。Windows
|
|
# checkout 也拉一份保持与 release-tauri.yml 一致,开销几秒可以忽略。
|
|
submodules: recursive
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
cache: npm
|
|
cache-dependency-path: openless-all/app/package-lock.json
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Install frontend dependencies
|
|
run: npm ci
|
|
|
|
- name: Check Windows prerequisites
|
|
shell: pwsh
|
|
run: ./scripts/windows-preflight.ps1 -Toolchain msvc
|
|
|
|
- name: Check PowerShell scripts
|
|
shell: pwsh
|
|
run: |
|
|
foreach ($script in @("./scripts/windows-preflight.ps1", "./scripts/windows-build-gnu.ps1", "./scripts/windows-runtime-smoke.ps1")) {
|
|
$errors = $null
|
|
[System.Management.Automation.PSParser]::Tokenize((Get-Content -Raw $script), [ref]$errors) | Out-Null
|
|
if ($errors) {
|
|
$errors | Format-List
|
|
exit 1
|
|
}
|
|
}
|
|
|
|
- name: Build frontend
|
|
run: npm run build
|
|
|
|
- name: Check Tauri backend
|
|
run: cargo check --manifest-path src-tauri/Cargo.toml
|