Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest,macos-14-large,macos-14,windows-2022]
os: [ubuntu-latest,ubuntu-22.04-arm,macos-14-large,macos-14,windows-2022]
# os: [ubuntu-22.04,ubuntu-22.04-arm,macos-13,macos-13-xlarge,macos-14,macos-14-xlarge,windows-2019,windows-2022]

steps:
Expand All @@ -42,7 +42,7 @@ jobs:
- name: Compile and Build wheels
uses: pypa/cibuildwheel@v2.20.0
env:
CIBW_ARCHS_LINUX: x86_64
CIBW_ARCHS_LINUX: auto
CIBW_ARCHS_WINDOWS: AMD64
CIBW_SKIP: "*musllinux*"
CIBW_BUILD_VERBOSITY: 1
Expand Down
63 changes: 58 additions & 5 deletions .github/workflows/prebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ ls -lh ..
# Download and build VTK
LIB_LOCATION=build
if [[ $1 =~ ubuntu-.* ]]; then
VTK_BINARY=vtk-wheel-sdk-9.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.tar.xz
# Kitware publishes the VTK wheel-SDK for x86_64 only; there is no linux aarch64
# build at any released version, so on aarch64 we build VTK from source instead.
# Note this branch previously matched on OS alone, so an arm runner would have
# downloaded the x86_64 SDK.
if [[ "$(uname -m)" == "aarch64" || "$(uname -m)" == "arm64" ]]; then
VTK_FROM_SOURCE=1
else
VTK_BINARY=vtk-wheel-sdk-9.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.tar.xz
fi
LIB_SUFFIX=so
MAKEFLAGS="-- -j 8"
elif [[ $1 =~ macos-.*-large ]]; then
Expand Down Expand Up @@ -47,11 +55,56 @@ cmake \

cmake --build eigen/build --target install $MAKEFLAGS $CMAKE_RELEASE_COMMAND

# Install VTK from binary wheels provided by Kitware
mkdir -p install/vtk install/vtk/shared
curl -L https://www.vtk.org/files/release/9.3/${VTK_BINARY} -o ./install/vtk/vtk-wheel-sdk.tar.xz
tar -xJvf ./install/vtk/vtk-wheel-sdk.tar.xz --strip-components 1 -C $PWD/install/vtk
ln $(find $PWD/install/vtk/${LIB_LOCATION} -name "*.${LIB_SUFFIX}") install/vtk/shared
if [[ -n "${VTK_FROM_SOURCE:-}" ]]; then
# Build only the modules greedy's CMakeLists requires. Refusing the
# Rendering/Qt/Views/Web groups is what keeps this cheap: the trimmed build is a
# few minutes, where a full VTK build would dominate the job.
git clone --depth 1 -b v9.3.1 https://github.com/Kitware/VTK.git VTK
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTING=OFF \
-DVTK_BUILD_TESTING=OFF \
-DVTK_BUILD_EXAMPLES=OFF \
-DVTK_BUILD_DOCUMENTATION=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DVTK_GROUP_ENABLE_Rendering=DONT_WANT \
-DVTK_GROUP_ENABLE_Qt=DONT_WANT \
-DVTK_GROUP_ENABLE_Views=DONT_WANT \
-DVTK_GROUP_ENABLE_Web=DONT_WANT \
-DVTK_GROUP_ENABLE_Imaging=DONT_WANT \
-DVTK_GROUP_ENABLE_MPI=DONT_WANT \
-DVTK_GROUP_ENABLE_StandAlone=DONT_WANT \
-DVTK_MODULE_ENABLE_VTK_CommonCore=YES \
-DVTK_MODULE_ENABLE_VTK_IOCore=YES \
-DVTK_MODULE_ENABLE_VTK_IOLegacy=YES \
-DVTK_MODULE_ENABLE_VTK_IOPLY=YES \
-DVTK_MODULE_ENABLE_VTK_IOGeometry=YES \
-DVTK_MODULE_ENABLE_VTK_IOImage=YES \
-DVTK_MODULE_ENABLE_VTK_IOXML=YES \
-DVTK_MODULE_ENABLE_VTK_FiltersCore=YES \
-DVTK_MODULE_ENABLE_VTK_FiltersGeneral=YES \
-DVTK_MODULE_ENABLE_VTK_FiltersModeling=YES \
-DCMAKE_INSTALL_PREFIX=$PWD/install/vtk \
-B VTK/build \
VTK
cmake --build VTK/build --target install $MAKEFLAGS $CMAKE_RELEASE_COMMAND

# Expose the config where the wheel-SDK would have put it, so CIBW_ENVIRONMENT's
# VTK_DIR needs no per-architecture variant. VTK's exported targets resolve library
# paths RELATIVE to the config file (CMake walks three levels up from
# vtk-9.3.1.data/headers/cmake), which is why VTK installs into install/vtk above.
mkdir -p install/vtk/vtk-9.3.1.data/headers
ln -sfn "$(dirname "$(find $PWD/install/vtk -name 'vtk-config.cmake' | head -1)")" \
install/vtk/vtk-9.3.1.data/headers/cmake
# Static build: nothing for auditwheel to bundle, so install/vtk/shared stays empty.
else
# Install VTK from binary wheels provided by Kitware
curl -L https://www.vtk.org/files/release/9.3/${VTK_BINARY} -o ./install/vtk/vtk-wheel-sdk.tar.xz
tar -xJvf ./install/vtk/vtk-wheel-sdk.tar.xz --strip-components 1 -C $PWD/install/vtk
ln $(find $PWD/install/vtk/${LIB_LOCATION} -name "*.${LIB_SUFFIX}") install/vtk/shared
fi

# Link the shared libraries needed for delocate into a simple directory

Expand Down