Skip to content

Update test_macos.yml #16

Update test_macos.yml

Update test_macos.yml #16

name: Build python wheels
on:
push:
branches:
- main
pull_request:
branches:
- main
release:
types:
- published
workflow_dispatch:
jobs:
build_wheels_cloud:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
arch: auto64
py-vers: cp38-* cp39-* cp310-* cp311-* cp312-*
before-all: ""
extra-env: ""
- os: macos-13
arch: x86_64
py-vers: cp38-* cp39-* cp310-* cp311-* cp312-*
before-all: ""
extra-env: ""
- os: macos-14
arch: arm64
py-vers: cp39-* cp310-* cp311-* cp312-*
before-all: ""
extra-env: ""
env:
CIBW_BUILD: ${{ matrix.py-vers }}
CIBW_SKIP: cp3*-musllinux_*
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_BEFORE_ALL: ${{ matrix.before-all }}
CIBW_BEFORE_BUILD: pip install --upgrade pip setuptools wheel
CIBW_ENVIRONMENT: ${{ matrix.extra-env }}
MACOSX_DEPLOYMENT_TARGET: 10.15
steps:
- name: checkout repo & submodules
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build wheels
uses: pypa/[email protected]
- uses: actions/upload-artifact@v4
with:
name: wheels-cloud-${{ matrix.os }}
path: ./wheelhouse/*.whl
retention-days: 1
upload_all:
name: Upload to PyPI
needs: [build_wheels_cloud]
runs-on: ubuntu-latest
if: ${{ (github.event_name == 'release' && github.event.action == 'published') || github.event_name == 'workflow_dispatch' }}
steps:
- name: Download wheels from cloud runners
uses: actions/download-artifact@v4
with:
pattern: wheels-cloud-*
merge-multiple: true
path: wheels
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
packages_dir: wheels/