From 0eb0b223a216c4310b8ef8affedecf27ad9721bd Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Sun, 14 Jun 2026 16:11:05 -0400 Subject: [PATCH] fix(ci): resolve Windows Cargo SSL handshake failures on crates.io MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .gitea/workflows/release.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index ce7b1db..e54b156 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -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