-
Notifications
You must be signed in to change notification settings - Fork 618
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1974 from kmuehlbauer/wheels
MNT: build wheels on GitHub Actions
- Loading branch information
Showing
3 changed files
with
84 additions
and
103 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: cibuildwheel | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-20.04, windows-2019, macOS-10.15] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
submodules: 'recursive' | ||
- name: Use MSBuild (Windows) | ||
uses: microsoft/setup-msbuild@v1.0.2 | ||
if: matrix.os == 'windows-2019' | ||
- uses: actions/setup-python@v2 | ||
name: Install Python | ||
- name: Install cibuildwheel | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install cibuildwheel | ||
- name: Build wheels | ||
run: python -m cibuildwheel --output-dir wheelhouse | ||
env: | ||
CIBW_SKIP: "cp27-* cp34-* cp35-* cp36-* pp* *-win32" | ||
CIBW_TEST_REQUIRES: "pytest pytest-sugar meshio pillow" | ||
CIBW_TEST_COMMAND: "python -c \"import vispy; vispy.test()\"" | ||
CIBW_BUILD_VERBOSITY: "2" | ||
CIBW_BEFORE_BUILD: "pip install -U numpy Cython jupyter ipywidgets" | ||
CIBW_BEFORE_BUILD_MACOS: "npm install npm@latest -g; pip install -U pip setuptools" | ||
CIBW_BEFORE_BUILD_LINUX: "yum install -y fontconfig; pip install -U pip setuptools; pip install freetype-py" | ||
# If freetype-py is installed from source (no wheel found), include bundled freetype library | ||
CIBW_ENVIRONMENT_WINDOWS: "FREETYPEPY_BUNDLE_FT=1" | ||
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 | ||
CIBW_MANYLINUX_I686_IMAGE: manylinux2014 | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
path: ./wheelhouse/*.whl | ||
|
||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
submodules: 'recursive' | ||
- uses: actions/setup-python@v2 | ||
name: Install Python | ||
with: | ||
python-version: '3.7' | ||
- name: Build sdist | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install numpy Cython jupyter ipywidgets | ||
python setup.py sdist | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
path: dist/*.tar.gz | ||
|
||
upload_pypi: | ||
needs: [build_wheels, build_sdist] | ||
runs-on: ubuntu-latest | ||
# upload to PyPI on every tag starting with 'v' | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') | ||
# alternatively, to publish when a GitHub Release is created, use the following rule: | ||
# if: github.event_name == 'release' && github.event.action == 'published' | ||
steps: | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: artifact | ||
path: dist | ||
- uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.VISPY_PYPI_TOKEN }} | ||
# To test: repository_url: https://test.pypi.org/legacy/ |
This file was deleted.
Oops, something went wrong.
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