chore: add agents & copilot setup #3553
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| - v[0123456789]* | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| FORCE_COLOR: 3 | |
| permissions: {} | |
| jobs: | |
| lint: | |
| name: Format | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 8 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - uses: astral-sh/setup-uv@v7 | |
| - name: Install nox | |
| run: uv tool install nox | |
| - uses: pre-commit/action@v3.0.1 | |
| with: | |
| extra_args: --all-files | |
| - name: Run PyLint | |
| run: nox -s pylint -- --output-format=github | |
| - name: Run nox generator | |
| run: | | |
| nox -t gen | |
| git diff --exit-code | |
| checks: | |
| name: | |
| 🐍 ${{ matrix.python-version }} • CMake ${{ matrix.cmake-version }} on ${{ | |
| matrix.runs-on }} ${{ matrix.architecture }} | |
| runs-on: ${{ matrix.runs-on }} | |
| timeout-minutes: 40 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.8", "pypy-3.11", "3.13", "3.14"] | |
| runs-on: [ubuntu-latest] | |
| cmake-version: ["3.15.x"] | |
| include: | |
| - python-version: "pypy-3.9" | |
| runs-on: windows-2022 | |
| cmake-version: "3.21.x" | |
| - python-version: "3.11" | |
| runs-on: windows-2022 | |
| cmake-version: "3.26.x" | |
| - python-version: "pypy-3.9" | |
| runs-on: ubuntu-latest | |
| cmake-version: "3.15.x" | |
| - python-version: "3.8" | |
| runs-on: ubuntu-latest | |
| cmake-version: "3.21.x" | |
| - python-version: "3.9" | |
| runs-on: ubuntu-latest | |
| cmake-version: "3.20.x" | |
| - python-version: "3.14t" | |
| runs-on: ubuntu-latest | |
| cmake-version: "4.2.x" | |
| # TODO: investigate failure with pypy-3.9/macos-latest (#1166) | |
| - python-version: "pypy-3.10" | |
| runs-on: macos-latest | |
| cmake-version: "4.1.x" | |
| - python-version: "3.14t" | |
| runs-on: macos-latest | |
| cmake-version: "4.2.x" | |
| - python-version: "3.8" | |
| runs-on: macos-latest | |
| cmake-version: "3.21.x" | |
| - python-version: "3.9" | |
| runs-on: macos-15-intel | |
| cmake-version: "3.18.x" | |
| - python-version: "3.12" | |
| runs-on: macos-15-intel | |
| cmake-version: "3.29.x" | |
| - python-version: "3.10" | |
| runs-on: ubuntu-latest | |
| cmake-version: "3.22.x" | |
| - python-version: "3.11" | |
| runs-on: ubuntu-latest | |
| cmake-version: "3.26.x" | |
| - python-version: "3.8" | |
| runs-on: windows-2022 | |
| cmake-version: "3.24.x" | |
| - python-version: "3.12" | |
| runs-on: windows-latest | |
| cmake-version: "3.26.x" | |
| architecture: x86 | |
| - python-version: "3.14" | |
| runs-on: windows-latest | |
| cmake-version: "4.0.x" | |
| - python-version: "3.13" | |
| runs-on: windows-latest | |
| cmake-version: "3.26.x" | |
| - python-version: "3.8" | |
| runs-on: ubuntu-22.04 | |
| cmake-version: "3.15.x" | |
| - python-version: "3.13" | |
| runs-on: ubuntu-24.04-arm | |
| cmake-version: "3.31.x" | |
| - python-version: "3.12" | |
| runs-on: windows-11-arm | |
| cmake-version: "4.0" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| architecture: ${{ matrix.architecture }} | |
| - uses: astral-sh/setup-uv@v7 | |
| - name: Setup CMake ${{ matrix.cmake-version }} | |
| uses: jwlawson/actions-setup-cmake@v2.1 | |
| with: | |
| cmake-version: ${{ matrix.cmake-version }} | |
| - name: Install package (uv) | |
| run: | |
| uv pip install -e.[wheels,wheel-free-setuptools] --group=dev --system | |
| - name: Test package | |
| if: "!contains(matrix.python_version, 'pypy')" | |
| run: >- | |
| pytest -ra --showlocals --cov --cov-report=xml --cov-report=term -n | |
| auto --durations=20 | |
| - name: Test package (two attempts) | |
| uses: nick-fields/retry@v3 | |
| if: "contains(matrix.python_version, 'pypy')" | |
| with: | |
| max_attempts: 2 | |
| retry_on: error | |
| timeout_seconds: 5 | |
| command: >- | |
| pytest -ra --showlocals --cov --cov-report=xml --cov-report=term | |
| --durations=20 -n auto | |
| - name: Upload coverage report | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| name: | |
| ${{ runner.os }}-${{ matrix.python-version }}-${{ | |
| matrix.cmake-version }} | |
| verbose: true | |
| token: 6d9cc0e0-158a-41ee-b8f4-0318d3595ac2 | |
| min: | |
| name: Min 🐍 ${{ matrix.python-version }} on ${{ matrix.runs-on }} | |
| runs-on: ${{ matrix.runs-on }} | |
| timeout-minutes: 40 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.8", "3.11"] | |
| # TODO: investigate failure with macos-latest (#1167) | |
| runs-on: [ubuntu-latest, macos-15-intel, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - uses: astral-sh/setup-uv@v7 | |
| # The min requirements are not compatible with some of the extra test | |
| # deps, so limit to just built-in deps. | |
| - name: Install extra helpers | |
| run: uv pip install ninja --system | |
| - name: Install min requirements | |
| run: | | |
| uv pip install -e. --group=test --group=test-schema --resolution=lowest-direct --system | |
| - name: Setup CMake 3.15 | |
| uses: jwlawson/actions-setup-cmake@v2.1 | |
| if: runner.os != 'Windows' | |
| with: | |
| cmake-version: "3.15.x" | |
| # First version to support VS 17.0 | |
| - name: Setup CMake 3.21 | |
| uses: jwlawson/actions-setup-cmake@v2.1 | |
| if: runner.os == 'Windows' | |
| with: | |
| cmake-version: "3.21.x" | |
| - name: Show installed packages | |
| run: pip list | |
| - name: Test min package | |
| run: pytest -n auto -ra --showlocals -Wdefault | |
| manylinux: | |
| name: Manylinux on 🐍 3.13 • Free-threaded | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 40 | |
| container: quay.io/pypa/musllinux_1_2_x86_64:latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Prepare venv | |
| run: python3.13t -m venv /venv | |
| - name: Install deps | |
| run: /venv/bin/pip install -e . --group=test ninja | |
| - name: Test package | |
| run: /venv/bin/pytest | |
| cygwin: | |
| name: Tests on 🐍 3.9 • cygwin | |
| runs-on: windows-latest | |
| timeout-minutes: 40 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: cygwin/cygwin-install-action@v6 | |
| with: | |
| platform: x86_64 | |
| packages: | |
| cmake ninja git make gcc-g++ python39 python39-devel python39-pip | |
| # Does not include test-numpy, since there are no wheels for this platform | |
| - name: Install | |
| run: | |
| python3.9 -m pip install . --group=test-core --group=test-pybind11 | |
| --group=test-parallel --group=test-schema --group=test-meta | |
| - name: Test package | |
| run: | |
| python3.9 -m pytest -n auto -ra --showlocals -m "not virtualenv" | |
| --durations=20 | |
| msys: | |
| name: Tests on 🐍 3 • msys UCRT | |
| runs-on: windows-latest | |
| timeout-minutes: 30 | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| steps: | |
| - uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: UCRT64 | |
| path-type: minimal | |
| update: true | |
| install: >- | |
| base-devel git | |
| pacboy: >- | |
| python:p python-pip:p gcc:p cmake:p | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Install | |
| run: python -m pip install . --group=test | |
| - name: Test package | |
| run: >- | |
| python -m pytest -n auto -ra --showlocals -m "not broken_on_urct" | |
| --durations=20 | |
| mingw64: | |
| name: Tests on 🐍 3 • mingw64 | |
| runs-on: windows-latest | |
| timeout-minutes: 30 | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| steps: | |
| - uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: mingw64 | |
| path-type: minimal | |
| update: true | |
| install: >- | |
| base-devel git | |
| pacboy: >- | |
| python:p python-pip:p gcc:p cmake:p | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Install | |
| run: python -m pip install . --group=test | |
| - name: Test package | |
| run: >- | |
| python -m pytest -n auto -ra --showlocals -m "not setuptools" | |
| --durations=20 | |
| env: | |
| SETUPTOOLS_USE_DISTUTILS: "local" | |
| dist: | |
| name: Distribution build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: hynek/build-and-inspect-python-package@v2 | |
| docs: | |
| name: Docs on ${{ matrix.runs-on }} | |
| runs-on: ${{ matrix.runs-on }} | |
| timeout-minutes: 25 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runs-on: [ubuntu-latest, macos-latest] # Windows command output issue (wrong Python selected) | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: astral-sh/setup-uv@v7 | |
| - uses: wntrblm/nox@2026.02.09 | |
| with: | |
| python-versions: "3.12" | |
| - name: Linkcheck | |
| if: runner.os == 'Linux' | |
| run: nox -s docs -- -b linkcheck | |
| - name: Manpage | |
| run: nox -s docs -- -b man -W | |
| - name: Build docs with warnings as errors | |
| if: runner.os == 'Linux' | |
| run: nox -s docs -- -W | |
| - name: Check examples | |
| run: nox -s test_doc_examples | |
| - name: Verify no changes required to API docs | |
| run: | | |
| nox -s build_api_docs | |
| git diff --exit-code | |
| pass: | |
| if: always() | |
| needs: [lint, checks, min, cygwin, dist, docs] | |
| runs-on: ubuntu-slim | |
| timeout-minutes: 2 | |
| steps: | |
| - name: Decide whether the needed jobs succeeded or failed | |
| uses: re-actors/alls-green@release/v1 | |
| with: | |
| jobs: ${{ toJSON(needs) }} |