File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,10 +95,24 @@ jobs:
9595 cmake -S . -B build_codeql \
9696 -DCMAKE_TOOLCHAIN_FILE=build_codeql/conan_toolchain.cmake \
9797 -DCMAKE_BUILD_TYPE=Release
98- cmake --build build_codeql --target c2pool -j$(nproc)
98+ # Cap build parallelism on the shared self-hosted 905 box so the
99+ # CodeQL build does not co-OOM with a concurrent ASan job.
100+ # github-hosted (fork) runs keep full parallelism.
101+ if [ "${{ runner.environment }}" = "github-hosted" ]; then
102+ JOBS=$(nproc)
103+ else
104+ JOBS=8
105+ fi
106+ cmake --build build_codeql --target c2pool -j"$JOBS"
99107
100108 # ── Analysis ──────────────────────────────────────────────────────────
101109 - name : Perform CodeQL Analysis
102110 uses : github/codeql-action/analyze@v4
103111 with :
104112 category : " /language:${{ matrix.language }}"
113+ # Cap the run-queries footprint on the shared self-hosted 905 box so
114+ # CodeQL does not co-OOM with a concurrent ASan job (was auto-sizing
115+ # to --ram=60466 --threads=32, nearly the whole box). 0 = action
116+ # auto-default, kept for github-hosted (fork) runs.
117+ threads : ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && '12' || '0' }}
118+ ram : ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && '20000' || '0' }}
You can’t perform that action at this time.
0 commit comments