From 3e4957575c7fc67d3cfb32c4c0c2afb5924a775b Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Fri, 20 Mar 2026 21:17:36 +0000 Subject: [PATCH 1/5] Initial plan From b147eb0dac0663f72d5ba07429afa34e411c8f11 Mon Sep 17 00:00:00 2001 From: "anthropic-code-agent[bot]" <242468646+Claude@users.noreply.github.com> Date: Fri, 20 Mar 2026 21:20:03 +0000 Subject: [PATCH 2/5] Re-enable Windows CI unit tests with memory optimizations - Add /MP2 flag to MSVC compiler to limit parallel compilation - Use --parallel 1 for cmake build to reduce memory pressure - Add explicit -A x64 flag to ensure 64-bit toolchain is used - Re-enable test building and execution in Windows CI workflow Co-authored-by: DennisOSRM <1067895+DennisOSRM@users.noreply.github.com> Agent-Logs-Url: https://github.com/Project-OSRM/osrm-backend/sessions/56738ea6-f252-48af-931a-34dd004d9204 --- .github/workflows/osrm-backend.yml | 40 ++++++++++++++---------------- CMakeLists.txt | 1 + 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/.github/workflows/osrm-backend.yml b/.github/workflows/osrm-backend.yml index 455e1b0eee6..f863925e827 100644 --- a/.github/workflows/osrm-backend.yml +++ b/.github/workflows/osrm-backend.yml @@ -55,27 +55,25 @@ jobs: python3 -m pip install conan==2.15.1 conan profile detect --force - cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CONAN=ON -DENABLE_NODE_BINDINGS=ON .. - cmake --build . --config Release - - # TODO: MSVC goes out of memory when building our tests - # - name: Run tests - # shell: bash - # run: | - # cd build - # cmake --build . --config Release --target tests - # # TODO: run tests - # - name: Run node tests - # shell: bash - # run: | - # ./lib/binding_napi_v8/osrm-extract.exe -p profiles/car.lua test/data/monaco.osm.pbf - - # mkdir -p test/data/ch - # cp test/data/monaco.osrm* test/data/ch/ - # ./lib/binding_napi_v8/osrm-contract.exe test/data/ch/monaco.osrm - - # ./lib/binding_napi_v8/osrm-datastore.exe test/data/ch/monaco.osrm - # node test/nodejs/index.js + cmake -A x64 -DCMAKE_BUILD_TYPE=Release -DENABLE_CONAN=ON -DENABLE_NODE_BINDINGS=ON .. + cmake --build . --config Release --parallel 1 + + - name: Build tests + shell: bash + run: | + cd build + cmake --build . --config Release --target tests --parallel 1 + + - name: Run tests + shell: bash + run: | + cd build + for test_exe in ./unit_tests/*-tests.exe; do + if [ -f "$test_exe" ]; then + echo "Running $test_exe" + "$test_exe" + fi + done - name: Build Node package shell: bash run: ./scripts/ci/node_package.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index a6aac9106a9..9e44c86334d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -281,6 +281,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") # avoid compiler error C1128 from scripting_environment_lua.cpp set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32_LEAN_AND_MEAN") # avoid compiler error C2011 from dual #include of winsock.h and winsock2.h set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8") # support Unicode in fmt library + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP2") # limit parallel compilation to reduce memory usage add_dependency_defines(-DBOOST_LIB_DIAGNOSTIC) add_dependency_defines(-D_CRT_SECURE_NO_WARNINGS) add_dependency_defines(-DNOMINMAX) # avoid min and max macros that can break compilation From e47c9a2e6ff3aa06e2871eb471ecba44f473e756 Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Sun, 22 Mar 2026 20:39:44 +0100 Subject: [PATCH 3/5] Change parallel compilation flag from /MP2 to /MP This limits parallelisation even further --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e44c86334d..e615d5a7d9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -281,7 +281,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") # avoid compiler error C1128 from scripting_environment_lua.cpp set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32_LEAN_AND_MEAN") # avoid compiler error C2011 from dual #include of winsock.h and winsock2.h set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8") # support Unicode in fmt library - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP2") # limit parallel compilation to reduce memory usage + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") # limit parallel compilation to reduce memory usage add_dependency_defines(-DBOOST_LIB_DIAGNOSTIC) add_dependency_defines(-D_CRT_SECURE_NO_WARNINGS) add_dependency_defines(-DNOMINMAX) # avoid min and max macros that can break compilation From 338ce606a75a374c20b611d5d9e5d53098aae270 Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Thu, 30 Apr 2026 16:16:04 +0200 Subject: [PATCH 4/5] ci: increase heap space in msvc --- .github/workflows/osrm-backend.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/osrm-backend.yml b/.github/workflows/osrm-backend.yml index 534940ed137..a9086f43c3d 100644 --- a/.github/workflows/osrm-backend.yml +++ b/.github/workflows/osrm-backend.yml @@ -68,14 +68,13 @@ jobs: - name: Build shell: bash run: | - cmake --preset ci-windows -DENABLE_NODE_BINDINGS=ON + cmake --preset ci-windows -DENABLE_NODE_BINDINGS=ON -DCMAKE_CXX_FLAGS="/Zm256 /MP2" cmake --build --preset ci-windows - name: Run tests shell: bash run: | cd build cmake --build . --config Release --target tests - # TODO: run tests - name: Run node tests shell: bash run: | From 7b16373e3492e87964aa324ba33fad1bcc91e722 Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Sat, 2 May 2026 19:22:39 +0200 Subject: [PATCH 5/5] Update OSRM backend workflow to remove CXXFLAGS Removed CXXFLAGS from the cmake command in the Build step. --- .github/workflows/osrm-backend.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/osrm-backend.yml b/.github/workflows/osrm-backend.yml index a9086f43c3d..d61bb994061 100644 --- a/.github/workflows/osrm-backend.yml +++ b/.github/workflows/osrm-backend.yml @@ -36,6 +36,7 @@ jobs: continue-on-error: false env: BUILD_TYPE: Release + CXXFLAGS: "/Zm256 /MP2" steps: - uses: actions/checkout@v6 - run: cmake --version @@ -68,7 +69,7 @@ jobs: - name: Build shell: bash run: | - cmake --preset ci-windows -DENABLE_NODE_BINDINGS=ON -DCMAKE_CXX_FLAGS="/Zm256 /MP2" + cmake --preset ci-windows -DENABLE_NODE_BINDINGS=ON cmake --build --preset ci-windows - name: Run tests shell: bash