ci: Disable lto for ci.yml job release-builds (#1114)

LTO takes way too long and it is mature enough that it usually does not
have any miscompilation.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-06-01 19:48:00 +10:00 committed by GitHub
parent 92fdefbc9e
commit db6f3d2bfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View file

@ -151,6 +151,9 @@ jobs:
release-builds:
uses: ./.github/workflows/release-build.yml
with:
CARGO_PROFILE_RELEASE_LTO: no
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 1024
# Dummy job to have a stable name for the "all tests pass" requirement
tests-pass:

View file

@ -8,6 +8,14 @@ on:
description: "Set to the release metadata JSON to publish the release"
required: false
type: string
CARGO_PROFILE_RELEASE_LTO:
description: "Set to override default release profile lto settings"
required: false
type: string
CARGO_PROFILE_RELEASE_CODEGEN_UNITS:
description: "Set to override default release profile codegen-units settings"
required: false
type: string
env:
CARGO_TERM_COLOR: always
@ -54,6 +62,14 @@ jobs:
- run: just toolchain rust-src
- run: just ci-install-deps
- name: Override release profile lto settings
if: inputs.CARGO_PROFILE_RELEASE_LTO
run: echo "CARGO_PROFILE_RELEASE_LTO=${{ inputs.CARGO_PROFILE_RELEASE_LTO }}" >> "$GITHUB_ENV"
- name: Override release profile codegen-units settings
if: inputs.CARGO_PROFILE_RELEASE_CODEGEN_UNITS
run: echo "CARGO_PROFILE_RELEASE_CODEGEN_UNITS=${{ inputs.CARGO_PROFILE_RELEASE_CODEGEN_UNITS }}" >> "$GITHUB_ENV"
- run: just package
- if: runner.os == 'Windows'
run: Get-ChildItem packages/