Set cmake.source-dir #31
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 | |
491A | |
- 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: | |
- name: Download all the dists | |
uses: actions/download-artifact@v2 | |
with: | |
name: python-package-distributions | |
path: ./wheelhouse/ | |
- 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 }} | |
packages-dir: ./wheelhouse/ | |
docs: | |
runs-on: ubuntu-latest | |
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 build | |
python3 -m build -w . | |
python3 -m pip install dist/*.whl | |
python3 -c 'import ngstents' | |
- id: build_docs | |
name: Build Docu | |
uses: sphinx-notes/pages@v3 | |
with: | |
publish: false | |
- uses: peaceiris/actions-gh-pages@v3 | |
#if: github.event_name == 'release' && github.event.action == 'created' | |
if: github.ref == 'refs/heads/master' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ${{ steps.build_docs.outputs.artifact }} |