fix(ci): resolve Windows Cargo SSL handshake failures on crates.io
Three changes to the build-windows job: 1. CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse — uses lightweight HTTPS per-crate fetching instead of a full git clone of the crates.io index. The git clone path triggers an SSL connection reset ([curl 35]) on Windows Schannel in this runner environment. 2. CARGO_HTTP_MULTIPLEXING=false — disables HTTP/2 ALPN negotiation which is another common source of Schannel SSL resets on Windows. 3. CARGO_NET_RETRY=5 — retry transient network errors up to 5 times before failing the build. 4. Add Swatinem/rust-cache for Windows (mirrors the Linux job) — after a successful build, compiled crates are cached so subsequent runs skip the crates.io download entirely. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -63,6 +63,10 @@ jobs:
|
||||
$ver = '${{ needs.prepare.outputs.version }}'
|
||||
node -e "const fs=require('fs');const d=JSON.parse(fs.readFileSync('src-tauri/tauri.conf.json','utf8'));d.version='$ver';fs.writeFileSync('src-tauri/tauri.conf.json',JSON.stringify(d,null,2),'utf8');"
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: src-tauri
|
||||
|
||||
- name: Install frontend deps
|
||||
shell: powershell
|
||||
run: cd cinny; npm ci
|
||||
@@ -77,6 +81,13 @@ jobs:
|
||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ''
|
||||
NODE_OPTIONS: '--max_old_space_size=4096'
|
||||
# Sparse registry avoids a full git clone of the crates.io index —
|
||||
# eliminates the curl SSL handshake failures seen on Windows runners.
|
||||
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
|
||||
# Disable HTTP/2 multiplexing — ALPN negotiation can reset on Windows Schannel.
|
||||
CARGO_HTTP_MULTIPLEXING: 'false'
|
||||
# Retry transient network errors before failing.
|
||||
CARGO_NET_RETRY: '5'
|
||||
run: npm run tauri -- build --bundles nsis
|
||||
|
||||
- name: Upload to release
|
||||
|
||||
Reference in New Issue
Block a user