@@ -71,19 +71,16 @@ jobs:
7171 app-rust :
7272 needs : changes
7373 if : needs.changes.outputs.app-rust == 'true'
74- runs-on : ubuntu-latest
74+ # 项目含 Windows 专用模块(audio_route_probe/device_probe/gdi_capture 等未做 Linux cfg 隔离),
75+ # 测试必须在 Windows runner 执行;Linux 编译会因 E0433 失败
76+ runs-on : windows-latest
7577 timeout-minutes : 60
7678 steps :
7779 - uses : actions/checkout@v4
7880 - uses : dtolnay/rust-toolchain@stable
7981 with :
8082 components : clippy
81- # Tauri 在 Linux 上编译需要 glib/gtk/webkit 系统库(glib-sys 等 -sys crate 的 pkg-config 依赖)
82- - name : Install Linux system dependencies
83- run : |
84- sudo apt-get update
85- sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file \
86- libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev
83+ targets : x86_64-pc-windows-msvc
8784 # sherpa-onnx 等 crate 编译耗时较长,启用 sccache 加速重复构建
8885 - name : Cache cargo registry
8986 uses : Swatinem/rust-cache@v2
9491 shell : bash
9592 run : mkdir -p app/src-tauri/models
9693 - name : Test
94+ # 覆盖 .cargo/config.toml 的本地 Windows 预编译库路径:CI runner 无 D:/ 本机目录,
95+ # 清空后 sherpa-onnx-sys/ort-sys 回退在线下载(CI 网络可达)
96+ env :
97+ SHERPA_ONNX_ARCHIVE_DIR : " "
98+ ORT_LIB_LOCATION : " "
99+ ORT_SKIP_DOWNLOAD : " 0"
100+ ORT_PREFER_DYNAMIC_LINK : " 1"
97101 run : cd app/src-tauri && cargo test
98102 - name : Lint (clippy)
103+ env :
104+ SHERPA_ONNX_ARCHIVE_DIR : " "
105+ ORT_LIB_LOCATION : " "
106+ ORT_SKIP_DOWNLOAD : " 0"
107+ ORT_PREFER_DYNAMIC_LINK : " 1"
99108 run : cd app/src-tauri && cargo clippy -- -D warnings
100109
101110 # ===========================================================================
0 commit comments