Skip to content

Roll back actions/upload-artifact@v4 to actions/upload-artifact@v3 #153

Roll back actions/upload-artifact@v4 to actions/upload-artifact@v3

Roll back actions/upload-artifact@v4 to actions/upload-artifact@v3 #153

Workflow file for this run

# based on https://github.com/joerick/cibuildwheel/blob/master/examples/github-minimal.yml
name: Build
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:
name: Build wheels on ${{ matrix.os }} ${{ matrix.name }}
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
cibw_build: "cp37-*"
cibw_archs_linux: "auto64"
cibw_archs_macos: "auto64"
- os: windows-latest
cibw_build: "cp37-*"
cibw_archs_linux: "auto64"
cibw_archs_macos: "auto64"
- os: macos-latest
cibw_build: "cp38-macosx_universal2"
cibw_archs_linux: "auto64"
cibw_archs_macos: "universal2"
name: '(universal2)'
- os: 'ubuntu-latest'
cibw_build: "cp37-manylinux*"
cibw_archs_linux: 'aarch64'
cibw_archs_macos: "auto64"
name: '(manylinux aarch64)'
qemu: true
- os: 'ubuntu-latest'
cibw_build: "cp37-musllinux*"
cibw_archs_linux: 'aarch64'
cibw_archs_macos: "auto64"
name: '(musllinux aarch64)'
qemu: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # unshallow fetch for setuptools-scm
- name: Set up QEMU
if: matrix.qemu
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_BUILD: ${{ matrix.cibw_build }}
CIBW_ARCHS: "auto64"
CIBW_ARCHS_MACOS: ${{ matrix.cibw_archs_macos }}
CIBW_ARCHS_LINUX: ${{ matrix.cibw_archs_linux }}
CIBW_ENVIRONMENT: "FREETYPEPY_BUNDLE_FT=yes PYTHON_ARCH=64"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
CIBW_TEST_COMMAND: "pytest {project}/tests"
CIBW_TEST_REQUIRES: "pytest"
with:
output-dir: dist
- name: Upload distributions
uses: actions/upload-artifact@v3
with:
path: dist
name: dist
publish:
name: Publish release to Pypi
runs-on: ubuntu-latest
needs: [build]
if: success() && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
permissions:
id-token: write
environment:
name: pypi
url: https://pypi.org/p/freetype-py/
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # unshallow fetch for setuptools-scm
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Download assets
uses: actions/download-artifact@v4
with:
merge-multiple: true
path: dist
- name: Build sdist
run: |
python setup.py sdist
- uses: pypa/gh-action-pypi-publish@release/v1
test-pyinstaller:
name: Test pyinstaller hook
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Test pyinstaller hook
env:
FREETYPEPY_BUNDLE_FT: yes
PYTHON_ARCH: 64
run: |
pip install pytest psutil pyinstaller>=4
pip install .
pytest -v --pyargs freetype.__pyinstaller.tests