actions #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push, pull_request] | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macOS-latest, windows-latest, ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
# Used to host cibuildwheel | |
- uses: actions/setup-python@v5 | |
- name: Install cibuildwheel | |
run: python -m pip install cibuildwheel twine virtualenv numpy | |
- name: Build wheels | |
env: | |
CIBW_BUILD: 'cp39-* cp310-* cp311-* cp312-*' | |
CIBW_ARCHS_MACOS: 'x86_64 arm64' | |
CIBW_SKIP: 'pp* *686* *-musllinux_*' | |
CIBW_BUILD_VERBOSITY: 2 | |
CIBW_REPAIR_WHEEL_COMMAND_MACOS: delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} | |
run: | | |
python -m cibuildwheel --output-dir wheelhouse | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
- name: Upload wheels | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.TWINETOKEN }} | |
run: | | |
echo $TWINE_USERNAME | |
echo $TWINE_PASSWORD | |
python -m pip install -U twine virtualenv | |
twine upload --skip-existing wheelhouse/*.whl | |
continue-on-error: true |