- try fix publish_pypi

This commit is contained in:
w.pomp committed 2026-10-28 16:34:38 +01:00
1 parent d4a5bca8ba
commit 1020df649a
1 file changed
+39 -1
+39 -1
View File
@@ -46,7 +46,8 @@ jobs:
if ! command -v clang-24 >/dev/null 2>&1; then if ! command -v clang-24 >/dev/null 2>&1; then
echo "deb [trusted=yes] https://apt.llvm.org/noble/ llvm-toolchain-noble main" | sudo tee /etc/apt/sources.list.d/llvm-toolchain-noble.list echo "deb [trusted=yes] https://apt.llvm.org/noble/ llvm-toolchain-noble main" | sudo tee /etc/apt/sources.list.d/llvm-toolchain-noble.list
sudo apt update sudo apt update
sudo apt install -y clang-24 lld-24 libclang-24-dev # libeigen3-dev: Eigen 3.4.0 for libczirw (see the cmake-shim step below)
sudo apt install -y clang-24 lld-24 libclang-24-dev libeigen3-dev
fi fi
shell: bash shell: bash
@@ -95,6 +96,40 @@ jobs:
mv ~/osxcross ~/.osxcross mv ~/osxcross ~/.osxcross
fi fi
- name: Prefer system Eigen in the libczirw cmake build
run: |
# libczirw-sys cmake build clones Eigen3 from gitlab.com (ExternalProject);
# that clone is flaky on this runner (it is the only git-based network step
# left in the build). noble libeigen3-dev is the same Eigen 3.4.0 that libczi
# pins, and libczi has an upstream option to use it - flip that option for
# the libCZI project via CMAKE_PROJECT_INCLUDE. cmake does not read that
# variable from the environment, so a cmake shim injects it (-D); the shim is
# scoped to invocations that look like the libczi configure (no-op for
# --build / --version / other uses).
mkdir -p /root/ci-shims
cat > /root/cm-override-libczi.cmake <<'CMAKEEOF'
if (CMAKE_PROJECT_NAME STREQUAL "libCZI")
set(LIBCZI_BUILD_PREFER_EXTERNALPACKAGE_EIGEN3 ON CACHE BOOL "" FORCE)
endif()
CMAKEEOF
cat > /root/ci-shims/cmake <<'SHIMEOF'
#!/usr/bin/env bash
case "$*" in
--build*)
exec /usr/bin/cmake "$@" ;;
*libczi*)
exec /usr/bin/cmake -DCMAKE_PROJECT_INCLUDE=/root/cm-override-libczi.cmake "$@" ;;
*)
exec /usr/bin/cmake "$@" ;;
esac
SHIMEOF
chmod +x /root/ci-shims/cmake
echo "--- /root/cm-override-libczi.cmake ---"
cat /root/cm-override-libczi.cmake
echo "--- /root/ci-shims/cmake ---"
cat /root/ci-shims/cmake
shell: bash
- name: Build wheels - name: Build wheels
env: env:
# ziglang >= 0.17's bundled libc++ needs these -D_LIBCPP_* macros when # ziglang >= 0.17's bundled libc++ needs these -D_LIBCPP_* macros when
@@ -110,6 +145,9 @@ jobs:
shell: bash shell: bash
run: | run: |
export PATH="$HOME/.osxcross/bin:$PATH" export PATH="$HOME/.osxcross/bin:$PATH"
# put the cmake shim (system-Eigen override for libczirw) in front
export PATH="/root/ci-shims:$PATH"
command -v cmake
echo "HOME=$HOME CARGO_HOME=$CARGO_HOME RUSTUP_HOME=$RUSTUP_HOME" echo "HOME=$HOME CARGO_HOME=$CARGO_HOME RUSTUP_HOME=$RUSTUP_HOME"
command -v cargo-zigbuild || echo "cargo-zigbuild: not on PATH" command -v cargo-zigbuild || echo "cargo-zigbuild: not on PATH"
cargo-zigbuild --version 2>&1 || true cargo-zigbuild --version 2>&1 || true