Files
ESP32S3_vt/.github/workflows
sloray 4667d94c45
构建客户端 / 检查(类型 + 单元测试) (push) Successful in 1m7s
构建客户端 / macOS 通用(.app + .dmg) (push) Skipped
构建客户端 / Windows x64(NSIS 安装包) (push) Failing after 13s
构建客户端 / Linux x64(deb + AppImage) (push) Successful in 6m51s
ci: 修 Windows job 0 秒失败 —— 宿主 runner 上的 bash 是 WSL,不是 Git Bash
run 3 里 Windows job 挂在第二步、耗时 0 秒:
    装 Rust(stable)  [failure]  14:01:42 → 14:01:42
    装 pnpm / 装 Node / 前端依赖 / 打包 / 上传产物  [skipped]
日志里是一串被当 UTF-8 解码的 GBK:
    ?b?~? 0   ?Nx?  B a s h / E _ A C C E S S D E N I E D
    ... https://github.com/microsoft/WSL/issues
就是 WSL 的 E_ACCESSDENIED:这台 runner 是宿主直跑,PATH 上的 `bash` 指向
C:\Windows\System32\bash.exe(WSL 启动器),而 WSL 在 runner 账户下起不来。于是
所有 shell: bash 的步骤、以及用 bash 写的 composite action(dtolnay/rust-toolchain
就是),都会在 0 秒内失败。

修法:Windows job 的 checkout 之后插一步(shell: pwsh),把
"C:\Program Files\Git\bin" 写进 GITHUB_PATH —— 它的语义是前置插入,会盖过 System32
那个 WSL 版 bash。本机(就是这台 runner)实测通过:
    bash -> C:\Program Files\Git\bin\bash.exe
    rustup toolchain install stable --profile minimal      exit=0
    rustup target add --toolchain stable x86_64-pc-windows-msvc  exit=0
    rustup run stable rustc --version / cargo --version    exit=0
在仓库根目录跑也一样:根 rust-toolchain.toml 的 `esp` override 不影响这几条命令,
只有裸 rustc/cargo 才会撞上它,而 workflow 里没有这种步骤。

顺带:run 3 里 Linux 那条是好的(检查 2m42s、Linux 9m14s 全绿)。
2026-10-15 22:10:57 +08:00
..