Skip to content

CI, python, and cmake cleanup #54

CI, python, and cmake cleanup

CI, python, and cmake cleanup #54

Workflow file for this run

name: Build
on:
workflow_dispatch:
pull_request:
#push:
#branches:
#- master
jobs:
cibw_wheels:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-latest, macos-13]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.9'
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Build wheels
uses: pypa/[email protected]
env:
# configure cibuildwheel to build native archs ('auto'), and some
# emulated ones, plus cross-compile on macos
CIBW_ARCHS_LINUX: auto
CIBW_ARCHS_MACOS: auto arm64
CIBW_TEST_SKIP: "*_arm64 *universal2:arm64 *linux_i686"
CIBW_ARCHS_WINDOWS: auto64
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_I686_IMAGE: manylinux2010
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-* cp312-*
CIBW_SKIP: "*musllinux* *i686"
CIBW_BEFORE_ALL_LINUX: >
yum -y update && yum -y install epel-release && yum install -y re2-devel ninja-build
CIBW_BEFORE_ALL_MACOS: >
brew install re2 pybind11
# macos target should be 10.14 to get c++17
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=13.0
CIBW_BEFORE_ALL_WINDOWS: >
vcpkg install pkgconf re2:x64-windows
&& vcpkg integrate install
CIBW_ENVIRONMENT_WINDOWS: 'CMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake'
CIBW_TEST_REQUIRES: ""
CIBW_TEST_COMMAND: ""
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.9'
- name: Build sdist
run: |
pip install build
python -m build -s .
- uses: actions/upload-artifact@v4
with:
path: dist/*.tar.gz
check_artifacts:
needs: [build_sdist, cibw_wheels]
defaults:
run:
shell: bash
name: Check artifacts are correct
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
# note wheels should be in subdirectory <upload_name>
- name: Check number of downloaded artifacts
run: ls -l artifact