Skip to content

Commit ad6478e

Browse files
committed
pass rust toolchain through PGO build steps
1 parent bca9522 commit ad6478e

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -557,9 +557,7 @@ jobs:
557557
--release
558558
--out pgo-wheel
559559
--interpreter ${{ matrix.interpreter }}
560-
# Limit windows builds to 1.77 to keep Windows 7 support.
561-
# FIXME: Unpin when Python 3.8 support is dropped. (3.9 requires Windows 10)
562-
rust-toolchain: ${{ (matrix.os == 'windows' && '1.77') || 'stable' }}
560+
rust-toolchain: ${{ steps.rust-toolchain.outputs.name }}
563561
docker-options: -e CI
564562
env:
565563
RUSTFLAGS: "-Cprofile-generate=${{ github.workspace }}/profdata"
@@ -574,7 +572,7 @@ jobs:
574572
pip install -r tests/requirements.txt
575573
pip install pydantic-core --no-index --no-deps --find-links pgo-wheel --force-reinstall
576574
pytest tests/benchmarks
577-
rustup run stable bash -c 'echo LLVM_PROFDATA=$RUSTUP_HOME/toolchains/$RUSTUP_TOOLCHAIN/lib/rustlib/${{ env.RUST_HOST }}/bin/llvm-profdata >> "$GITHUB_ENV"'
575+
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"'
578576
579577
- name: merge pgo data
580578
run: ${{ env.LLVM_PROFDATA }} merge -o ${{ github.workspace }}/merged.profdata ${{ github.workspace }}/profdata
@@ -587,9 +585,7 @@ jobs:
587585
--release
588586
--out dist
589587
--interpreter ${{ matrix.interpreter }}
590-
# Limit windows builds to 1.77 to keep Windows 7 support.
591-
# FIXME: Unpin when Python 3.8 support is dropped. (3.9 requires Windows 10)
592-
rust-toolchain: ${{ (matrix.os == 'windows' && '1.77') || 'stable' }}
588+
rust-toolchain: ${{steps.rust-toolchain.outputs.name}}
593589
docker-options: -e CI
594590
env:
595591
RUSTFLAGS: "-Cprofile-use=${{ github.workspace }}/merged.profdata"

0 commit comments

Comments
 (0)