Drop python 3.6; update to latest afdko 4.0.1 #108
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
# based on https://github.com/joerick/cibuildwheel/blob/master/examples/github-minimal.yml | |
name: Build wheels | |
on: | |
push: | |
branches: [master] | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
pull_request: | |
branches: [master] | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-11] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # unshallow fetch for setuptools-scm | |
submodules: true | |
- name: Use MSBuild (Windows) | |
uses: microsoft/[email protected] | |
if: matrix.os == 'windows-latest' | |
- name: Append Git to the path | |
run: echo "C:\Program Files\Git\mingw64\libexec\git-core" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
if: matrix.os == 'windows-latest' | |
- uses: actions/setup-python@v5 | |
name: Install Python | |
with: | |
python-version: '3.7' | |
- name: Install cibuildwheel | |
run: | | |
python -m pip install cibuildwheel | |
- name: Build wheel | |
run: | | |
python -m cibuildwheel --output-dir dist | |
env: | |
# avoid timeout when cloning | |
CIBW_BEFORE_ALL: | | |
git config --global url.https://github.com/.insteadOf git://github.com/ | |
# prepare build dependencies | |
CIBW_BEFORE_ALL_LINUX: | | |
git config --global url.https://github.com/.insteadOf git://github.com/ | |
yum install -y libuuid-devel | |
# make sure afdko submodule is not "dirty" before starting a new build | |
CIBW_BEFORE_BUILD: "git submodule foreach git clean -fdx" | |
# The embedded 'tx' C executable is independent of Python ABI so we only need to build it once. | |
# Here we choose the minimum supported version, i.e. Python 3.7 | |
CIBW_BUILD: "cp37-* cp38-macosx_universal2" | |
# build using the manylinux2014 image to ensure manylinux2014 wheels are produced | |
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 | |
# Build x86 and Universal on Mac | |
CIBW_ARCHS_MACOS: x86_64 universal2 | |
# skip PyPy (no manylinux2014), 32-bit linux and win32, musl linux, and other architectures | |
CIBW_SKIP: "pp* cp*win32 cp*manylinux_i686 cp*manylinux_aarch64 cp*manylinux_ppc64le cp*manylinux_s390x *-musllinux*" | |
# Force static link of libxml2 | |
CIBW_ENVIRONMENT: "FORCE_BUILD_LIBXML2=ON" | |
CIBW_TEST_REQUIRES: "pytest" | |
# run test suite with pytest, no coverage | |
# TODO: run with coverage and publish to codecov.io | |
CIBW_TEST_COMMAND: "pytest {project}/tests" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cffsubr-dist | |
path: ./dist | |
- name: Build sdist | |
run: | | |
python setup.py sdist | |
if: matrix.os == 'ubuntu-latest' && github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | |
- name: Publish package to PyPI | |
run: | | |
pip install twine | |
twine upload dist/* | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.pypi_password }} | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') |