ci(macos,windows): drop submodules:true, use selective submodule list#5992
Merged
ci(macos,windows): drop submodules:true, use selective submodule list#5992
Conversation
Bring macos and windows workflows in line with the selective-list
pattern the other six workflows already follow:
- Remove `submodules: true` from the parent `actions/checkout`. That
flag was inflating each checkout to all 29 top-level submodules,
most of which neither workflow actually needs in source form.
- Keep the existing "Checkout third-party submodules" step name and
expand its `git submodule update` argument list to the submodules
that are actually consumed by the build:
macos: imgui, eigen, parallel-hashmap, expected,
googletest, OpenCTM-git, libE57Format, glad,
tinygltf, laz-perf, mrbind, mrbind-pybind11.
(header-only consumed directly + ones built from source
via thirdparty/CMakeLists.txt's Apple branch + build
tools.)
windows: imgui, eigen, parallel-hashmap, expected,
mrbind, mrbind-pybind11.
(header-only consumed directly + build tools. The heavy
stack on windows comes from vcpkg.)
Saves the parent checkout from cloning ~17–23 unused submodules per
matrix leg.
If a submodule is missing from either list, the build will fail with
a clear cmake / cpath error pointing at the missing path; the list
can be expanded incrementally.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…it+laz-perf
CI run 24958011966 on the previous commit failed at cmake configure
on Windows with three "source directory does not contain a
CMakeLists.txt" errors -- for thirdparty/fastmcpp, thirdparty/laz-perf,
and thirdparty/OpenCTM-git.
The three source/<x>/CMakeLists.txt files that explicitly pull these in
via add_subdirectory(${MESHLIB_THIRDPARTY_DIR}/<y>):
source/fastmcpp/CMakeLists.txt:20 -> thirdparty/fastmcpp
source/laz-perf/CMakeLists.txt:7 -> thirdparty/laz-perf
source/OpenCTM/CMakeLists.txt:1 -> thirdparty/OpenCTM-git
Add fastmcpp + its dependency siblings (nlohmann-json, cpp-httplib --
they travel with fastmcpp per the existing linux-vcpkg selective list)
plus OpenCTM-git and laz-perf to the Windows list. macOS already has
OpenCTM-git and laz-perf; just add fastmcpp/nlohmann-json/cpp-httplib
there for symmetry.
Updated lists:
Windows (11): imgui, eigen, parallel-hashmap, expected,
OpenCTM-git, laz-perf,
fastmcpp, nlohmann-json, cpp-httplib,
mrbind, mrbind-pybind11
macOS (15): imgui, eigen, parallel-hashmap, expected,
googletest, OpenCTM-git, libE57Format, glad,
tinygltf, laz-perf,
fastmcpp, nlohmann-json, cpp-httplib,
mrbind, mrbind-pybind11
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Run 24958327115 / job 73080428199 failed at:
CMake Error: The source directory
"/Users/runner/work/MeshLib/MeshLib/thirdparty/clip"
does not appear to contain CMakeLists.txt.
build_thirdparty.sh on macOS runs scripts/thirdparty/clip.sh against
${MESHLIB_THIRDPARTY_DIR}/clip as a separate build step (line 155),
so thirdparty/clip's source must be checked out. Only macOS needs
this -- Windows gets clip from the vcpkg overlay port at
thirdparty/vcpkg/ports/clip/.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Of the 16 submodules in the macOS list (and equivalents elsewhere), only mrbind has a nested submodule MeshLib actually needs (deps/cppdecl). expected and libE57Format have nested .gitmodules entries but their content is unused by MeshLib's build. Replace `--recursive` with an explicit `git -C thirdparty/mrbind submodule update --init --depth 1 deps/cppdecl` so the intent reads straight off the workflow. Each submodule on its own line. macOS, Ubuntu, Emscripten, linux-vcpkg, pip-build, update-docs-manual use bash `\` continuation; Windows uses one git command per line (pwsh-friendly without backtick). Also shorten the verbose comment block I added on macOS and Windows to a 2-line one matching the style of the other workflows.
Recoups ~5-10s/leg of per-invocation overhead from running 12 separate git submodule update commands. Single batched call matches the macOS workflow's bash backslash continuation style; only the line-continuation character differs (pwsh backtick vs bash backslash).
Grantim
approved these changes
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bring
build-test-macos.ymlandbuild-test-windows.ymlin line with the selective-list pattern the other six workflows in this repo (build-test-emscripten,build-test-linux-vcpkg,build-test-ubuntu-arm64,build-test-ubuntu-x64,pip-build,update-docs-manual) already use, and refine the pattern in all eight to recurse only intothirdparty/mrbind/deps/cppdecl— the one nested submodule MeshLib's build actually consumes — instead of recursing into every entry's.gitmodulesblindly.After this PR, every workflow that follows the
Checkout+Checkout third-party submodulestwo-step pattern has the same shape: parentactions/checkoutwithoutsubmodules: true, followed by a selectivegit submodule update --init --depth 1of just the submodules that workflow consumes, plus an explicitgit -C thirdparty/mrbind submodule update --init --depth 1 deps/cppdeclfor the one path that needs recursion.Why
Both workflows previously had:
submodules: trueclones every entry in.gitmodules(29 top-level submodules — including heavyweights like openvdb, GDCM, libE57Format, mbedtls, onetbb, libzip, c-blosc) regardless of whether the build will use the source. macOS gets most of those from Homebrew or builds them viabuild_thirdparty.sh's thirdparty CMakeLists; Windows gets them from vcpkg. Neither workflow actually consumes most of those submodules' source.This PR drops
submodules: trueand lists exactly the submodules each platform actually consumes:imgui,eigen,parallel-hashmap,expectedgoogletest,OpenCTM-git,libE57Format,glad,tinygltf,laz-perfclipscripts/build_thirdparty.sh→clip.shfastmcpp,nlohmann-json,cpp-httplibadd_subdirectory(${MESHLIB_THIRDPARTY_DIR}/fastmcpp); nlohmann-json + cpp-httplib are fastmcpp's transitive depsmrbind,mrbind-pybind11imgui,eigen,parallel-hashmap,expectedOpenCTM-git,laz-perfsource/OpenCTM/CMakeLists.txtandsource/laz-perf/CMakeLists.txtadd_subdirectorythemfastmcpp,nlohmann-json,cpp-httplibmrbind,mrbind-pybind11Windows lists fewer because vcpkg supplies the equivalents — except for the five that get pulled in via
add_subdirectoryfromsource/<x>/CMakeLists.txtand so need source even on the vcpkg path.Recursion is targeted
Of the 16 submodules on the macOS list, only
thirdparty/mrbindhas a nested submodule MeshLib's build actually needs (deps/cppdecl, the codegen library mrbind links against). Two other submodules carry nested.gitmodulesentries but neither is consumed by MeshLib:thirdparty/expected→cmake/tl-cmakeis unreferenced by the cantonios fork's CMakeLists at the pinned commit.thirdparty/libE57Format→test/extern/googletestis gated behind libE57Format's own test target, which MeshLib never builds.The other 13 have no nested
.gitmodulesat all —--recursiveon them was a strict no-op.So the workflow does:
Bash workflows use
\continuation; the Windows workflow uses pwsh backtick (`) for the same shape. (See the Windows step.)Measured impact
Comparing the latest run 24994826587 (
764cd258) against master baseline 24987634018 (466884e1). Times =Checkout+Checkout third-party submodulessummed (seconds):macos-15-intel)macos-latest)Per master run that's ~6.2 minutes of cumulative runner-time saved across these 7 GitHub-hosted/self-hosted legs, with ~50–80 s shaved off each Windows leg's critical path.
The self-hosted arm64 Release runner is essentially neutral — its
.git/modules/cache stays warm between runs so neither pre- nor post-PR actually clones much there. The savings show up on the GitHub-hosted ephemeral-VM legs.Pattern uniformity
All eight workflows that follow the
Checkout+Checkout third-party submodulestwo-step pattern now use the same shape — nosubmodules: trueon the parent, selective list with explicit cppdecl recursion in the follow-up step. The remaining occurrences ofsubmodules: true/submodules: recursivein this repo are in workflows that don't follow that pattern (prepare-images.yml,update-docs.yml,update-win-version.yml, the macOS- and Windows-specific jobs inpip-build.yml) — those genuinely need the full tree for unrelated reasons and are out of scope here.Iteration history
CI on this branch surfaced changes incrementally:
55816785— initial drop ofsubmodules: trueon macOS + Windows with selective lists.60fc8e3f— addedOpenCTM-git,laz-perf,fastmcpp,nlohmann-json,cpp-httplibafter Windows configure-time errors onsource/{OpenCTM,laz-perf,fastmcpp}/CMakeLists.txtadd_subdirectorycalls.d0c12915— addedclipafter macOSbuild_thirdparty.shfailed on the standaloneclip.shstep.0f13185b— dropped--recursive, added explicitgit -C thirdparty/mrbind submodule update --init --depth 1 deps/cppdecl. Windows used per-line separate commands at this stage.764cd258— switched Windows from per-line separate commands to a single batched call with pwsh backtick continuation, recouping ~7 s/leg of per-invocation overhead.Replaces
Closed PR #5991, which took the opposite direction (add
submodules: trueeverywhere, trim the second step to justthirdparty/mrbind). The selective-list approach in this PR is what the repo had been using on its other six workflows; extending it to macOS and Windows is the simpler and faster end state.🤖 Generated with Claude Code