tests for reciprocal parameters for more than 2 sublattices #62
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml | |
name: Build and deploy to PyPI | |
# Build on every branch push and pull request | |
# Also build (and deploy) when a GitHub Release is created | |
on: | |
push: | |
pull_request: | |
release: | |
types: | |
- published | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # fetch the entire repo history, required to guarantee setuptools_scm will pick up the tags | |
# setuptools_scm workaround for https://github.com/pypa/setuptools_scm/issues/455 | |
- name: Disable local version identifier on develop CI | |
run: | | |
echo 'local_scheme = "no-local-version"' >> pyproject.toml | |
git diff --color=always | |
git update-index --assume-unchanged pyproject.toml | |
if: github.event_name == 'push' && github.ref_name == 'develop' | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
# PyPy wheels not allowed because SciPy (build requirement) is not available | |
CIBW_BUILD: cp3*-* | |
CIBW_SKIP: cp36-* cp37-* cp38-* *-musllinux_* | |
CIBW_ARCHS_LINUX: auto64 | |
CIBW_ARCHS_MACOS: x86_64 arm64 | |
CIBW_ARCHS_WINDOWS: auto64 | |
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: artifact-wheels-${{ matrix.os }} | |
path: ./wheelhouse/*.whl | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # fetch the entire repo history, required to guarantee setuptools_scm will pick up the tags | |
# setuptools_scm workaround for https://github.com/pypa/setuptools_scm/issues/455 | |
- name: Disable local version identifier on develop CI | |
run: | | |
echo 'local_scheme = "no-local-version"' >> pyproject.toml | |
git diff --color=always | |
git update-index --assume-unchanged pyproject.toml | |
if: github.event_name == 'push' && github.ref_name == 'develop' | |
- uses: actions/setup-python@v5 | |
name: Install Python | |
with: | |
python-version: '3.9' | |
- run: pip install build | |
- name: Build sdist | |
run: python -m build --sdist | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: artifact-source | |
path: dist/*.tar.gz | |
upload_pypi: | |
needs: [build_wheels, build_sdist] | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
# upload to PyPI when a GitHub Release is created | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: artifact-* | |
path: dist | |
merge-multiple: true # download and extract all artifacts in the same directory | |
- name: PyPI - Upload Artifacts to PyPI (Production) | |
uses: pypa/[email protected] | |
if: github.event_name == 'release' && github.event.action == 'published' | |
- name: TestPyPI - Upload Artifacts | |
uses: pypa/[email protected] | |
if: github.event_name == 'push' && github.ref_name == 'develop' | |
with: | |
repository-url: https://test.pypi.org/legacy/ |