From 467e6d773116670aa2b95b46e9d796b781c5e64d Mon Sep 17 00:00:00 2001 From: David Hewitt <1939362+davidhewitt@users.noreply.github.com> Date: Mon, 3 Jul 2023 12:12:02 +0100 Subject: [PATCH] move windows x86_64 builds to PGO --- .github/workflows/ci.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 292050cac..dfa615fee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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: @@ -455,7 +459,10 @@ jobs: 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/$(rustc -Vv | grep host | cut -d ' ' -f 2)/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