Skip to content

Build Wheels

Build Wheels #43

Workflow file for this run

name: Build Wheels
on:
workflow_dispatch: # only manual triggers
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
python: ["3.9"]
steps:
- uses: actions/checkout@v4
- name: Set up Conda and Python
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python }}
channels: conda-forge
activate-environment: build-env
auto-activate-base: false
- name: Install dependencies
shell: bash -l {0} # Important: this makes conda activate work
run: |
conda install pybind11 pip
pip install cibuildwheel
- name: Build wheels
shell: bash -l {0}
run: |
python -m cibuildwheel
env:
CIBW_BUILD_VERBOSITY: 1
CIBW_SKIP: "*-win32 *-manylinux_i686"
CIBW_ENVIRONMENT: PATH="$CONDA/bin:$PATH"
- name: Store the wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}-${{ matrix.python }}
path: ./wheelhouse/*.whl
compression-level: 0
publish-to-testpypi:
needs: build_wheels
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/project/pyember/
permissions:
id-token: write
steps:
- name: Download all wheels
uses: actions/download-artifact@v4
with:
pattern: wheels-* # Download wheels from all OS builds
path: dist/
merge-multiple: true # Merge all wheels into dist directory
- name: Publish wheels to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/