Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 1.2.0 to 2.1.0. - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](https://github.com/docker/setup-qemu-action/compare/v1.2.0...v2.1.0) --- updated-dependencies: - dependency-name: docker/setup-qemu-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
104 lines
3.1 KiB
YAML
104 lines
3.1 KiB
YAML
name: Build + Deploy
|
|
|
|
on:
|
|
push:
|
|
tags: ["*.*.*"]
|
|
release:
|
|
types:
|
|
- published
|
|
# enables workflow to be run manually
|
|
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
# skip binary wheels for pypy (preferable to use pure-python) and 32-bit Linux
|
|
CIBW_SKIP: pp* cp*linux_i686
|
|
CIBW_ENVIRONMENT: FONTTOOLS_WITH_CYTHON=1
|
|
CIBW_TEST_REQUIRES: tox
|
|
# only test core fonttools library without extras for now, stuff like lxml or scipy
|
|
# create too many issues when testing on a large matrix of environments...
|
|
CIBW_TEST_COMMAND: "tox -c {package}/tox.ini -e py-cy-noextra --installpkg {wheel}"
|
|
|
|
jobs:
|
|
|
|
build_wheels:
|
|
name: ${{ matrix.type }} ${{ matrix.arch }} on ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
|
arch: [auto64]
|
|
include:
|
|
- os: macos-latest
|
|
arch: universal2
|
|
- os: windows-latest
|
|
arch: auto32
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: "3.x"
|
|
- name: Install dependencies
|
|
# using fork of cibuildwheel until this is fixed: https://github.com/pypa/cibuildwheel/issues/1504
|
|
run: pip install git+https://github.com/anthrotype/cibuildwheel.git@test_command_wheel#egg=cibuildwheel
|
|
|
|
- name: Build Wheels
|
|
run: python -m cibuildwheel --output-dir wheelhouse .
|
|
env:
|
|
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
|
|
CIBW_ARCHS: ${{ matrix.arch }}
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
path: wheelhouse/*.whl
|
|
|
|
build_arch_wheels:
|
|
name: py${{ matrix.python }} on ${{ matrix.arch }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
# aarch64 uses qemu so it's slow, build each py version in parallel jobs
|
|
python: [38, 39, 310, 311]
|
|
arch: [aarch64]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
- uses: docker/setup-qemu-action@v2.1.0
|
|
with:
|
|
platforms: all
|
|
- name: Install dependencies
|
|
# using fork of cibuildwheel until this is fixed: https://github.com/pypa/cibuildwheel/issues/1504
|
|
run: pip install git+https://github.com/anthrotype/cibuildwheel.git@test_command_wheel#egg=cibuildwheel
|
|
- name: Build Wheels
|
|
run: python -m cibuildwheel --output-dir wheelhouse .
|
|
env:
|
|
CIBW_BUILD: cp${{ matrix.python }}-*
|
|
CIBW_ARCHS: ${{ matrix.arch }}
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
path: wheelhouse/*.whl
|
|
|
|
deploy:
|
|
name: Upload if release
|
|
needs: [build_wheels, build_arch_wheels]
|
|
runs-on: ubuntu-latest
|
|
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@v1.4.2
|
|
with:
|
|
user: __token__
|
|
password: ${{ secrets.PYPI_PASSWORD }}
|