Skip to content

fix gcc 15 (#44)

fix gcc 15 (#44) #53

Workflow file for this run

name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
tags: [v*]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run pre-commit
run: pipx run pre-commit run --all-files
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9", "3.11", "3.13"]
steps:
- uses: actions/checkout@v2
- uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- name: Test with coverage
run: uv run pytest -v --cov=spatial_graph --cov-report=xml
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
benchmarks:
runs-on: ubuntu-latest
env:
UV_NO_SYNC: "1"
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
python-version: "3.13"
enable-cache: true
- name: install
run: uv sync --no-dev --group test-codspeed
- name: Run benchmarks
uses: CodSpeedHQ/action@v3
with:
run: uv run pytest -W ignore --codspeed -v --color=yes
deploy:
name: Deploy
needs: test
if: success() && startsWith(github.ref, 'refs/tags/') && github.event_name != 'schedule'
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- name: 👷 Build
run: uv build
- name: 🚢 Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: "./dist/*"
docker-test:
name: Docker Test gxx${{ matrix.gxx_major }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
gxx_major: [14, 15]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build and test Docker image
run: |
docker build --build-arg GXX_MAJOR=${{ matrix.gxx_major }} -t spatial_graph .
docker run --rm spatial_graph