Skip to content

Wheels

Wheels #15

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
- name: Setup dependencies
run: sudo apt update && sudo apt install -y wget cmake ninja-build g++ libx11-dev libgl1-mesa-dev xvfb
- 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 -DCMAKE_BUILD_TYPE=Release -DVTK_GROUP_ENABLE_Web=WANT -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: 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 }}