diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ec8fea..b92070d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + # Python 3.9 is available through setup-python on Ubuntu 24.04. + os: [ubuntu-24.04, macos-latest, windows-latest] python: ["3.9", "3.14"] include: - python: "3.9" @@ -111,7 +112,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-24.04, macos-latest, windows-latest] python: ["3.9", "3.14"] include: - python: "3.9" @@ -149,7 +150,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-24.04, macos-latest, windows-latest] python: ["3.9", "3.14"] include: - python: "3.9" @@ -234,7 +235,7 @@ jobs: rust-msrv: name: Rust extension (MSRV) needs: build - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v5 @@ -245,7 +246,7 @@ jobs: - uses: actions/download-artifact@v7 with: - name: wheel-ubuntu-latest-py3.14 + name: wheel-ubuntu-24.04-py3.14 path: dist - name: Install SDK wheel and read BSK version diff --git a/AGENTS.md b/AGENTS.md index dd970b8..97ddc86 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -184,7 +184,7 @@ contract and the consumer build, not just whether the repository build passes. - Version checks must compare Basilisk versions as strings. CMake `VERSION_EQUAL` can treat pre-release suffixes incorrectly; use `STREQUAL` when validating `bsk-sdk` versus installed `bsk`. -- SWIG runtime epochs matter. Keep the `swig==4.4.1` dependency, the +- SWIG runtime epochs matter. Keep the `swig==4.5.1` dependency, the pip-installed SWIG discovery, and the SWIG runtime mismatch diagnostics aligned with the Basilisk wheel. - Do not globally guard all CMake dependency setup. `find_package(SWIG)`, diff --git a/cmake/bsk_add_swig_module.cmake b/cmake/bsk_add_swig_module.cmake index 446be4a..6d0ff00 100644 --- a/cmake/bsk_add_swig_module.cmake +++ b/cmake/bsk_add_swig_module.cmake @@ -313,7 +313,7 @@ except ImportError:\n\ "Extensions compiled with this SWIG version cannot exchange objects with " "Basilisk across module boundaries.\n" "Install a SWIG version whose runtime epoch matches bsk (epoch ${_bsk_rt}):\n" - " SWIG runtime epoch 5 -> SWIG 4.4.1 (pip install \"swig==4.4.1\")\n" + " SWIG runtime epoch 5 -> SWIG 4.5.1 (pip install \"swig==4.5.1\")\n" " SWIG runtime epoch 4 -> SWIG 4.2.x or 4.3.x (pip install \"swig>=4.2.1,<4.4.0\")" ) endif() diff --git a/examples/custom-atm-extension/pyproject.toml b/examples/custom-atm-extension/pyproject.toml index e5f5375..dd62f3f 100644 --- a/examples/custom-atm-extension/pyproject.toml +++ b/examples/custom-atm-extension/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["scikit-build-core>=0.9.3", "numpy>=1.24", "bsk-sdk==2.13.0b0", "bsk==2.13.0b0", "swig==4.4.1"] +requires = ["scikit-build-core>=0.9.3", "numpy>=1.24", "bsk-sdk==2.13.0b0", "bsk==2.13.0b0", "swig==4.5.1"] build-backend = "scikit_build_core.build" [project] diff --git a/pyproject.toml b/pyproject.toml index 8effea7..8a78ee0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,10 +15,10 @@ dependencies = [ # provides a self-contained binary on all platforms and is detected # automatically by bsk_add_swig_module.cmake via the Python interpreter. # - # SWIG 4.4.1+ uses SWIG_RUNTIME_VERSION "5" (epoch 5), which bsk also uses - # from 2.10.1 onward. Both bsk and bsk-sdk require >=4.4.1 to stay on epoch 5. - # The cmake check in bsk_add_swig_module enforces the match at build time. - "swig==4.4.1", + # Match the Basilisk wheel's SWIG version for its module-init fragments. + # SWIG 4.5.1 uses runtime epoch 5; bsk_add_swig_module checks the epoch + # against the installed Basilisk wheel at build time. + "swig==4.5.1", # Required by generatePayloadMetaJson.py, which parses *Payload.h structs at # extension build time to produce the JSON metadata consumed by generateSWIGModules.py. "libclang>=15.0.6.1,<=18.1.1", diff --git a/tests/test_smoke.py b/tests/test_smoke.py index b976ce7..a047c56 100644 --- a/tests/test_smoke.py +++ b/tests/test_smoke.py @@ -194,7 +194,13 @@ def test_message_source_keep_alive_support_present() -> None: messaging_impl = (messaging_dir / "newMessaging.ih").read_text() assert "self._install_keepalive(source)" in messaging_impl - assert "return self._recorder_with_keepalive(self, timeDiff)" in messaging_impl + # Older revisions retain the message directly; gateway-aware revisions + # retain its storage owner. Both must call the recorder keep-alive hook. + recorder_calls = ( + "return self._recorder_with_keepalive(self, timeDiff)", + "return self._recorder_with_keepalive(self._storage_owner(), timeDiff)", + ) + assert any(call in messaging_impl for call in recorder_calls) c_wrapper = ( Path(bsk_sdk.swig_dir()) diff --git a/tests/test_sync_all.py b/tests/test_sync_all.py index be80f10..633e073 100644 --- a/tests/test_sync_all.py +++ b/tests/test_sync_all.py @@ -154,7 +154,7 @@ def test_update_extension_requirements_pins_build_and_runtime(tmp_path: Path) -> "\n".join( [ "[build-system]", - 'requires = ["bsk-sdk", "bsk", "swig==4.4.1"]', + 'requires = ["bsk-sdk", "bsk", "swig==4.5.1"]', "", "[project]", 'dependencies = ["bsk>=2.11", "numba"]', @@ -169,7 +169,7 @@ def test_update_extension_requirements_pins_build_and_runtime(tmp_path: Path) -> contents = pyproject.read_text(encoding="utf-8") assert contents.count('"bsk==2.12.0b0"') == 2 assert contents.count('"bsk-sdk==2.12.0b0"') == 1 - assert '"swig==4.4.1"' in contents + assert '"swig==4.5.1"' in contents assert '"numba"' in contents