Skip to content

WIP on meson port

WIP on meson port #91

Workflow file for this run

on:
push:
branches: [ master ]
tags:
- v*
pull_request:
branches: [ master ]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macos-13, windows-2019]
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Install PCRE2 (Windows only)
if: matrix.os == 'windows-2019'
shell: bash
run: |
pcre2_version=10.42
download_url=https://github.com/PCRE2Project/pcre2/releases/download/pcre2-${pcre2_version}/pcre2-${pcre2_version}.tar.gz
curl -L $download_url -o pcre2.tar.gz
tar xvzf pcre2.tar.gz
cd pcre2-${pcre2_version}
./configure
make
make install
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_SKIP: cp27-* cp35-* pp* *musl* "*-macosx_arm64"
CIBW_ARCHS_LINUX: "auto64"
CIBW_ARCHS_MACOS: "x86_64"
CIBW_BEFORE_ALL_LINUX: "which yum && yum install -y pcre2-devel zlib-devel"
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: "pytest -v {package}/tests"
# Uncomment to get SSH access for testing
- name: Setup tmate session
if: failure()
uses: mxschmitt/action-tmate@v3
timeout-minutes: 15
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
- name: Release wheels
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: wheelhouse/*.whl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check tag
id: check-tag
run: |
if [[ ${{ github.ref }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+ ]]; then
echo "match=true" >> $GITHUB_OUTPUT
fi
- name: Deploy to PyPI
if: steps.check-tag.outputs.match == 'true'
run: |
pip3 install twine
python3 -m twine upload wheelhouse/*.whl
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}