Skip to content

Commit eb5297c

Browse files
committed
Update CI build workflow
1 parent 27001c4 commit eb5297c

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,18 @@ jobs:
8484
platform: windows
8585

8686
runs-on: ${{ matrix.os }}
87+
env:
88+
UV_PYTHON: ${{ matrix.interpreter }}
8789
steps:
8890
- uses: actions/checkout@v4
89-
- uses: actions/setup-python@v5
91+
- uses: astral-sh/setup-uv@v4
9092
with:
91-
python-version: ${{ matrix.interpreter }}
92-
allow-prereleases: true
93+
enable-cache: false
9394
- uses: dtolnay/rust-toolchain@stable
9495
with:
9596
components: llvm-tools
97+
- shell: bash
98+
run: uv python install ${{ env.UV_PYTHON }}
9699
- name: prepare profiling directory
97100
shell: bash
98101
run: mkdir -p ${{ github.workspace }}/profdata
@@ -112,11 +115,16 @@ jobs:
112115
- name: Generate PGO data
113116
shell: bash
114117
run: |
115-
pip install -r .github/workflows/_pgo_deps.txt
116-
pip install granian --no-index --no-deps --find-links pgo_wheel --force-reinstall
117-
PGO_RUN=y pytest tests
118-
- name: merge PGO data
119-
run: ${{ env.LLVM_PROFDATA }} merge -o ${{ github.workspace }}/merged.profdata ${{ github.workspace }}/profdata
118+
uv venv .venv
119+
uv pip install -r .github/workflows/_pgo_deps.txt
120+
uv pip install granian --no-index --no-deps --find-links pgo_wheel --force-reinstall
121+
PGO_RUN=y uv run pytest tests
122+
- if: matrix.os != 'macos-13' || matrix.os != 'macos-14'
123+
name: merge PGO data
124+
run: ${{ env.LLVM_PROFDATA }} merge --failure-mode=all -o ${{ github.workspace }}/merged.profdata ${{ github.workspace }}/profdata
125+
- if: matrix.os == 'macos-13' || matrix.os == 'macos-14'
126+
name: merge PGO data
127+
run: xcrun llvm-profdata merge --failure-mode=all -o ${{ github.workspace }}/merged.profdata ${{ github.workspace }}/profdata
120128
- name: Build PGO wheel
121129
uses: PyO3/maturin-action@v1
122130
with:

0 commit comments

Comments
 (0)