pyKVFinder v0.8.3 #52
Workflow file for this run
This file contains hidden or 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 and deploy | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| jobs: | |
| build_sdist: | |
| name: Build source distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.x | |
| - name: Build sdist | |
| run: | | |
| pipx run build --sdist | |
| - name: Test sdist | |
| run: | | |
| pip install pytest | |
| pip install dist/*.tar.gz | |
| pytest tests/integration -v | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifacts-sdist | |
| path: dist/*.tar.gz | |
| build_wheels: | |
| name: Build wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| # macos-13: x86_64 (intel); macos-14: arm64; macos-15: arm64 | |
| os: [macos-13, macos-14, macos-15, ubuntu-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Enable QEMU emulation for ARM | |
| - name: Set up QEMU | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: docker/setup-qemu-action@v3 | |
| with: | |
| platforms: all | |
| # Used to host cibuildwheel | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.x | |
| - name: Set environment variable for macos-15 | |
| if: matrix.os == 'macos-15' | |
| run: | | |
| echo "MACOSX_DEPLOYMENT_TARGET=15.0" >> $GITHUB_ENV | |
| echo "CC=/opt/homebrew/opt/llvm/bin/clang" >> $GITHUB_ENV | |
| - name: Set environment variable for macos-14 | |
| if: matrix.os == 'macos-14' | |
| run: | | |
| echo "MACOSX_DEPLOYMENT_TARGET=14.0" >> $GITHUB_ENV | |
| echo "CC=/opt/homebrew/opt/llvm/bin/clang" >> $GITHUB_ENV | |
| - name: Set environment variable for macos-13 | |
| if: matrix.os == 'macos-13' | |
| run: | | |
| echo "MACOSX_DEPLOYMENT_TARGET=14.0" >> $GITHUB_ENV | |
| echo "CC=/usr/local/opt/llvm/bin/clang" >> $GITHUB_ENV | |
| - name: Install cibuildwheel | |
| run: python -m pip install cibuildwheel==3.1.4 | |
| - name: Build wheels | |
| run: python -m cibuildwheel --output-dir wheelhouse | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifacts-${{ matrix.os }} | |
| path: ./wheelhouse/*.whl | |
| pypi-publish: | |
| name: Upload release to PyPI | |
| runs-on: ubuntu-latest | |
| needs: [build_sdist, build_wheels] | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/pyKVFinder | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.x | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: ./dist | |
| pattern: artifacts-* | |
| merge-multiple: true | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| password: ${{ secrets.PYPI_API_TOKEN }} |