Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 39 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: CI

on:
workflow_call:
inputs:
release_version:
description: Version the candidate must expose when called for a release
required: false
type: string
push:
branches: [main, develop]
pull_request:
Expand All @@ -27,7 +33,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
with:
version: "latest"
version: "0.10.9"

- name: Set up Python
id: setup-python
Expand All @@ -36,7 +42,7 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install dependencies
run: uv sync --dev --python "${{ steps.setup-python.outputs.python-path }}"
run: uv sync --locked --dev --python "${{ steps.setup-python.outputs.python-path }}"

- name: Run Ruff check
run: uv run ruff check src/ tests/ examples/ scripts/
Expand All @@ -53,7 +59,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
with:
version: "latest"
version: "0.10.9"

- name: Set up Python
id: setup-python
Expand All @@ -62,7 +68,7 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install dependencies
run: uv sync --dev --python "${{ steps.setup-python.outputs.python-path }}"
run: uv sync --locked --dev --python "${{ steps.setup-python.outputs.python-path }}"

- name: Run ty check
run: uv run ty check
Expand All @@ -71,7 +77,8 @@ jobs:
run: >-
uv run ty check scripts/ci/candidate.py scripts/ci/check_coverage.py
scripts/ci/check_performance.py scripts/ci/hardware_qualification.py
scripts/ci/performance_qualification.py scripts/ci/test_wheel.py
scripts/ci/performance_qualification.py scripts/ci/readme_smoke.py
scripts/ci/release.py scripts/ci/test_wheel.py scripts/ci/verify_docs_deployment.py

coverage:
name: Coverage
Expand All @@ -82,7 +89,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
with:
version: "latest"
version: "0.10.9"

- name: Set up Python
id: setup-python
Expand All @@ -91,7 +98,7 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install dependencies
run: uv sync --dev --python "${{ steps.setup-python.outputs.python-path }}"
run: uv sync --locked --dev --python "${{ steps.setup-python.outputs.python-path }}"

- name: Measure coverage
run: uv run pytest tests/ -q --cov-report=json:coverage.json
Expand All @@ -108,7 +115,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
with:
version: "latest"
version: "0.10.9"

- name: Set up Python
id: setup-python
Expand All @@ -117,7 +124,7 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install dependencies
run: uv sync --dev --extra docs --python "${{ steps.setup-python.outputs.python-path }}"
run: uv sync --locked --dev --extra docs --python "${{ steps.setup-python.outputs.python-path }}"

- name: Build docs
run: uv run mkdocs build --strict
Expand All @@ -134,7 +141,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
with:
version: "latest"
version: "0.10.9"

- name: Set up Python
id: setup-python
Expand All @@ -143,7 +150,7 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install build checks
run: uv sync --dev --python "${{ steps.setup-python.outputs.python-path }}"
run: uv sync --locked --dev --python "${{ steps.setup-python.outputs.python-path }}"

- name: Build candidate
run: uv build --out-dir candidate/dist
Expand All @@ -152,7 +159,7 @@ jobs:
run: >-
uv run python scripts/ci/candidate.py create candidate
--commit-sha "${{ github.sha }}"
--git-tree "$(git rev-parse HEAD^{tree})"
--git-tree "$(git rev-parse 'HEAD^{tree}')"

- name: Verify package metadata
run: uv run twine check candidate/dist/*
Expand All @@ -161,7 +168,13 @@ jobs:
run: >-
uv run python scripts/ci/candidate.py verify candidate
--expected-commit "${{ github.sha }}"
--expected-tree "$(git rev-parse HEAD^{tree})"
--expected-tree "$(git rev-parse 'HEAD^{tree}')"

- name: Verify requested release version
if: ${{ inputs.release_version != '' }}
run: >-
uv run python scripts/ci/candidate.py verify candidate
--expected-tag "v${{ inputs.release_version }}"

- name: Upload candidate
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
Expand All @@ -185,7 +198,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
with:
version: "latest"
version: "0.10.9"

- name: Set up Python
id: setup-python
Expand All @@ -205,7 +218,7 @@ jobs:
--expected-commit "${{ github.sha }}"

- name: Install development environment
run: uv sync --dev --python "${{ steps.setup-python.outputs.python-path }}"
run: uv sync --locked --dev --python "${{ steps.setup-python.outputs.python-path }}"

- name: Run source tests
run: uv run pytest tests/ -q --tb=short
Expand Down Expand Up @@ -243,7 +256,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
with:
version: "latest"
version: "0.10.9"

- name: Set up Python
id: setup-python
Expand All @@ -259,7 +272,7 @@ jobs:

- name: Audit current contributor environment
run: |
uv sync --dev --extra docs --python "${{ steps.setup-python.outputs.python-path }}"
uv sync --locked --dev --extra docs --python "${{ steps.setup-python.outputs.python-path }}"
uv run --with pip-audit --with 'setuptools>=83.0.0' python -m pip_audit \
--progress-spinner off

Expand Down Expand Up @@ -292,7 +305,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
with:
version: "latest"
version: "0.10.9"

- name: Set up current Python prerelease
id: setup-python
Expand Down Expand Up @@ -331,7 +344,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
with:
version: "latest"
version: "0.10.9"

- name: Set up Python
id: setup-python
Expand Down Expand Up @@ -365,7 +378,9 @@ jobs:

cuda-qualification:
name: RTX 3090 CUDA and Performance Qualification
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: >-
${{ inputs.release_version != '' ||
(github.event_name == 'push' && github.ref == 'refs/heads/main') }}
runs-on: [self-hosted, linux, x64, cuda, rtx-3090]
needs: build-candidate
timeout-minutes: 180
Expand All @@ -380,7 +395,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
with:
version: "latest"
version: "0.10.9"

- name: Set up Python
id: setup-python
Expand Down Expand Up @@ -467,12 +482,14 @@ jobs:
EVENT_NAME: ${{ github.event_name }}
PYTHON_RESULT: ${{ needs.python-prerelease.result }}
REF_NAME: ${{ github.ref }}
RELEASE_VERSION: ${{ inputs.release_version }}
STABLE_RESULT: ${{ needs.stable-platform.result }}
run: |
test "$STABLE_RESULT" = success
test "$PYTHON_RESULT" = success
test "$DEPENDENCY_RESULT" = success
if [[ "$EVENT_NAME" = push && "$REF_NAME" = refs/heads/main ]]; then
if [[ -n "$RELEASE_VERSION" ]] || \
[[ "$EVENT_NAME" = push && "$REF_NAME" = refs/heads/main ]]; then
test "$CUDA_RESULT" = success
else
test "$CUDA_RESULT" = skipped
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ecosystem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
qualification:
permissions:
contents: read
uses: ml4t/ecosystem/.github/workflows/qualify-library.yml@457678d8860d0c816b1dc376e7e2691daa93af4d # v0.1.0
uses: ml4t/ecosystem/.github/workflows/qualify-library.yml@da2cbb9a9d0b4d2f166ad630470ff7d7a1aa2643 # 2026-09-19 policy snapshot
with:
import-package: ml4t.models
prerelease-test-paths: >-
Expand Down
Loading
Loading