From 8f05250b7d1c44b451980028e62cd66fc3f4c8be Mon Sep 17 00:00:00 2001 From: Giovanni Barillari Date: Thu, 12 Dec 2024 16:58:27 +0100 Subject: [PATCH] Update CI build workflow --- .github/workflows/build.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ba1197a5..8bb51012 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,12 @@ 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 + 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 LLVM_PROFILE_FILE=${{ github.workspace }}/profdata/%m_%p.profraw uv run --no-sync pytest tests - name: merge PGO data - run: ${{ env.LLVM_PROFDATA }} merge -o ${{ github.workspace }}/merged.profdata ${{ github.workspace }}/profdata + run: ${{ env.LLVM_PROFDATA }} merge --failure-mode=all -o ${{ github.workspace }}/merged.profdata ${{ github.workspace }}/profdata - name: Build PGO wheel uses: PyO3/maturin-action@v1 with: