From e3aaaa86349d503b6e56ef133ee0742a68de8747 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Mon, 25 May 2026 12:07:17 -0500 Subject: [PATCH 1/2] Reduce C++ CodeQL build scope Build a single representative x64 Release native configuration instead of the full Windows matrix so CodeQL extracts a smaller database and avoids standard-runner memory exhaustion. Files changed: - .github/workflows/codeql-analysis.yml Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/codeql-analysis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 3a55f2bc5..7f402b8bb 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -56,14 +56,15 @@ jobs: # If this step fails, then you should remove it and run the build manually (see below) - name: Build C++ env: - SKIP_ARM_BUILD: 1 - SKIP_ARM64_BUILD: 1 PlatformToolset: v143 VSTOOLS_VERSION: vs2022 WindowsSDKVersion: 10.0.22621.0 shell: cmd if: matrix.language == 'cpp' - run: build-all.bat + run: | + call tools\gen-version.cmd + git -c submodule."lib/modules".update=none submodule update --init --recursive --depth=1 + call tools\RunMsBuild.bat x64 Release "sqlite:Rebuild,zlib:Rebuild,sqlite-uwp:Rebuild,win32-lib:Rebuild,win10-lib:Rebuild" # â„šī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl From f87aa2f5d640f0bf0691122beb38f7f1d218b416 Mon Sep 17 00:00:00 2001 From: Bhagirath Mehta Date: Wed, 27 May 2026 01:51:58 -0500 Subject: [PATCH 2/2] Move CodeQL C++ build into script Keep the reduced CodeQL C++ target list in a dedicated batch file instead of embedding it directly in the workflow, as requested in review. Files changed: - .github/workflows/codeql-analysis.yml - build-codeql-cpp.bat Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/codeql-analysis.yml | 5 +---- build-codeql-cpp.bat | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 build-codeql-cpp.bat diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 7f402b8bb..74c630cc0 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -61,10 +61,7 @@ jobs: WindowsSDKVersion: 10.0.22621.0 shell: cmd if: matrix.language == 'cpp' - run: | - call tools\gen-version.cmd - git -c submodule."lib/modules".update=none submodule update --init --recursive --depth=1 - call tools\RunMsBuild.bat x64 Release "sqlite:Rebuild,zlib:Rebuild,sqlite-uwp:Rebuild,win32-lib:Rebuild,win10-lib:Rebuild" + run: build-codeql-cpp.bat # â„šī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl diff --git a/build-codeql-cpp.bat b/build-codeql-cpp.bat new file mode 100644 index 000000000..c33de9c7b --- /dev/null +++ b/build-codeql-cpp.bat @@ -0,0 +1,15 @@ +@echo off + +cd %~dp0 +@setlocal ENABLEEXTENSIONS + +call tools\gen-version.cmd +if errorLevel 1 goto end + +git -c submodule."lib/modules".update=none submodule update --init --recursive --depth=1 +if errorLevel 1 goto end + +call tools\RunMsBuild.bat x64 Release "sqlite:Rebuild,zlib:Rebuild,sqlite-uwp:Rebuild,win32-lib:Rebuild,win10-lib:Rebuild" + +:end +exit /b %errorLevel%