Wheels #60
Workflow file for this run
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: Wheels | |
on: | |
workflow_dispatch: | |
release: | |
types: | |
- published | |
jobs: | |
build_wheels: | |
name: Wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-12, windows-latest] # macos-12 because we need an intel runner (this was macos-latest before, seems macos-13 is too new), see https://github.com/actions/runner-images/issues/9741 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: pypa/cibuildwheel@v2.21.1 | |
with: | |
package-dir: SDK_wrapper | |
env: | |
CIBW_BUILD: cp*-manylinux_x86_64 cp*-macosx_x86_64 cp*-win_amd64 | |
CIBW_BEFORE_BUILD_WINDOWS: "pip install delvewheel" | |
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} --add-path .\\SDK_wrapper\\TittaMex\\64\\Windows {wheel}" | |
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux_2_28_x86_64 | |
CIBW_BEFORE_ALL_LINUX: dnf install -y avahi-libs && cp ./SDK_wrapper/TittaMex/64/Linux/libtobii_research.so /usr/lib && ldconfig -n -v /usr/lib | |
CIBW_BEFORE_BUILD_MACOS: uname -a | |
MACOSX_DEPLOYMENT_TARGET: 10.14 | |
- uses: pypa/cibuildwheel@v2.21.1 | |
with: | |
package-dir: LSL_streamer | |
env: | |
CIBW_BUILD: cp*-manylinux_x86_64 cp*-macosx_x86_64 cp*-win_amd64 | |
CIBW_BEFORE_BUILD_WINDOWS: "pip install delvewheel" | |
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} --add-path .\\SDK_wrapper\\TittaMex\\64\\Windows;.\\LSL_streamer\\TittaLSLMex\\+TittaLSL\\+detail {wheel}" | |
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux_2_28_x86_64 | |
CIBW_BEFORE_ALL_LINUX: dnf install -y avahi-libs && cp ./LSL_streamer/TittaLSLMex/+TittaLSL/+detail/libtobii_research.so /usr/lib && cp ./LSL_streamer/TittaLSLMex/+TittaLSL/+detail/liblsl.so /usr/lib && ldconfig -n -v /usr/lib | |
CIBW_BEFORE_BUILD_MACOS: uname -a | |
MACOSX_DEPLOYMENT_TARGET: 10.14 | |
- name: Verify clean directory | |
run: git diff --exit-code | |
shell: bash | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist-${{ matrix.os }} | |
path: wheelhouse/*.whl | |
upload_all: | |
name: Upload if release | |
needs: [build_wheels] | |
runs-on: ubuntu-latest | |
if: github.event_name == 'release' && github.event.action == 'published' | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: dist-* | |
merge-multiple: true | |
path: dist | |
- uses: pypa/gh-action-pypi-publish@v1.10.2 | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_password }} |