Release 0.9.49 #167
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: PyPI Packages | |
on: | |
push: | |
tags: | |
- 'v*.*' | |
workflow_dispatch: | |
jobs: | |
build_wheels: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- uses: pypa/cibuildwheel@v2.16.2 | |
env: | |
CIBW_SKIP: "cp36-* cp37-* pp* *_ppc64le *_s390x" | |
CIBW_ARCHS_MACOS: "x86_64 universal2" | |
CIBW_BEFORE_ALL_LINUX: > | |
yum install -y wget || apk add qhull-dev; | |
wget https://github.com/qhull/qhull/archive/refs/tags/v8.0.2.tar.gz && | |
tar -xf v8.0.2.tar.gz && | |
cd qhull-8.0.2 && | |
cmake -DBUILD_APPLICATIONS=OFF -S . -B build && | |
cmake --build build --target install | |
CIBW_BEFORE_ALL_MACOS: > | |
wget https://github.com/qhull/qhull/archive/refs/tags/v8.0.2.tar.gz && | |
tar -xf v8.0.2.tar.gz && | |
cd qhull-8.0.2 && | |
cmake -DCMAKE_OSX_ARCHITECTURES='x86_64;arm64' -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DBUILD_APPLICATIONS=OFF -S . -B build && | |
cmake --build build --target install | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/gdstk*.whl | |
build_windows: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
name: Build wheels for Windows (${{ matrix.python-version }}) | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Install build dependencies (pip) | |
run: | | |
pip install --upgrade pip setuptools wheel | |
pip install pip-tools ninja conan==1.60 | |
python -m piptools compile --resolver=backtracking -o requirements.txt pyproject.toml | |
pip install -r requirements.txt | |
- name: Install build dependencies (conan) | |
run: | | |
conan install . -s compiler.version=16 | |
- name: Build Python ${{ matrix.python-version }} wheel | |
run: python setup.py bdist_wheel | |
env: | |
CMAKE_GENERATOR: "Ninja" | |
CMAKE_TOOLCHAIN_FILE: "conan_paths.cmake" | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: "dist/gdstk*.whl" | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Build sdist | |
run: pipx run build --sdist | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: dist/*.tar.gz | |
upload_pypi: | |
name: Upload wheel to PyPI | |
needs: [build_sdist, build_wheels, build_windows] | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: dist | |
- uses: pypa/gh-action-pypi-publish@v1.8.5 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |