Merge remote-tracking branch 'origin' into refactoring/vptree-arrays #160
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: Python package | |
on: | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- '**' | |
release: | |
types: | |
- published | |
jobs: | |
build-wheels: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pypa/cibuildwheel@v2.12.3 | |
env: | |
# skip pypy 3.7 and 3.8 as numpy does not support it | |
CIBW_SKIP: cp36-* pp37-* pp38-* | |
CIBW_ARCHS: auto64 | |
CIBW_BEFORE_ALL_MACOS: brew install llvm libomp | |
CIBW_ENVIRONMENT_MACOS: CC="clang" CXX="clang++" PATH="/usr/local/opt/llvm/bin:$PATH" LDFLAGS="-L/usr/local/opt/llvm/lib" CPPFLAGS="-I/usr/local/opt/llvm/include" | |
CIBW_BEFORE_BUILD_MACOS: clang --version | |
CIBW_BUILD_VERBOSITY: 1 | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
build-sdist: | |
needs: build-wheels | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Build sdist | |
run: | | |
python -m pip install build | |
python -m build --sdist | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./dist/*.tar.gz | |
upload-pypi: | |
if: github.event_name == 'release' && github.event.action == 'published' | |
needs: [build-wheels, build-sdist] | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: dist | |
- uses: pypa/gh-action-pypi-publish@release/v1 |