From 21833a9c8e4db1a909a5a5635f705ed1f89111a9 Mon Sep 17 00:00:00 2001 From: luo jiyin Date: Mon, 21 Sep 2026 01:06:43 +0800 Subject: [PATCH] perf(ci): disable LTO for Win7 validation --- .github/scripts/ci-workflow.test.mjs | 2 +- .github/workflows/ci.yml | 2 +- apps/desktop/src/lib/__tests__/windowsInstallerTemplate.spec.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/scripts/ci-workflow.test.mjs b/.github/scripts/ci-workflow.test.mjs index 5ef0c2bbf3..61365e04da 100644 --- a/.github/scripts/ci-workflow.test.mjs +++ b/.github/scripts/ci-workflow.test.mjs @@ -138,7 +138,7 @@ test("Windows compatibility jobs cache Rust compilation without wrapping C or C+ const win7 = job("windows-win7-bundle"); assert.doesNotMatch(win7, /x86_64-pc-windows-msvc|Setup Rust for standard Windows/); - for (const setting of ["RUSTC_WRAPPER: sccache", 'SCCACHE_GHA_ENABLED: "true"', "SCCACHE_GHA_VERSION: win7-webview2-1.0.902.49-v1", 'SCCACHE_IDLE_TIMEOUT: "0"', 'CARGO_PROFILE_RELEASE_LTO: "thin"', 'CARGO_PROFILE_RELEASE_CODEGEN_UNITS: "8"']) assert.ok(win7.includes(setting)); + for (const setting of ["RUSTC_WRAPPER: sccache", 'SCCACHE_GHA_ENABLED: "true"', "SCCACHE_GHA_VERSION: win7-webview2-1.0.902.49-v1", 'SCCACHE_IDLE_TIMEOUT: "0"', 'CARGO_PROFILE_RELEASE_LTO: "off"', 'CARGO_PROFILE_RELEASE_CODEGEN_UNITS: "8"']) assert.ok(win7.includes(setting)); assert.ok(win7.includes("fc920bf0ec8de6ee65d409111f7ec508035751ba")); assert.ok(win7.includes('version: "v0.16.0"')); assert.ok(win7.includes("--timings")); diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e236253146..e618885544 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -310,7 +310,7 @@ jobs: timeout-minutes: 120 env: CARGO_INCREMENTAL: "0" - CARGO_PROFILE_RELEASE_LTO: "thin" + CARGO_PROFILE_RELEASE_LTO: "off" CARGO_PROFILE_RELEASE_CODEGEN_UNITS: "8" RUSTFLAGS: -C debuginfo=line-tables-only -C target-feature=+crt-static RUSTC_WRAPPER: sccache diff --git a/apps/desktop/src/lib/__tests__/windowsInstallerTemplate.spec.ts b/apps/desktop/src/lib/__tests__/windowsInstallerTemplate.spec.ts index df214ac2bd..719ea72892 100644 --- a/apps/desktop/src/lib/__tests__/windowsInstallerTemplate.spec.ts +++ b/apps/desktop/src/lib/__tests__/windowsInstallerTemplate.spec.ts @@ -154,7 +154,7 @@ describe("Windows 7 fixed WebView2 runtime bundle", () => { expect(job).not.toMatch(/^\s+(?:CC|CXX):/m); } expect(releaseWin7Job).not.toContain("CARGO_PROFILE_RELEASE_"); - expect(ciWin7Job).toContain('CARGO_PROFILE_RELEASE_LTO: "thin"'); + expect(ciWin7Job).toContain('CARGO_PROFILE_RELEASE_LTO: "off"'); expect(ciWin7Job).toContain('CARGO_PROFILE_RELEASE_CODEGEN_UNITS: "8"'); });