File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ jobs:
137137 - name : Rust Cache
138138139139 with :
140- shared-key : app-release-build
140+ shared-key : app-release-build-${{ github.event.inputs.channel || 'nightly' }}
141141 - name : Init Node Environment
142142 uses : ./.github/actions/init-env-node
143143
@@ -191,6 +191,13 @@ jobs:
191191 with :
192192 name : sveltekit-build
193193 path : ./apps/desktop/build/
194+ - name : Set release build optimization env vars
195+ shell : bash
196+ if : github.event.inputs.channel == 'release'
197+ run : |
198+ echo "CARGO_PROFILE_RELEASE_LTO=fat" >> $GITHUB_ENV
199+ echo "CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1" >> $GITHUB_ENV
200+ echo "CARGO_PROFILE_RELEASE_OPT_LEVEL=s" >> $GITHUB_ENV
194201 - name : Build binary
195202 shell : bash
196203 run : |
Original file line number Diff line number Diff line change @@ -101,8 +101,10 @@ rmcp = { version = "0.1.5" }
101101serde_json_lenient = " 0.2.3"
102102
103103[profile .release ]
104- lto = " thin" # Enables link to optimizations, but don't go all out on compile time.
105- opt-level = " s" # Optimize for binary size
104+ # There are no overrides here as we optimise for fast release builds,
105+ # which are used when building locally and when making Nightly builds.
106+ # The Stable release builds override the relevant settings at release time
107+ # to optimise for size.
106108
107109[profile .bench ]
108110codegen-units = 256
You can’t perform that action at this time.
0 commit comments