Skip to content

Commit

Permalink
Merge pull request #1974 from kmuehlbauer/wheels
Browse files Browse the repository at this point in the history
MNT: build wheels on GitHub Actions
  • Loading branch information
djhoese committed Feb 26, 2021
2 parents 48122e6 + 52fe757 commit c49bdf5
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 103 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/wheels.yml
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/
102 changes: 0 additions & 102 deletions azure-pipelines.yml

This file was deleted.

3 changes: 2 additions & 1 deletion vispy/util/fonts/tests/test_font.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

known_bad_fonts = set([
'Noto Color Emoji', # https://github.com/vispy/vispy/issues/1771
'Bahnschrift', # https://github.com/vispy/vispy/pull/1974
])

# try both a vispy and system font <--- what does this mean???
Expand All @@ -28,7 +29,7 @@ def test_font_list():
@pytest.mark.parametrize('face', ['OpenSans'] + sorted(sys_fonts))
def test_font_glyph(face):
"""Test loading glyphs"""
if face in known_bad_fonts:
if face in known_bad_fonts or face.split(" ")[0] in known_bad_fonts:
pytest.xfail()
font_dict = dict(face=face, size=12, bold=False, italic=False)
glyphs_dict = dict()
Expand Down

0 comments on commit c49bdf5

Please sign in to comment.