Try to fix macOS wheel build (#41) #73
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 Wheels | |
# Only run on new tags starting with `v` | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
build_wheels: | |
name: Build wheel on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-13] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
# From rio-color here: | |
# https://github.com/mapbox/rio-color/blob/0ab59ad8e2db99ad1d0c8bd8c2e4cf8d0c3114cf/appveyor.yml#L3 | |
CIBW_SKIP: "cp2* cp35* pp* *-win32 *-manylinux_i686" | |
CIBW_ARCHS_MACOS: x86_64 arm64 | |
CIBW_BEFORE_BUILD_MACOS: brew install glm && export CPLUS_INCLUDE_PATH=$(brew --prefix glm)/include:$CPLUS_INCLUDE_PATH | |
CIBW_BEFORE_ALL_LINUX: curl -sL https://github.com/g-truc/glm/releases/download/0.9.9.8/glm-0.9.9.8.zip > glm.zip && unzip -q glm.zip && cp -r glm/glm/ /usr/include/ | |
- uses: actions/upload-artifact@v2 | |
with: | |
path: ./wheelhouse/*.whl | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
name: Install Python | |
with: | |
python-version: "3.11" | |
- name: Build sdist | |
run: | | |
python -m pip install build | |
python -m build . --sdist | |
- uses: actions/upload-artifact@v2 | |
with: | |
path: dist/*.tar.gz | |
upload_pypi: | |
needs: [build_wheels, build_sdist] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: artifact | |
path: dist | |
- uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_password }} | |
# To test: repository_url: https://test.pypi.org/legacy/ |