Skip to content

Merge pull request #539 from neutrinoceros/mnt/fix-copypasta #459

Merge pull request #539 from neutrinoceros/mnt/fix-copypasta

Merge pull request #539 from neutrinoceros/mnt/fix-copypasta #459

Workflow file for this run

name: Github Actions
on: ["push", "pull_request"]
permissions: {}
jobs:
test-linux-macos:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.14"
os:
- ubuntu-22.04
- ubuntu-24.04-arm
- macos-15-intel
- macos-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ./.github/bottleneck-action
test-windows:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.14"
- "3.14t"
architecture:
- x86
- x64
os:
- windows-latest
- windows-2022
include:
- os: windows-11-arm
architecture: arm64
python-version: "3.11"
- os: windows-11-arm
architecture: arm64
python-version: "3.14"
- os: windows-11-arm
architecture: arm64
python-version: "3.14t"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ./.github/bottleneck-action
test-pyversions:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.13t"
- "3.14"
- "3.14t"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ./.github/bottleneck-action
check:
# This job is here is the "Required" one for merging PRs, and
# it only runs after all the `test-*` jobs above have run. Hence
# it serves as a check that CI actually ran before a PR gets merged.
needs:
- test-linux-macos
- test-windows
runs-on: ubuntu-latest
steps:
- name: Placeholder for CI checks in PRs
run: echo "Done"
build_wheels:
needs:
- test-linux-macos
- test-windows
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-15-intel
- macos-latest
- windows-latest
- windows-11-arm
- ubuntu-latest
- ubuntu-24.04-arm
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- name: Build wheels
uses: pypa/cibuildwheel@298ed2fb2c105540f5ed055e8a6ad78d82dd3a7e # v3.3.1
with:
extras: uv
- name: Store wheel artifacts
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
build_sdist:
needs:
- test-linux-macos
- test-windows
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1
with:
enable-cache: false
- name: Build sdist
run: uv build --sdist
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
path: dist/*.tar.gz
release:
needs:
- build_wheels
- build_sdist
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 # zizmor: ignore[use-trusted-publishing]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN}}