From 8c853c93e80612d67510c8b8487340b0f33bdab7 Mon Sep 17 00:00:00 2001 From: vpramon Date: Thu, 19 Feb 2026 22:08:49 +0100 Subject: [PATCH 1/7] feat: replace siderust-ffi submodule with siderust submodule MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Migrate from standalone siderust-ffi repo to siderust repo that now contains siderust-ffi as a Cargo workspace member. Changes: - Remove siderust-ffi submodule (standalone repo) - Add siderust submodule (contains siderust-ffi/ within it) - Update CMakeLists.txt: SIDERUST_FFI_DIR → siderust/siderust-ffi - Update CMakeLists.txt: SIDERUST_ARTIFACT_DIR → siderust/target/release (Cargo workspace uses shared target dir at workspace root) - Update RPATH strings for new artifact location - Update Dockerfile submodule sanity checks The siderust-ffi repo can now be archived/removed. --- .gitmodules | 6 +++--- CMakeLists.txt | 10 +++++----- Dockerfile | 4 ++-- siderust | 1 + siderust-ffi | 1 - 5 files changed, 11 insertions(+), 11 deletions(-) create mode 160000 siderust delete mode 160000 siderust-ffi diff --git a/.gitmodules b/.gitmodules index cc58636..b0aa42e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,9 @@ -[submodule "siderust-ffi"] - path = siderust-ffi - url = git@github.com:Siderust/siderust-ffi.git [submodule "qtty-cpp"] path = qtty-cpp url = git@github.com:VPRamon/qtty-cpp.git [submodule "tempoch-cpp"] path = tempoch-cpp url = git@github.com:Siderust/tempoch-cpp.git +[submodule "siderust"] + path = siderust + url = git@github.com:Siderust/siderust.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 6b1d2ef..7d1c640 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,9 +10,9 @@ option(SIDERUST_BUILD_DOCS "Enable Doxygen documentation target." ON) find_program(CARGO_BIN cargo REQUIRED) # --------------------------------------------------------------------------- -# Paths to siderust-ffi +# Paths to siderust-ffi (inside the siderust submodule) # --------------------------------------------------------------------------- -set(SIDERUST_FFI_DIR ${CMAKE_CURRENT_SOURCE_DIR}/siderust-ffi) +set(SIDERUST_FFI_DIR ${CMAKE_CURRENT_SOURCE_DIR}/siderust/siderust-ffi) set(SIDERUST_FFI_INCLUDE_DIR ${SIDERUST_FFI_DIR}/include) @@ -29,7 +29,7 @@ endif() # --------------------------------------------------------------------------- # Platform-specific library paths # --------------------------------------------------------------------------- -set(SIDERUST_ARTIFACT_DIR ${SIDERUST_FFI_DIR}/target/release) +set(SIDERUST_ARTIFACT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/siderust/target/release) if(APPLE) set(SIDERUST_LIBRARY_PATH ${SIDERUST_ARTIFACT_DIR}/libsiderust_ffi.dylib) @@ -115,9 +115,9 @@ endif() # RPATH for shared library lookup at runtime if(APPLE) - set(_siderust_rpath "@loader_path/../siderust-ffi/target/release;@loader_path/../tempoch-cpp/tempoch/tempoch-ffi/target/release;@loader_path/../qtty-cpp/qtty/target/release") + set(_siderust_rpath "@loader_path/../siderust/target/release;@loader_path/../tempoch-cpp/tempoch/tempoch-ffi/target/release;@loader_path/../qtty-cpp/qtty/target/release") elseif(UNIX) - set(_siderust_rpath "$ORIGIN/../siderust-ffi/target/release:$ORIGIN/../tempoch-cpp/tempoch/tempoch-ffi/target/release:$ORIGIN/../qtty-cpp/qtty/target/release") + set(_siderust_rpath "$ORIGIN/../siderust/target/release:$ORIGIN/../tempoch-cpp/tempoch/tempoch-ffi/target/release:$ORIGIN/../qtty-cpp/qtty/target/release") endif() # --------------------------------------------------------------------------- diff --git a/Dockerfile b/Dockerfile index eda0374..195f524 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,8 +25,8 @@ WORKDIR /workspace COPY . /workspace # Fail early if required submodules are missing from the build context. -RUN test -f siderust-ffi/Cargo.toml && \ - test -f siderust/tempoch/tempoch-ffi/Cargo.toml && \ +RUN test -f siderust/siderust-ffi/Cargo.toml && \ + test -f tempoch-cpp/tempoch/tempoch-ffi/Cargo.toml && \ test -f qtty-cpp/CMakeLists.txt # Validate the container toolchain by configuring, building, testing, and generating docs. diff --git a/siderust b/siderust new file mode 160000 index 0000000..6dd8ed9 --- /dev/null +++ b/siderust @@ -0,0 +1 @@ +Subproject commit 6dd8ed97c13baf0099df5d4883fc42c64cf7bb5b diff --git a/siderust-ffi b/siderust-ffi deleted file mode 160000 index f587e3f..0000000 --- a/siderust-ffi +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f587e3fcd52bdaf71e6462bc4b30b56a93aa3fa5 From 1a22a52443d7329f2840cfe2c4c255460950536c Mon Sep 17 00:00:00 2001 From: vpramon Date: Thu, 19 Feb 2026 22:18:06 +0100 Subject: [PATCH 2/7] Update siderust submodule commit reference --- siderust | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/siderust b/siderust index 6dd8ed9..8b95427 160000 --- a/siderust +++ b/siderust @@ -1 +1 @@ -Subproject commit 6dd8ed97c13baf0099df5d4883fc42c64cf7bb5b +Subproject commit 8b95427aab8271bfa080144c1f59515d6ee68f6d From 06d80762626787365eb66f57aaee54e515308d4c Mon Sep 17 00:00:00 2001 From: vpramon Date: Thu, 19 Feb 2026 22:25:42 +0100 Subject: [PATCH 3/7] Update qtty-cpp submodule commit reference --- qtty-cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qtty-cpp b/qtty-cpp index f7a7ba6..953ebe1 160000 --- a/qtty-cpp +++ b/qtty-cpp @@ -1 +1 @@ -Subproject commit f7a7ba6e720f7d8c005ae5c0950aaf73771ce1cb +Subproject commit 953ebe15bcd6f1b929d4516970e5127e2e1ad953 From a5e5be9e3e8c7c02f99694291d25e17dfeb5f86b Mon Sep 17 00:00:00 2001 From: vpramon Date: Thu, 19 Feb 2026 22:38:22 +0100 Subject: [PATCH 4/7] refactor: remove validation step for required submodules in CI workflow --- .github/workflows/ci.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0abdf27..430e5ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,14 +69,6 @@ jobs: restore-keys: | ${{ runner.os }}-cargo- - - name: Validate required submodules exist - shell: bash - run: | - set -euo pipefail - test -f siderust-ffi/Cargo.toml - test -f siderust-ffi/siderust/dev-deps/tempoch/tempoch-ffi/Cargo.toml - test -f qtty-cpp/CMakeLists.txt - - name: Configure (CMake) shell: bash run: | From 551856bbeb61e87b2b8ac17ac06d9c4bd0431975 Mon Sep 17 00:00:00 2001 From: vpramon Date: Thu, 19 Feb 2026 22:46:57 +0100 Subject: [PATCH 5/7] refactor: rename demo executable to siderust_demo in CMakeLists and README --- CMakeLists.txt | 6 +++--- README.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d1c640..c759d89 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -137,10 +137,10 @@ enable_testing() # --------------------------------------------------------------------------- # Example # --------------------------------------------------------------------------- -add_executable(demo examples/demo.cpp) -target_link_libraries(demo PRIVATE siderust_cpp) +add_executable(siderust_demo examples/demo.cpp) +target_link_libraries(siderust_demo PRIVATE siderust_cpp) if(DEFINED _siderust_rpath) - set_target_properties(demo PROPERTIES + set_target_properties(siderust_demo PROPERTIES BUILD_RPATH ${_siderust_rpath} INSTALL_RPATH ${_siderust_rpath} ) diff --git a/README.md b/README.md index 3ceb21c..d4609f6 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ cmake .. cmake --build . # Run example -./demo +./siderust_demo ./coordinates_examples ./coordinate_systems_example ./solar_system_bodies_example From f7e52101b3c0f284f41a409f93421fa4039692fb Mon Sep 17 00:00:00 2001 From: vpramon Date: Thu, 19 Feb 2026 23:07:30 +0100 Subject: [PATCH 6/7] refactor: update build ignore list and fix memory management function call in altitude.hpp --- .gitignore | 1 + include/siderust/altitude.hpp | 2 +- siderust | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index fe8e720..5ade5e6 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ cmake-build-*/ out/ build-make/ build-verify/ +build-ci-config-check/ # IDE files .vscode/ diff --git a/include/siderust/altitude.hpp b/include/siderust/altitude.hpp index 2d17767..58c63ca 100644 --- a/include/siderust/altitude.hpp +++ b/include/siderust/altitude.hpp @@ -88,7 +88,7 @@ inline std::vector periods_from_c(tempoch_period_mjd_t* ptr, uintptr_t c for (uintptr_t i = 0; i < count; ++i) { result.push_back(Period::from_c(ptr[i])); } - tempoch_periods_free(ptr, count); + siderust_periods_free(ptr, count); return result; } diff --git a/siderust b/siderust index 8b95427..74c9456 160000 --- a/siderust +++ b/siderust @@ -1 +1 @@ -Subproject commit 8b95427aab8271bfa080144c1f59515d6ee68f6d +Subproject commit 74c9456db9279b13d2c88516a47a5aefcbbe6130 From a39deaf74eb7f356d85988145a050ae95d30ea9f Mon Sep 17 00:00:00 2001 From: vpramon Date: Thu, 19 Feb 2026 23:19:50 +0100 Subject: [PATCH 7/7] refactor: update CI workflow to remove push trigger and add test label for gtest --- .github/workflows/ci.yml | 4 +--- CMakeLists.txt | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 430e5ea..88cad5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,6 @@ name: CI on: - push: - branches: ["**"] pull_request: workflow_dispatch: @@ -85,7 +83,7 @@ jobs: shell: bash run: | set -euo pipefail - ctest --test-dir build --output-on-failure + ctest --test-dir build --output-on-failure -L siderust_cpp - name: Build docs (Doxygen) shell: bash diff --git a/CMakeLists.txt b/CMakeLists.txt index c759d89..751413a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -205,7 +205,9 @@ if(DEFINED _siderust_rpath) endif() include(GoogleTest) -gtest_discover_tests(test_siderust) +gtest_discover_tests(test_siderust + PROPERTIES LABELS "siderust_cpp" +) # --------------------------------------------------------------------------- # Installation