diff --git a/.github/actions/install-arcticpy/install_arcticpy.sh b/.github/actions/install-arcticpy/install_arcticpy.sh index d29451d9..f3c3b196 100755 --- a/.github/actions/install-arcticpy/install_arcticpy.sh +++ b/.github/actions/install-arcticpy/install_arcticpy.sh @@ -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 diff --git a/tests/test_smoke.py b/tests/test_smoke.py index 31068279..1e12d46c 100644 --- a/tests/test_smoke.py +++ b/tests/test_smoke.py @@ -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.