Skip to content

Commit 391840b

Browse files
committed
move windows x86_64 builds to PGO
1 parent 8af2a71 commit 391840b

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -359,11 +359,13 @@ jobs:
359359
container: messense/manylinux_2_24-cross:s390x
360360
interpreter: 3.7 3.8 3.9 3.10 3.11
361361
exclude:
362-
# Optimized PGO builds for manylinux follow a different matrix, maybe in future
363-
# maturin-action can support this automatically
362+
# Optimized PGO builds for x86_64 manylinux and windows follow a different matrix,
363+
# maybe in future maturin-action can support this automatically
364364
- os: ubuntu
365365
target: x86_64
366366
manylinux: auto
367+
- os: windows
368+
target: x86_64
367369
# Windows on arm64 only supports Python 3.11+
368370
- os: windows
369371
target: aarch64
@@ -409,11 +411,13 @@ jobs:
409411
strategy:
410412
fail-fast: false
411413
matrix:
412-
os: [ubuntu]
413-
platform: [linux]
414+
os: [ubuntu, windows]
414415
target: [x86_64]
415416
manylinux: [auto]
416417
interpreter: ["3.7", "3.8", "3.9", "3.10", "3.11", "pypy3.7", "pypy3.8", "pypy3.9"]
418+
include:
419+
- os: ubuntu
420+
platform: linux
417421

418422
runs-on: ${{ matrix.os }}-latest
419423
steps:
@@ -449,13 +453,20 @@ jobs:
449453
rust-toolchain: stable
450454
docker-options: -e CI
451455

456+
- name: detect rust host
457+
run: echo RUST_HOST=$(rustc -Vv | grep host | cut -d ' ' -f 2) >> "$GITHUB_ENV"
458+
shell: bash
459+
452460
- name: generate pgo data
453461
run: |
454462
pip install -U pip
455463
pip install -r tests/requirements.txt
456464
pip install pydantic-core --no-index --no-deps --find-links pgo-wheel --force-reinstall
457465
pytest tests/benchmarks
458-
rustup run stable bash -c '$RUSTUP_HOME/toolchains/$RUSTUP_TOOLCHAIN/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-profdata merge -o ${{ github.workspace }}/merged.profdata ${{ github.workspace }}/profdata'
466+
rustup run stable bash -c 'echo LLVM_PROFDATA=$RUSTUP_HOME/toolchains/$RUSTUP_TOOLCHAIN/lib/rustlib/${{ env.RUST_HOST }}/bin/llvm-profdata >> "$GITHUB_ENV"'
467+
468+
- name: merge pgo data
469+
run: ${{ env.LLVM_PROFDATA }} merge -o ${{ github.workspace }}/merged.profdata ${{ github.workspace }}/profdata
459470

460471
- name: build pgo-optimized wheel
461472
uses: PyO3/maturin-action@v1

0 commit comments

Comments
 (0)