Skip to content

Commit 4aa52a8

Browse files
authored
limit windows builds to Rust 1.77 (to keep Windows 7 support) (#1463)
1 parent bfccf09 commit 4aa52a8

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,9 @@ jobs:
485485
target: ${{ matrix.target }}
486486
manylinux: ${{ matrix.manylinux }}
487487
args: --release --out dist --interpreter ${{ matrix.interpreter || '3.8 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10' }}
488-
rust-toolchain: stable
488+
# Limit windows builds to 1.77 to keep Windows 7 support.
489+
# FIXME: Unpin when Python 3.8 support is dropped. (3.9 requires Windows 10)
490+
rust-toolchain: ${{ (matrix.os == 'windows' && '1.77') || 'stable' }}
489491
docker-options: -e CI
490492

491493
- run: ${{ (matrix.os == 'windows' && 'dir') || 'ls -lh' }} dist/
@@ -534,17 +536,18 @@ jobs:
534536

535537
- name: install rust stable
536538
id: rust-toolchain
537-
uses: dtolnay/rust-toolchain@stable
539+
uses: dtolnay/rust-toolchain@master
538540
with:
539541
components: llvm-tools
542+
# Limit windows builds to 1.77 to keep Windows 7 support.
543+
# FIXME: Unpin when Python 3.8 support is dropped. (3.9 requires Windows 10)
544+
toolchain: ${{ (matrix.os == 'windows' && '1.77') || 'stable' }}
540545

541546
- run: pip install -U 'ruff==0.5.0' typing_extensions
542547

543548
# generate self-schema now, so we don't have to do so inside docker in maturin build
544549
- run: python generate_self_schema.py
545550

546-
- run: rustc --version --verbose
547-
548551
- name: build initial wheel
549552
uses: PyO3/maturin-action@v1
550553
with:
@@ -553,7 +556,7 @@ jobs:
553556
--release
554557
--out pgo-wheel
555558
--interpreter ${{ matrix.interpreter }}
556-
rust-toolchain: stable
559+
rust-toolchain: ${{ steps.rust-toolchain.outputs.name }}
557560
docker-options: -e CI
558561
env:
559562
RUSTFLAGS: "-Cprofile-generate=${{ github.workspace }}/profdata"
@@ -568,7 +571,7 @@ jobs:
568571
pip install -r tests/requirements.txt
569572
pip install pydantic-core --no-index --no-deps --find-links pgo-wheel --force-reinstall
570573
pytest tests/benchmarks
571-
rustup run stable bash -c 'echo LLVM_PROFDATA=$RUSTUP_HOME/toolchains/$RUSTUP_TOOLCHAIN/lib/rustlib/${{ env.RUST_HOST }}/bin/llvm-profdata >> "$GITHUB_ENV"'
574+
rustup run ${{ steps.rust-toolchain.outputs.name }} bash -c 'echo LLVM_PROFDATA=$RUSTUP_HOME/toolchains/$RUSTUP_TOOLCHAIN/lib/rustlib/${{ env.RUST_HOST }}/bin/llvm-profdata >> "$GITHUB_ENV"'
572575
573576
- name: merge pgo data
574577
run: ${{ env.LLVM_PROFDATA }} merge -o ${{ github.workspace }}/merged.profdata ${{ github.workspace }}/profdata
@@ -581,7 +584,7 @@ jobs:
581584
--release
582585
--out dist
583586
--interpreter ${{ matrix.interpreter }}
584-
rust-toolchain: stable
587+
rust-toolchain: ${{steps.rust-toolchain.outputs.name}}
585588
docker-options: -e CI
586589
env:
587590
RUSTFLAGS: "-Cprofile-use=${{ github.workspace }}/merged.profdata"

0 commit comments

Comments
 (0)