Wheels #34
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: 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 libxcursor-dev libx11-xcb-dev libtbb-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 -S . -B build -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_ENABLE_REMOTE_MODULES=OFF -DVTK_DEBUG_LEAKS=OFF -DVTK_VERSION_SUFFIX="" -DVTK_MODULE_ENABLE_VTK_IOXdmf2:STRING=YES -DVTK_MODULE_ENABLE_VTK_IOXdmf3:STRING=YES -DVTK_GROUP_ENABLE_Qt=NO -DVTK_MODULE_ENABLE_VTK_CommonArchive=NO -DVTK_MODULE_ENABLE_VTK_DomainsMicroscopy=NO -DVTK_MODULE_ENABLE_VTK_FiltersOpenTURNS=NO -DVTK_MODULE_ENABLE_VTK_FiltersReebGraph=NO -DVTK_MODULE_ENABLE_VTK_IOADIOS2=NO -DVTK_MODULE_ENABLE_VTK_IOAlembic=NO -DVTK_MODULE_ENABLE_VTK_IOFFMPEG=NO -DVTK_MODULE_ENABLE_VTK_IOGDAL=NO -DVTK_MODULE_ENABLE_VTK_IOLAS=NO -DVTK_MODULE_ENABLE_VTK_IOMySQL=NO -DVTK_MODULE_ENABLE_VTK_IOODBC=NO -DVTK_MODULE_ENABLE_VTK_IOOpenVDB=NO -DVTK_MODULE_ENABLE_VTK_IOPDAL=NO -DVTK_MODULE_ENABLE_VTK_IOPostgreSQL=NO -DVTK_MODULE_ENABLE_VTK_InfovisBoost=NO -DVTK_MODULE_ENABLE_VTK_InfovisBoostGraphAlgorithms=NO -DVTK_MODULE_ENABLE_VTK_RenderingFreeTypeFontConfig=NO -DVTK_MODULE_ENABLE_VTK_RenderingOpenVR=NO -DVTK_MODULE_ENABLE_VTK_RenderingOpenXR=NO -DVTK_MODULE_ENABLE_VTK_RenderingRayTracing=NO -DVTK_MODULE_ENABLE_VTK_RenderingZSpace=NO -DVTK_MODULE_ENABLE_VTK_fides=NO -DVTK_MODULE_ENABLE_VTK_xdmf3=NO -DVTK_MODULE_ENABLE_VTK_IOOCCT=NO -DVTK_ENABLE_CATALYST=OFF | |
| 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 }} |