Merge pull request #2 from mstorath/codex/update-filter-size-in-demos #40
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 Publish Wheels | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build_wheels: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-13, macos-14, windows-latest] | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential cmake | |
- name: Install dependencies (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
choco install cmake | |
- name: Install cibuildwheel | |
run: pip install cibuildwheel | |
- name: Build Wheels | |
env: | |
CXXFLAGS: "-std=c++11" | |
CIBW_SKIP: "pypy*" | |
CIBW_BUILD: "cp*" | |
run: cibuildwheel --output-dir wheelhouse . | |
- name: Upload Wheels Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-${{ matrix.os }}-${{ matrix.python-version }}-${{ github.run_number }} | |
path: wheelhouse/*.whl | |
- name: Install Twine | |
run: pip install twine | |
- name: Publish to PyPI | |
env: | |
TWINE_USERNAME: "__token__" | |
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
run: twine upload --skip-existing wheelhouse/*.whl | |
- name: Verify uploaded package | |
run: pip install --no-cache-dir --index-url https://pypi.org/simple/ your-package-name |