Install scikit-build-core #52
This file contains hidden or 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 | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- '*' | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-13] | |
include: | |
- os: windows-2019 | |
cibw-arch: AMD64 | |
cmake-generator: "Visual Studio 16 2019" | |
cmake_generator_platform: "x64" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref_name }} | |
fetch-tags: 'true' | |
fetch-depth: 0 | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.19.0 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
path: ./wheelhouse/*.whl | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref_name }} | |
fetch-tags: 'true' | |
fetch-depth: 0 | |
- name: Build sdist | |
run: pipx run build --sdist | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-sdist | |
path: dist/*.tar.gz | |
publish-pypi: | |
name: Publish to PyPI | |
needs: [build_wheels] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
# unpacks all CIBW artifacts into dist/ | |
pattern: cibw-* | |
path: dist | |
merge-multiple: true | |
- name: Publish binary distributions to PyPI | |
if: github.ref == 'refs/heads/master' | |
#if: github.event_name == 'release' && github.event.action == 'created' | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
skip-existing: true | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
docs: | |
runs-on: ubuntu-24.04 | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
permissions: | |
pages: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | |
submodules: 'False' | |
path: '.' | |
- name: apt-get | |
run: sudo apt-get update && DEBIAN_FRONTEND="noninteractive" sudo apt-get -y install python3-testresources npm nodejs pandoc -y | |
- name: pip install requirements | |
run: | | |
python3 -m pip install --break-system-packages build webgui_jupyter_widgets scikit-build-core pybind11_stubgen cmake "numpy<2" | |
python3 -m build -wn . | |
python3 -m pip install --break-system-packages dist/*.whl | |
python3 -c 'import ngstents' | |
- name: Build the book | |
run: | | |
cd docs | |
pip install --break-system-packages jupyter-book | |
jupyter-book build . | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: "docs/_build/html" | |
- name: Deploy to GitHub Pages | |
if: github.ref == 'refs/heads/master' | |
id: deployment | |
uses: actions/deploy-pages@v2 |