Skip to content

feat: use uuid7 for generated runtime identifiers #205

feat: use uuid7 for generated runtime identifiers

feat: use uuid7 for generated runtime identifiers #205

Workflow file for this run

name: CI
on:
push:
branches:
- "**"
tags:
- "v*" # Semantic version tags
pull_request:
permissions:
contents: read
jobs:
test:
strategy:
matrix:
py: ["3.11", "3.12", "3.13", "3.14"]
os: [ubuntu-latest, macos-latest]
exclude:
# Only test the latest stable Python on macOS to keep CI fast
- os: macos-latest
py: "3.11"
- os: macos-latest
py: "3.12"
- os: macos-latest
py: "3.14"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # full history
fetch-tags: true # redundant in v4, but explicit
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py }}
- name: Install uv
run: pip install uv
- name: Sync dependencies
run: uv sync --group dev
- name: pytest
run: uv run pytest .
sanitize:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install uv
run: pip install uv
- name: Build with ASAN + UBSAN
env:
CMAKE_ARGS: "-DDML_ENABLE_ASAN=ON -DDML_ENABLE_UBSAN=ON"
run: uv sync --group dev
- name: Run tests with sanitizers
env:
ASAN_OPTIONS: "detect_leaks=0:abort_on_error=1"
UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1"
run: |
LIBASAN=$(gcc -print-file-name=libasan.so)
LD_PRELOAD="$LIBASAN" uv run pytest .
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install uv
run: pip install uv
- name: Sync dependencies
run: uv sync --group dev
- name: Run Ruff
run: uv run ruff check --output-format=github .
publish:
needs: ["test", "lint"]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
name: Upload release to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-3.13-publish-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-3.13-
${{ runner.os }}-pip-
- name: Install hatch
run: |
pip install hatch
- name: Build and publish
env:
HATCH_INDEX_USER: __token__
HATCH_INDEX_AUTH: ${{ secrets.PYPI_TOKEN }}
run: |
hatch build
hatch publish