@@ -359,11 +359,13 @@ jobs:
359
359
container : messense/manylinux_2_24-cross:s390x
360
360
interpreter : 3.7 3.8 3.9 3.10 3.11
361
361
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
364
364
- os : ubuntu
365
365
target : x86_64
366
366
manylinux : auto
367
+ - os : windows
368
+ target : x86_64
367
369
# Windows on arm64 only supports Python 3.11+
368
370
- os : windows
369
371
target : aarch64
@@ -409,11 +411,13 @@ jobs:
409
411
strategy :
410
412
fail-fast : false
411
413
matrix :
412
- os : [ubuntu]
413
- platform : [linux]
414
+ os : [ubuntu, windows]
414
415
target : [x86_64]
415
416
manylinux : [auto]
416
417
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
417
421
418
422
runs-on : ${{ matrix.os }}-latest
419
423
steps :
@@ -449,13 +453,20 @@ jobs:
449
453
rust-toolchain : stable
450
454
docker-options : -e CI
451
455
456
+ - name : detect rust host
457
+ run : echo RUST_HOST=$(rustc -Vv | grep host | cut -d ' ' -f 2) >> "$GITHUB_ENV"
458
+ shell : bash
459
+
452
460
- name : generate pgo data
453
461
run : |
454
462
pip install -U pip
455
463
pip install -r tests/requirements.txt
456
464
pip install pydantic-core --no-index --no-deps --find-links pgo-wheel --force-reinstall
457
465
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
459
470
460
471
- name : build pgo-optimized wheel
461
472
uses : PyO3/maturin-action@v1
0 commit comments