Skip to content

Commit

Permalink
ci(windows/gnu): disable cargo's LTO for mingw
Browse files Browse the repository at this point in the history
  • Loading branch information
rami3l committed May 31, 2024
1 parent 0011afb commit 0dc8f78
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
run_tests: YES
- target: x86_64-pc-windows-gnu
mingwdir: mingw64
lto: off
steps:
- uses: actions/checkout@v4
# v2 defaults to a shallow checkout, but we need at least to the previous tag
Expand All @@ -60,6 +61,11 @@ jobs:
if: matrix.mingwdir != ''
run: |
choco install mingw -y --no-progress
- name: Disable cargo's LTO for mingw
shell: powershell
if: matrix.mingwdir != ''
run: |
echo "CARGO_PROFILE_RELEASE_LTO=${{ matrix.lto }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
- name: Set PATH
run: |
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
Expand Down Expand Up @@ -172,6 +178,7 @@ jobs:
run_tests: YES
- target: x86_64-pc-windows-gnu
mingwdir: mingw64
lto: off
steps:
- uses: actions/checkout@v4
# v2 defaults to a shallow checkout, but we need at least to the previous tag
Expand All @@ -194,6 +201,11 @@ jobs:
if: matrix.mingwdir != ''
run: |
choco install mingw -y --no-progress
- name: Disable cargo's LTO for mingw
shell: powershell
if: matrix.mingwdir != ''
run: |
echo "CARGO_PROFILE_RELEASE_LTO=${{ matrix.lto }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
- name: Set PATH
run: |
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
Expand Down Expand Up @@ -308,8 +320,10 @@ jobs:
run_tests: YES
- target: x86_64-pc-windows-gnu
mingwdir: mingw64
lto: off
- target: i686-pc-windows-gnu # skip-pr skip-master
mingwdir: mingw32 # skip-pr skip-master
lto: off # skip-pr skip-master
steps:
- uses: actions/checkout@v4
# v2 defaults to a shallow checkout, but we need at least to the previous tag
Expand All @@ -332,6 +346,11 @@ jobs:
if: matrix.mingwdir != ''
run: |
choco install mingw -y --no-progress
- name: Disable cargo's LTO for mingw
shell: powershell
if: matrix.mingwdir != ''
run: |
echo "CARGO_PROFILE_RELEASE_LTO=${{ matrix.lto }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
- name: Set PATH
run: |
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
Expand Down
7 changes: 7 additions & 0 deletions ci/actions-templates/windows-builds-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ jobs: # skip-master skip-pr skip-stable
run_tests: YES
- target: x86_64-pc-windows-gnu
mingwdir: mingw64
lto: off
- target: i686-pc-windows-gnu # skip-pr skip-master
mingwdir: mingw32 # skip-pr skip-master
lto: off # skip-pr skip-master
steps:
- uses: actions/checkout@v4
# v2 defaults to a shallow checkout, but we need at least to the previous tag
Expand All @@ -52,6 +54,11 @@ jobs: # skip-master skip-pr skip-stable
if: matrix.mingwdir != ''
run: |
choco install mingw -y --no-progress
- name: Disable cargo's LTO for mingw
shell: powershell
if: matrix.mingwdir != ''
run: |
echo "CARGO_PROFILE_RELEASE_LTO=${{ matrix.lto }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
- name: Set PATH
run: |
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
Expand Down

0 comments on commit 0dc8f78

Please sign in to comment.