Skip to content

Antoine fixes

Antoine fixes #50

Workflow file for this run

name: Check PR to master
on:
pull_request:
branches:
- master
jobs:
build_wheels:
name: Build wheels (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13, macos-14]
steps:
- name: Set MACOSX_DEPLOYMENT_TARGET
run: |
if [[ ${{ matrix.os }} = macos-13 ]]
then
echo "MACOSX_DEPLOYMENT_TARGET=13.0" >> "$GITHUB_ENV"
elif [[ ${{ matrix.os }} = macos-14 ]]
then
echo "MACOSX_DEPLOYMENT_TARGET=14.0" >> "$GITHUB_ENV"
fi
- name: Checkout the repository
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build wheels
uses: pypa/[email protected]
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}
path: wheelhouse/*.whl
run_tests:
name: Run tests locally (${{ matrix.os }}, ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
needs: build_wheels
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13, macos-14]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- name: Install wheel
run: pip install wheel
- name: Install locally
run: |
if [[ ${{ matrix.os }} = ubuntu-latest ]]
then
pip install "$(echo dist/swisspair*cp"$(tr -d . <<< "${{ matrix.python-version }}")"*manylinux*x86_64*.whl)"[test]
elif [[ ${{ matrix.os }} = macos-13 ]]
then
pip install "$(echo dist/swisspair*cp"$(tr -d . <<< "${{ matrix.python-version }}")"*macosx_13_0*x86_64*.whl)"[test]
elif [[ ${{ matrix.os }} = macos-14 ]]
then
pip install "$(echo dist/swisspair*cp"$(tr -d . <<< "${{ matrix.python-version }}")"*macosx_14_0*arm64.whl)"[test]
fi
- name: Run tests
run: pytest