Skip to content

ci: Fix wheels publish config (#644) #1474

ci: Fix wheels publish config (#644)

ci: Fix wheels publish config (#644) #1474

Workflow file for this run

name: Pull Request
on:
push:
branches:
- main
pull_request:
branches:
- '**'
merge_group:
types: [checks_requested]
workflow_dispatch: {}
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
UV_VERSION: "0.4.27"
jobs:
check:
name: Check Python (3.10)
runs-on: ubuntu-latest
env:
PYTHON_VERSION: '3.10'
steps:
- uses: actions/checkout@v4
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.6
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: install-llvm
run: "sudo apt-get update && sudo apt-get install -y llvm-14"
- name: Set up uv
uses: astral-sh/setup-uv@v3
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
- name: Install Guppy
run: uv sync --frozen --python ${{ env.PYTHON_VERSION }}
- name: Type check with mypy
run: uv run mypy guppylang
- name: Check formatting with ruff
run: uv run ruff format --check guppylang
- name: Lint with ruff
run: uv run ruff check guppylang
- name: Install Guppy with llvm-based execution
run: uv sync --extra execution
- name: Cargo build validator
run: cargo build -p validator --release
- name: Run tests
run: uv run pytest
- name: Install tket2 dependencies
# This removes the `execution` extra group
run: uv sync --extra pytket
- name: Rerun `py(...)` expression tests and pytket lowering with tket2 installed
run: uv run pytest tests/integration/test_py.py tests/error/test_py_errors.py tests/integration/test_tket.py
test-coverage:
name: Check Python (3.13) with coverage
runs-on: ubuntu-latest
env:
PYTHON_VERSION: '3.13'
steps:
- uses: actions/checkout@v4
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.6
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Set up uv
uses: astral-sh/setup-uv@v3
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
- name: Install Guppy with execution and pytket
run: uv sync --frozen --python ${{ env.PYTHON_VERSION }} --extra execution --extra pytket
- name: Cargo build validator
run: cargo build -p validator --release
- name: Run python tests with coverage instrumentation
run: uv run pytest --cov=./ --cov-report=xml
- name: Upload python coverage to codecov.io
uses: codecov/codecov-action@v4
with:
files: coverage.xml
name: python
token: ${{ secrets.CODECOV_TOKEN }}