ci: fix nightly quality cross-platform regressions#400
Draft
ci: fix nightly quality cross-platform regressions#400
Conversation
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
This PR fixes the three failing job classes in the current
Nightly Qualityrun onmaster.It keeps the scope intentionally small:
cmake/ctestresolve to paths containing spacesRoot Causes
1. macOS C++ correctness
mk/common.mkcalledscripts/build_config.pythrough$(shell ...)and passedCPPFLAGS/CXXFLAGS/LDFLAGSas CLI arguments. On the macOS nightly runner, that quoting path was unstable and repeatedly produced:build_config.py: error: argument --cppflags: expected one argumentThe result was an incomplete CMake configure on
macos-15.2. Windows C++ correctness
mk/test.mkinvoked$(CMAKE)and$(CTEST)without quoting. Onwindows-2025, those variables resolved to paths underC:\Program Files\..., so Git Bash split the command at the space and failed before configure/build.3. Sanitizers
The Linux sanitizer log showed a leak rooted in
generateSubNetwork(Network&), and local sanitizer verification also exposed a second issue in the OpenMP move-commit path:InfoNode::deleteChildren()only deleted active children and ignoredcollapsedFirstChild/collapsedLastChildtryMoveEachNodeIntoBestModuleInParallel()readm_emptyModules.back()before checking that the vector was non-emptyChanges
mk/common.mkCPPFLAGS/CXXFLAGS/LDFLAGS/MACOSX_DEPLOYMENT_TARGETvia environment insteadscripts/build_config.pymk/test.mk$(CMAKE)and$(CTEST)invocations so paths with spaces remain executable on Windows Git Bashsrc/core/InfoNode.cppdeleteChildren()also clean up collapsed child chainssrc/core/InfomapBase.cppNetworksrc/core/InfomapOptimizer.hm_emptyModules.back()test/cpp/test_partition.cppdeleteChildren()clears collapsed children tooVerification
Local verification run after the final patch set:
PATH="/opt/homebrew/bin:$PATH" make doctor MODE=release OPENMP=1 CXX=clang++ CPPFLAGS='-I/opt/homebrew/opt/libomp/include' CXXFLAGS='-I/opt/homebrew/opt/libomp/include' LDFLAGS='-L/opt/homebrew/opt/libomp/lib' MACOSX_DEPLOYMENT_TARGET=15.0PATH="/opt/homebrew/bin:$PATH" make test-native JOBS=1PATH="/opt/homebrew/bin:$PATH" make test-sanitizers JOBS=1PATH="/opt/homebrew/bin:$PATH" make test-native JOBS=1 CMAKE='/tmp/cmake space/cmake' CTEST='/tmp/cmake space/ctest' CTEST_ARGS='-R infomap_cpp_partition_tests'That last command uses symlinks under a path containing a space to prove the quoted
cmake/ctestinvocations behave correctly.Risk
This is still a CI-fix PR, so I’m keeping it draft.
The behavioral changes are intentionally narrow: