From 784d172a615a94436f9bccd7df7adc642594c7c9 Mon Sep 17 00:00:00 2001 From: forbes Date: Tue, 3 Mar 2026 08:28:17 -0600 Subject: [PATCH] fix(ci): clone submodule content in rattler-build package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rattler-build's source.path copy does not include submodule contents — directories like mods/silo/, mods/solver/, mods/gears/, and mods/datums/ end up empty in the work directory, causing cmake --install to fail when it tries to install files from those paths. Add a clone_if_empty helper to build.sh that detects empty submodule directories and shallow-clones them from their remotes before CMake runs. Add git to build requirements in recipe.yaml. This fixes the release build (AppImage) failure where cmake --install failed at the silo addon install step after successfully installing the silo tree-node icons from src/Mod/Create/resources/. --- package/rattler-build/build.sh | 18 ++++++++++++++++++ package/rattler-build/recipe.yaml | 1 + 2 files changed, 19 insertions(+) diff --git a/package/rattler-build/build.sh b/package/rattler-build/build.sh index 77aee35400..51b3cc42e6 100644 --- a/package/rattler-build/build.sh +++ b/package/rattler-build/build.sh @@ -11,6 +11,24 @@ mkdir -p "$CCACHE_DIR" echo "ccache config: CCACHE_DIR=$CCACHE_DIR CCACHE_BASEDIR=$CCACHE_BASEDIR" ccache -z || true +# rattler-build's source.path does not copy submodule contents — clone them +# if the directories are missing or empty. +clone_if_empty() { + local dir="$1" url="$2" ref="$3" + local count + count=$(find "${dir}" -mindepth 1 -not -name '.git' 2>/dev/null | head -1 | wc -l) + if [ "$count" -eq 0 ]; then + echo "Submodule ${dir} missing content — cloning from ${url} (${ref})" + rm -rf "${dir}" + git clone --depth 1 --branch "${ref}" --recurse-submodules "${url}" "${dir}" + fi +} + +clone_if_empty mods/silo https://git.kindred-systems.com/kindred/silo-mod.git main +clone_if_empty mods/solver https://git.kindred-systems.com/kindred/solver.git main +clone_if_empty mods/gears https://git.kindred-systems.com/kindred/gears.git main +clone_if_empty mods/datums https://git.kindred-systems.com/kindred/datums.git main + if [[ ${HOST} =~ .*linux.* ]]; then CMAKE_PRESET=conda-linux-release fi diff --git a/package/rattler-build/recipe.yaml b/package/rattler-build/recipe.yaml index b49fb38ad3..03e8a68757 100644 --- a/package/rattler-build/recipe.yaml +++ b/package/rattler-build/recipe.yaml @@ -16,6 +16,7 @@ requirements: build: - ccache - cmake + - git - compilers>=1.10,<1.11 - doxygen - icu>=75,<76 -- 2.49.1