Skip to content

Commit

Permalink
Update CI build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gi0baro committed Dec 12, 2024
1 parent 27001c4 commit eb5297c
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit eb5297c

Please sign in to comment.