Skip to content
Merged
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
10 changes: 9 additions & 1 deletion .github/actions/install-arcticpy/install_arcticpy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,16 @@ echo "==> Installing arcticpy runtime dependencies"
"$PYTHON" -m pip install scipy matplotlib

echo "==> Building and installing arcticpy ${ARCTICPY_VERSION}"
# --no-cache-dir: the wheel built here links the MACHINE's libgsl by soname, so
# a copy cached in ~/.cache/pip is only valid on the image that built it. CI
# caches that directory across runs (smoke-tests.yml) with no image identity in
# the key; when GitHub moved ubuntu-24.04 (libgsl.so.27) -> ubuntu-26.04
# (libgsl.so.28) pip restored the old wheel and `import arcticpy` failed with
# "libgsl.so.27: cannot open shared object file" (PyAutoHeart#330). Always
# building fresh costs ~15 s and makes a system-library change impossible to
# mask. Only this install opts out: the others are image-independent wheels.
"$PYTHON" -m pip install "arcticpy==${ARCTICPY_VERSION}" \
--no-build-isolation --no-deps
--no-build-isolation --no-deps --no-cache-dir

echo "==> Verifying arcticpy imports"
# Assert here rather than letting a broken build surface much later as a
Expand Down
20 changes: 20 additions & 0 deletions tests/test_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,26 @@ def test_shipped_arcticpy_installer_exists_and_is_the_only_pin():
assert 'ARCTICPY_VERSION="${ARCTICPY_VERSION:-' in body


def test_arcticpy_build_never_reuses_a_pip_cached_wheel():
"""The arcticpy install must bypass pip's cache (PyAutoHeart#330).

The wheel is built on the machine and links its libgsl by soname, so a copy
cached on one runner image fails to import on the next: the 2026-11 move
from ubuntu-24.04 (libgsl.so.27) to ubuntu-26.04 (libgsl.so.28) turned
the CTI workspace smoke red through exactly that restored wheel.
"""
body = smoke.ARCTICPY_INSTALLER.read_text()
# Join backslash continuations so the check sees the whole pip command.
logical = body.replace("\\\n", " ")
installs = [
line
for line in logical.splitlines()
if "pip install" in line and '"arcticpy==' in line
]
assert len(installs) == 1, installs
assert "--no-cache-dir" in installs[0].split()


def _run_installer(tmp_path, prefixes: str) -> subprocess.CompletedProcess[str]:
"""Run the shared recipe far enough to exercise the GSL probe.

Expand Down
Loading