Skip to content

Switching to scikit-build-core instead of meson for building #165

Switching to scikit-build-core instead of meson for building

Switching to scikit-build-core instead of meson for building #165

Workflow file for this run

name: Release
on:
release:
types: [published]
push:
branches: [main]
pull_request:
jobs:
build_wheels:
name: Build wheel for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- "ubuntu-latest"
- "macos-latest"
# - "windows-latest"
steps:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: Set up macOS
run: brew unlink gfortran && brew link --overwrite gfortran
if: ${{ runner.os == 'macOS' }}
- uses: pypa/cibuildwheel@v2.14.0
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U build twine
- name: Build sdist
run: python -m build --sdist .
- name: Check the sdist
run: python -m twine check dist/*.tar.gz
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@v1.8.7
with:
user: __token__
password: ${{ secrets.pypi_password }}
# To test: repository_url: https://test.pypi.org/legacy/