diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 01de7573f..0289e968f 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -43,7 +43,7 @@ jobs: # windows-latest ships MSVC 19.5x (VS 2026), which CUDA 12.8 rejects, so # the Windows wheels build on the VS 2022 image. os: [ubuntu-latest, macos-latest, windows-2022] - python-version: [cp310, cp311, cp312, cp313, cp314] + python-version: [cp311, cp312, cp313, cp314, cp315] arch: [x86_64, arm64] exclude: - os: ubuntu-latest @@ -96,7 +96,7 @@ jobs: "CUDACXX=$env:CUDA_PATH\bin\nvcc.exe" | Out-File -FilePath $env:GITHUB_ENV -Append - name: Build wheels - uses: pypa/cibuildwheel@v4.1.0 + uses: pypa/cibuildwheel@v4.3.5 # to supply options, put them in 'env', like: env: MACOSX_DEPLOYMENT_TARGET: "11.0" diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 48dfc3390..139e8f5cf 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -19,14 +19,42 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: + Python-Versions: + runs-on: ubuntu-latest + outputs: + all: ${{ steps.matrix.outputs.all }} + pr: ${{ steps.matrix.outputs.pr }} + steps: + - name: Compute supported Python versions + id: matrix + env: + MIN_MINOR: 11 # our own floor; raise it manually if we ever need to + run: | + today=$(date +%F) + all=$(curl -fsS https://endoflife.date/api/python.json | jq -c \ + --arg today "$today" --argjson min "$MIN_MINOR" ' + [ .[] + | select(.cycle | startswith("3.")) + | select((.cycle | split(".")[1] | tonumber) >= $min) + | select(.releaseDate <= $today) # already released + | select(.eol > $today) # not yet EOL + | .cycle ] + | sort_by(split(".")[1] | tonumber)') + # PRs: second-newest release (currently 3.14), so we don't + # chase brand-new wheels on every PR + pr=$(jq -c '[.[-2]]' <<< "$all") + echo "all=$all" >> "$GITHUB_OUTPUT" + echo "pr=$pr" >> "$GITHUB_OUTPUT" + Build: + needs: Python-Versions name: ${{ matrix.name }} Python ${{ matrix.python-version }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ${{ github.event_name == 'pull_request' && fromJSON('["3.14"]') || fromJSON('["3.10", "3.11", "3.12", "3.13", "3.14"]') }} + python-version: ${{ github.event_name == 'pull_request' && fromJSON(needs.Python-Versions.outputs.pr) || fromJSON(needs.Python-Versions.outputs.all) }} include: - os: ubuntu-latest name: Linux