From a71c5b7480c663d0eb5e0dc1136bbcb382ed538c Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Thu, 20 Feb 2025 15:33:07 +0000 Subject: [PATCH] HACK: throttle the number of cores to avoid OOM on the CI --- .github/workflows/build-swift-debugging.yaml | 2 +- extensions/cxx_debugging/tools/bootstrap.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-swift-debugging.yaml b/.github/workflows/build-swift-debugging.yaml index cf24270cea4..5969eec16a5 100644 --- a/.github/workflows/build-swift-debugging.yaml +++ b/.github/workflows/build-swift-debugging.yaml @@ -34,7 +34,7 @@ jobs: - uses: actions/setup-node@v4 with: node-version: '22' - - run: ./tools/bootstrap.py ../../out -no-check -release-version 90001 -patch-level 0 + - run: ./tools/bootstrap.py ../../out -verbose -no-check -release-version 90001 -patch-level 0 working-directory: ./extensions/cxx_debugging/ - uses: actions/upload-artifact@v4 with: diff --git a/extensions/cxx_debugging/tools/bootstrap.py b/extensions/cxx_debugging/tools/bootstrap.py index c554eb4ef19..296387808df 100755 --- a/extensions/cxx_debugging/tools/bootstrap.py +++ b/extensions/cxx_debugging/tools/bootstrap.py @@ -190,6 +190,10 @@ def stage2(source_dir, stage1_dir, OPTIONS): maybe_cmake(binary_dir, cmake_args, OPTIONS.verbose) num_cores = os.cpu_count() + # HACK: throttle the number of cores to avoid OOM on the CI + if os.getenv('CI'): + num_cores = min(num_cores, 1) + env = os.environ.copy() if not OPTIONS.no_check: