@@ -360,11 +360,13 @@ jobs:
360
360
container : messense/manylinux_2_24-cross:s390x
361
361
interpreter : 3.7 3.8 3.9 3.10 3.11 3.12
362
362
exclude :
363
- # Optimized PGO builds for manylinux follow a different matrix, maybe in future
364
- # maturin-action can support this automatically
363
+ # Optimized PGO builds for x86_64 manylinux and windows follow a different matrix,
364
+ # maybe in future maturin-action can support this automatically
365
365
- os : ubuntu
366
366
target : x86_64
367
367
manylinux : auto
368
+ - os : windows
369
+ target : x86_64
368
370
# Windows on arm64 only supports Python 3.11+
369
371
- os : windows
370
372
target : aarch64
@@ -410,11 +412,17 @@ jobs:
410
412
strategy :
411
413
fail-fast : false
412
414
matrix :
413
- os : [ubuntu]
414
- platform : [linux]
415
+ os : [ubuntu, windows]
415
416
target : [x86_64]
416
417
manylinux : [auto]
417
- interpreter : ["3.7", "3.8", "3.9", "3.10", "3.11", "pypy3.7", "pypy3.8", "pypy3.9"]
418
+ interpreter : ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12-dev", "pypy3.7", "pypy3.8", "pypy3.9"]
419
+ include :
420
+ - os : ubuntu
421
+ platform : linux
422
+ - os : windows
423
+ ls : dir
424
+ - interpreter : 3.12-dev
425
+ maturin-interpreter : " 3.12"
418
426
419
427
runs-on : ${{ matrix.os }}-latest
420
428
steps :
@@ -445,18 +453,25 @@ jobs:
445
453
args : >
446
454
--release
447
455
--out pgo-wheel
448
- --interpreter ${{ matrix.interpreter }}
456
+ --interpreter ${{ matrix.maturin-interpreter || matrix. interpreter }}
449
457
-- -Cprofile-generate=${{ github.workspace }}/profdata
450
458
rust-toolchain : stable
451
459
docker-options : -e CI
452
460
461
+ - name : detect rust host
462
+ run : echo RUST_HOST=$(rustc -Vv | grep host | cut -d ' ' -f 2) >> "$GITHUB_ENV"
463
+ shell : bash
464
+
453
465
- name : generate pgo data
454
466
run : |
455
467
pip install -U pip
456
468
pip install -r tests/requirements.txt
457
469
pip install pydantic-core --no-index --no-deps --find-links pgo-wheel --force-reinstall
458
470
pytest tests/benchmarks
459
- 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'
471
+ rustup run stable bash -c 'echo LLVM_PROFDATA=$RUSTUP_HOME/toolchains/$RUSTUP_TOOLCHAIN/lib/rustlib/${{ env.RUST_HOST }}/bin/llvm-profdata >> "$GITHUB_ENV"'
472
+
473
+ - name : merge pgo data
474
+ run : ${{ env.LLVM_PROFDATA }} merge -o ${{ github.workspace }}/merged.profdata ${{ github.workspace }}/profdata
460
475
461
476
- name : build pgo-optimized wheel
462
477
uses : PyO3/maturin-action@v1
@@ -466,7 +481,7 @@ jobs:
466
481
args : >
467
482
--release
468
483
--out dist
469
- --interpreter ${{ matrix.interpreter }}
484
+ --interpreter ${{ matrix.maturin-interpreter || matrix. interpreter }}
470
485
-- -Cprofile-use=${{ github.workspace }}/merged.profdata
471
486
rust-toolchain : stable
472
487
docker-options : -e CI
0 commit comments