Skip to content

Wheels

Wheels #25

Workflow file for this run

name: Wheels
on:
workflow_dispatch:
inputs:
python_version:
description: "Python version"
default: "3.12"
type: string
vtk_full_version:
description: "VTK full version"
default: "9.4.2"
type: string
vtk_short_version:
description: "VTK short version"
default: "9.4"
type: string
tag_name:
description: "Tag name"
default: "v9.4.2-py3.12"
type: string
jobs:
build_wheels:
name: Build wheel
runs-on: ubuntu-24.04-arm # macos-14
steps:
- uses: actions/checkout@v4
# max cmake version supported by VTK is below package version
- name: Setup cmake
run: |
wget https://cmake.org/files/v3.21/cmake-3.21.7-linux-x86_64.sh
bash cmake-3.21.7-linux-x86_64.sh --skip-license
- name: Setup dependencies
run: sudo apt update && sudo apt install -y wget libboost-all-dev ninja-build g++ libx11-dev libgl1-mesa-dev xvfb qt6-base-dev qt6-tools-dev libxcursor-dev libx11-xcb-dev
- uses: actions/setup-python@v5
with:
python-version: ${{ github.event.inputs.python_version }}
- name: Download vtk
run: wget https://www.vtk.org/files/release/${{ github.event.inputs.vtk_short_version }}/VTK-${{ github.event.inputs.vtk_full_version }}.tar.gz
- name: Extract vtk
run: tar -xzf VTK-${{ github.event.inputs.vtk_full_version }}.tar.gz
- name: Build vtk
run: |
cd VTK-${{ github.event.inputs.vtk_full_version }}
cmake -GNinja -DVTK_WHEEL_BUILD=ON -DVTK_WRAP_PYTHON=ON -DVTK_INSTALL_SDK=ON -DVTK_BUILD_PYI_FILES=ON -DCMAKE_BUILD_TYPE=Release -DVTK_GROUP_ENABLE_Web=WANT -DVTK_RELOCATABLE_INSTALL=ON -DVTK_USE_LARGE_DATA=ON -DVTK_BUILD_ALL_MODULES=ON -DVTK_VERSION_SUFFIX="" -DVTK_MODULE_ENABLE_VTK_IOXdmf2:STRING=YES -DVTK_MODULE_ENABLE_VTK_IOXdmf3:STRING=YES -S . -B build
cmake --build build
- name: Build wheel
run: |
python3 -m pip install --upgrade pip setuptools wheel
cd VTK-${{ github.event.inputs.vtk_full_version }}/build && python3 setup.py bdist_wheel
- name: Audit wheels
run: |
python3 -m pip install auditwheel
auditwheel show dist/*.whl
auditwheel repair dist/*.whl -w dist/
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
path: VTK-${{ github.event.inputs.vtk_full_version }}/build/dist/*.whl
- name: Release
uses: softprops/action-gh-release@v2
with:
files: VTK-${{ github.event.inputs.vtk_full_version }}/build/dist/*.whl
tag_name: ${{ github.event.inputs.tag_name }}