Add method to parse crystal from cif string, update occpy, fix bug in… #57
Workflow file for this run
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
name: Build python wheels | |
on: | |
push: | |
tags: "v*" | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
upload_to_pypi: | |
description: 'Upload to PyPI after building' | |
required: false | |
type: boolean | |
default: false | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
pyver: [cp310, cp311, cp312, cp313] | |
steps: | |
- name: Checkout repos | |
uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.22.0 | |
env: | |
CIBW_BUILD: ${{matrix.pyver}}-* | |
CIBW_ARCHS_LINUX: auto64 | |
CIBW_ARCHS_MACOS: auto64 universal2 | |
CIBW_ARCHS_WINDOWS: auto64 | |
CIBW_BUILD_FRONTEND: "build[uv]" | |
CIBW_TEST_SKIP: ${{matrix.pyver}}-* | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ./wheelhouse/*.whl | |
name: occpy-${{ matrix.os }}-${{ matrix.pyver }} | |
upload_all: | |
runs-on: ubuntu-latest | |
needs: build_wheels | |
environment: | |
name: pypi | |
url: https://pypi.org/p/occpy/ | |
permissions: | |
id-token: write | |
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) || (github.event_name == 'workflow_dispatch' && inputs.upload_to_pypi) | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
path: dist | |
pattern: occpy-* | |
merge-multiple: true | |
- uses: pypa/gh-action-pypi-publish@release/v1 |