From 1fa5dced5a5b97f114cda84a1ef3dfeb8503feed Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Thu, 15 Oct 2026 08:25:27 +0000 Subject: [PATCH] build-vtk: publish the VTK_INSTALL_SDK=ON include/cmake tree as an artifact VTK_INSTALL_SDK=ON is already set, and cmake --build /build --target install already writes a full include/ tree plus the generated vtk-config.cmake package files to /build/install - but build-vtk.yml only ever packaged vtkmodules/*.so into the published wheel, so none of that SDK output ever left the runner. This blocks the cadquery-ocp port, whose CMake needs find_package(VTK) headers on riscv64 (see .queue.yml's cadquery-ocp entry). Additive only: packages the already-installed include/ and vtk-config.cmake directories from the cp312 leg (module-identical to cp313/cp314; cp314t disables IONetCDF and isn't a cadquery-ocp target anyway) into a tarball and uploads it as its own vtk--sdk artifact, alongside the existing per-interpreter wheel artifacts and without touching how they're built or published. No new compute: this is a pure repackaging of install output the build step already produces. A plain GitHub Actions artifact (90-day retention) rather than a second published wheel: _publish-wheel.yml's durable GitHub Release path is wired for wheels (+ one GPL-sources tarball) only, and widening it is a shared-workflow change out of scope for a single-package fix. --- .github/workflows/build-vtk.yml | 40 +++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.github/workflows/build-vtk.yml b/.github/workflows/build-vtk.yml index 9214701c1ac5..0b10aaea81db 100644 --- a/.github/workflows/build-vtk.yml +++ b/.github/workflows/build-vtk.yml @@ -184,6 +184,19 @@ jobs: auditwheel show dist/*.whl auditwheel repair -w /build/wheelhouse dist/*.whl ;; + sdk) + # VTK_INSTALL_SDK=ON (already set above) makes the "build" case's own + # install step write a full include/ tree and the generated + # vtk-config*.cmake package files under /build/install; this just + # collects those into a standalone tarball for cadquery-ocp (gotcha 661). + mkdir -p /build/sdk/include + cp -a /build/install/include/. /build/sdk/include/ + cmake_config=$(find /build/install -iname 'vtk-config.cmake' -print -quit) + [ -n "${cmake_config}" ] + mkdir -p /build/sdk/cmake + cp -a "$(dirname "${cmake_config}")/." /build/sdk/cmake/ + tar -C /build/sdk -czf /build/vtk-sdk.tar.gz . + ;; test) "${python_exe}" -m venv /tmp/venv . /tmp/venv/bin/activate @@ -218,6 +231,33 @@ jobs: path: build/wheelhouse/*.whl if-no-files-found: error + # One leg's SDK is enough: cp312/cp313/cp314 configure the same module set (only + # cp314t additionally disables IONetCDF above), and cp314t isn't a cadquery-ocp + # target (gotcha 661). continue-on-error on both steps: this is a best-effort extra + # artifact, not something a future version's real wheel publish should ever block on. + - name: Package the VTK SDK + if: matrix.python == 'cp312' + continue-on-error: true + run: | + podman run -t \ + --log-driver=none \ + --network=host \ + -v "${PWD}":/vtk \ + -v "${PWD}/build":/build \ + --workdir /vtk \ + -e PYTHON_TAG="${{ matrix.python }}" \ + "${MANYLINUX_RISCV64_IMAGE}" \ + bash /vtk/riscv64-build-and-test.sh sdk + + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + if: matrix.python == 'cp312' + continue-on-error: true + with: + name: vtk-${{ env.VTK_VERSION }}-sdk + path: build/vtk-sdk.tar.gz + if-no-files-found: error + retention-days: 90 + - name: Test wheel run: | podman run -t \