Skip to content

Port from setuptools to meson-python #135

Port from setuptools to meson-python

Port from setuptools to meson-python #135

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }} (${{ matrix.platform_id }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-2019
platform_id: win_amd64
cairo_plat: x64
msvc_arch: x64
cibw_arch: AMD64
- os: windows-2019
platform_id: win32
cairo_plat: x86
msvc_arch: x86
cibw_arch: x86
- os: windows-2019
platform_id: win_arm64
cairo_plat: arm64
msvc_arch: amd64_arm64
cibw_arch: ARM64
steps:
- uses: actions/checkout@v3
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1.12.1
with:
arch : ${{ matrix.msvc_arch }}
- name: Build wheels
uses: pypa/cibuildwheel@v2.15
env:
CFLAGS: "-DCAIRO_WIN32_STATIC_BUILD=1"
CIBW_CONFIG_SETTINGS: ${{ matrix.cibw_arch == 'ARM64' && format('setup-args="--cross-file={0}/.ci/cross_amd64_arm64.txt -Dpython=python"', github.workspace) || ''}}
CIBW_ARCHS_WINDOWS: "${{ matrix.cibw_arch }}"
CIBW_BEFORE_BUILD: "python {package}/.ci/download-cairo-win32.py ${{ matrix.cairo_plat }}"
CIBW_BUILD: cp38-${{ matrix.platform_id }} cp39-${{ matrix.platform_id }} cp310-${{ matrix.platform_id }} cp311-${{ matrix.platform_id }} cp312-${{ matrix.platform_id }}
CIBW_TEST_REQUIRES: pytest hypothesis attrs
CIBW_TEST_COMMAND: bash {package}/.ci/test-wheels.sh {package}
CIBW_TEST_SKIP: "*-win_arm64"
CIBW_ENVIRONMENT_WINDOWS: PKG_CONFIG_PATH='${{ github.workspace }}/cairo-prebuild/lib/pkgconfig' PKG_CONFIG='${{ github.workspace }}/cairo-prebuild/bin/pkgconf.exe'
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl