Skip to content

Commit

Permalink
move windows x86_64 builds to PGO
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt committed Jul 3, 2023
1 parent 8af2a71 commit c09a25e
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,13 @@ jobs:
container: messense/manylinux_2_24-cross:s390x
interpreter: 3.7 3.8 3.9 3.10 3.11
exclude:
# Optimized PGO builds for manylinux follow a different matrix, maybe in future
# maturin-action can support this automatically
# Optimized PGO builds for x86_64 manylinux and windows follow a different matrix,
# maybe in future maturin-action can support this automatically
- os: ubuntu
target: x86_64
manylinux: auto
- os: windows
target: x86_64
# Windows on arm64 only supports Python 3.11+
- os: windows
target: aarch64
Expand Down Expand Up @@ -409,11 +411,13 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu]
platform: [linux]
os: [ubuntu, windows]
target: [x86_64]
manylinux: [auto]
interpreter: ["3.7", "3.8", "3.9", "3.10", "3.11", "pypy3.7", "pypy3.8", "pypy3.9"]
include:
- os: ubuntu
platform: linux

runs-on: ${{ matrix.os }}-latest
steps:
Expand Down Expand Up @@ -449,13 +453,20 @@ jobs:
rust-toolchain: stable
docker-options: -e CI

- name: detect rust host
run: echo RUST_HOST=$(rustc -Vv | grep host | cut -d ' ' -f 2) >> "$GITHUB_ENV"
shell: bash

- name: generate pgo data
run: |
pip install -U pip
pip install -r tests/requirements.txt
pip install pydantic-core --no-index --no-deps --find-links pgo-wheel --force-reinstall
pytest tests/benchmarks
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'
rustup run stable bash -c 'echo LLVM_PROFDATA=$RUSTUP_HOME/toolchains/$RUSTUP_TOOLCHAIN/lib/rustlib/${{ env.RUST_HOST }}/bin/llvm-profdata' >> "$GITHUB_ENV"
- name: merge pgo data
run: ${{ env.LLVM_PROFDATA }} merge -o ${{ github.workspace }}/merged.profdata ${{ github.workspace }}/profdata

- name: build pgo-optimized wheel
uses: PyO3/maturin-action@v1
Expand Down

0 comments on commit c09a25e

Please sign in to comment.