Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(windows): fix CI failure on x86_64-pc-windows-gnu #3849

Merged
merged 2 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 47 additions & 42 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,14 @@ jobs:
- release
target:
- x86_64-pc-windows-msvc
- x86_64-pc-windows-gnu
include:
- target: x86_64-pc-windows-msvc
run_tests: YES
- target: x86_64-pc-windows-gnu
arch: x86_64
mingwdir: mingw64
gcc: x86_64-w64-mingw32-gcc
steps:
- uses: actions/checkout@v4
# v2 defaults to a shallow checkout, but we need at least to the previous tag
Expand All @@ -53,17 +58,16 @@ jobs:
New-Item "${env:USERPROFILE}\.cargo\git" -ItemType Directory -Force
shell: powershell
- name: Install mingw
run: |
# We retrieve mingw from the Rust CI buckets
# Disable the download progress bar which can cause perf issues
$ProgressPreference = "SilentlyContinue"
Invoke-WebRequest ${{ matrix.mingw }} -OutFile mingw.7z
7z x -y mingw.7z -oC:\msys64 | Out-Null
del mingw.7z
echo "C:\msys64\usr\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
echo "C:\msys64\${{ matrix.mingwdir }}\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
uses: bwoodsend/setup-winlibs-action@v1
if: matrix.mingwdir != ''
with:
architecture: ${{ matrix.arch }}
- name: Verify mingw gcc installation
shell: powershell
if: matrix.mingw != ''
if: matrix.mingwdir != ''
run: |
Get-Command ${{ matrix.gcc }}
${{ matrix.gcc }} --version
- name: Set PATH
run: |
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
Expand Down Expand Up @@ -119,7 +123,7 @@ jobs:
cargo check --all --all-targets --features test
git ls-files -- '*.rs' | xargs touch
- name: Run cargo clippy
if: matrix.mode != 'release' && matrix.mingw == ''
if: matrix.mode != 'release' && matrix.mingwdir == ''
env:
TARGET: ${{ matrix.target }}
run: |
Expand Down Expand Up @@ -170,13 +174,14 @@ jobs:
target:
- x86_64-pc-windows-msvc
- aarch64-pc-windows-msvc # skip-pr
- x86_64-pc-windows-gnu # skip-pr
- x86_64-pc-windows-gnu
include:
- target: x86_64-pc-windows-msvc
run_tests: YES
- target: x86_64-pc-windows-gnu # skip-pr
mingw: https://ci-mirrors.rust-lang.org/rustc/x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z # skip-pr
mingwdir: mingw64 # skip-pr
- target: x86_64-pc-windows-gnu
arch: x86_64
mingwdir: mingw64
gcc: x86_64-w64-mingw32-gcc
steps:
- uses: actions/checkout@v4
# v2 defaults to a shallow checkout, but we need at least to the previous tag
Expand All @@ -195,17 +200,16 @@ jobs:
New-Item "${env:USERPROFILE}\.cargo\git" -ItemType Directory -Force
shell: powershell
- name: Install mingw
run: |
# We retrieve mingw from the Rust CI buckets
# Disable the download progress bar which can cause perf issues
$ProgressPreference = "SilentlyContinue"
Invoke-WebRequest ${{ matrix.mingw }} -OutFile mingw.7z
7z x -y mingw.7z -oC:\msys64 | Out-Null
del mingw.7z
echo "C:\msys64\usr\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
echo "C:\msys64\${{ matrix.mingwdir }}\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
uses: bwoodsend/setup-winlibs-action@v1
if: matrix.mingwdir != ''
with:
architecture: ${{ matrix.arch }}
- name: Verify mingw gcc installation
shell: powershell
if: matrix.mingw != ''
if: matrix.mingwdir != ''
run: |
Get-Command ${{ matrix.gcc }}
${{ matrix.gcc }} --version
- name: Set PATH
run: |
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
Expand Down Expand Up @@ -261,7 +265,7 @@ jobs:
cargo check --all --all-targets --features test
git ls-files -- '*.rs' | xargs touch
- name: Run cargo clippy
if: matrix.mode != 'release' && matrix.mingw == ''
if: matrix.mode != 'release' && matrix.mingwdir == ''
env:
TARGET: ${{ matrix.target }}
run: |
Expand Down Expand Up @@ -313,17 +317,19 @@ jobs:
- x86_64-pc-windows-msvc
- i686-pc-windows-msvc # skip-pr skip-master
- aarch64-pc-windows-msvc # skip-pr
- x86_64-pc-windows-gnu # skip-pr
- x86_64-pc-windows-gnu
- i686-pc-windows-gnu # skip-pr skip-master
include:
- target: x86_64-pc-windows-msvc
run_tests: YES
- target: x86_64-pc-windows-gnu # skip-pr
mingw: https://ci-mirrors.rust-lang.org/rustc/x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z # skip-pr
mingwdir: mingw64 # skip-pr
- target: x86_64-pc-windows-gnu
arch: x86_64
mingwdir: mingw64
gcc: x86_64-w64-mingw32-gcc
- target: i686-pc-windows-gnu # skip-pr skip-master
arch: i686 # skip-pr skip-master
mingwdir: mingw32 # skip-pr skip-master
mingw: https://ci-mirrors.rust-lang.org/rustc/i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z # skip-pr skip-master
gcc: i686-w64-mingw32-gcc # 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 @@ -342,17 +348,16 @@ jobs:
New-Item "${env:USERPROFILE}\.cargo\git" -ItemType Directory -Force
shell: powershell
- name: Install mingw
run: |
# We retrieve mingw from the Rust CI buckets
# Disable the download progress bar which can cause perf issues
$ProgressPreference = "SilentlyContinue"
Invoke-WebRequest ${{ matrix.mingw }} -OutFile mingw.7z
7z x -y mingw.7z -oC:\msys64 | Out-Null
del mingw.7z
echo "C:\msys64\usr\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
echo "C:\msys64\${{ matrix.mingwdir }}\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
uses: bwoodsend/setup-winlibs-action@v1
if: matrix.mingwdir != ''
with:
architecture: ${{ matrix.arch }}
- name: Verify mingw gcc installation
shell: powershell
if: matrix.mingw != ''
if: matrix.mingwdir != ''
run: |
Get-Command ${{ matrix.gcc }}
${{ matrix.gcc }} --version
- name: Set PATH
run: |
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
Expand Down Expand Up @@ -408,7 +413,7 @@ jobs:
cargo check --all --all-targets --features test
git ls-files -- '*.rs' | xargs touch
- name: Run cargo clippy
if: matrix.mode != 'release' && matrix.mingw == ''
if: matrix.mode != 'release' && matrix.mingwdir == ''
env:
TARGET: ${{ matrix.target }}
run: |
Expand Down
33 changes: 17 additions & 16 deletions ci/actions-templates/windows-builds-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,19 @@ jobs: # skip-master skip-pr skip-stable
- x86_64-pc-windows-msvc
- i686-pc-windows-msvc # skip-pr skip-master
- aarch64-pc-windows-msvc # skip-pr
- x86_64-pc-windows-gnu # skip-pr
- x86_64-pc-windows-gnu
- i686-pc-windows-gnu # skip-pr skip-master
include:
- target: x86_64-pc-windows-msvc
run_tests: YES
- target: x86_64-pc-windows-gnu # skip-pr
mingw: https://ci-mirrors.rust-lang.org/rustc/x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z # skip-pr
mingwdir: mingw64 # skip-pr
- target: x86_64-pc-windows-gnu
arch: x86_64
mingwdir: mingw64
gcc: x86_64-w64-mingw32-gcc
- target: i686-pc-windows-gnu # skip-pr skip-master
arch: i686 # skip-pr skip-master
mingwdir: mingw32 # skip-pr skip-master
mingw: https://ci-mirrors.rust-lang.org/rustc/i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z # skip-pr skip-master
gcc: i686-w64-mingw32-gcc # 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 @@ -50,17 +52,16 @@ jobs: # skip-master skip-pr skip-stable
New-Item "${env:USERPROFILE}\.cargo\git" -ItemType Directory -Force
shell: powershell
- name: Install mingw
run: |
# We retrieve mingw from the Rust CI buckets
# Disable the download progress bar which can cause perf issues
$ProgressPreference = "SilentlyContinue"
Invoke-WebRequest ${{ matrix.mingw }} -OutFile mingw.7z
7z x -y mingw.7z -oC:\msys64 | Out-Null
del mingw.7z
echo "C:\msys64\usr\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
echo "C:\msys64\${{ matrix.mingwdir }}\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
uses: bwoodsend/setup-winlibs-action@v1
if: matrix.mingwdir != ''
with:
architecture: ${{ matrix.arch }}
- name: Verify mingw gcc installation
shell: powershell
if: matrix.mingw != ''
if: matrix.mingwdir != ''
run: |
Get-Command ${{ matrix.gcc }}
${{ matrix.gcc }} --version
- name: Set PATH
run: |
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
Expand Down Expand Up @@ -116,7 +117,7 @@ jobs: # skip-master skip-pr skip-stable
cargo check --all --all-targets --features test
git ls-files -- '*.rs' | xargs touch
- name: Run cargo clippy
if: matrix.mode != 'release' && matrix.mingw == ''
if: matrix.mode != 'release' && matrix.mingwdir == ''
env:
TARGET: ${{ matrix.target }}
run: |
Expand Down
Loading