diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ba1197a..d5b4dd7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -84,15 +84,18 @@ jobs: platform: windows runs-on: ${{ matrix.os }} + env: + UV_PYTHON: ${{ matrix.interpreter }} steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: astral-sh/setup-uv@v4 with: - python-version: ${{ matrix.interpreter }} - allow-prereleases: true + enable-cache: false - uses: dtolnay/rust-toolchain@stable with: components: llvm-tools + - shell: bash + run: uv python install ${{ env.UV_PYTHON }} - name: prepare profiling directory shell: bash run: mkdir -p ${{ github.workspace }}/profdata @@ -112,11 +115,16 @@ jobs: - name: Generate PGO data shell: bash run: | - pip install -r .github/workflows/_pgo_deps.txt - pip install granian --no-index --no-deps --find-links pgo_wheel --force-reinstall - PGO_RUN=y pytest tests - - name: merge PGO data - run: ${{ env.LLVM_PROFDATA }} merge -o ${{ github.workspace }}/merged.profdata ${{ github.workspace }}/profdata + uv venv .venv + uv pip install -r .github/workflows/_pgo_deps.txt + uv pip install granian --no-index --no-deps --find-links pgo_wheel --force-reinstall + PGO_RUN=y uv run pytest tests + - if: matrix.os != 'macos-13' || matrix.os != 'macos-14' + name: merge PGO data + run: ${{ env.LLVM_PROFDATA }} merge --failure-mode=all -o ${{ github.workspace }}/merged.profdata ${{ github.workspace }}/profdata + - if: matrix.os == 'macos-13' || matrix.os == 'macos-14' + name: merge PGO data + run: xcrun llvm-profdata merge --failure-mode=all -o ${{ github.workspace }}/merged.profdata ${{ github.workspace }}/profdata - name: Build PGO wheel uses: PyO3/maturin-action@v1 with: