Skip to content

Commit 5bde808

Browse files
committed
Merge master (a57d20e, #611 CodeQL cap) into dash/s8-poolnode-share-tracker-leaf — fire canary against capped base
2 parents 08319e6 + a57d20e commit 5bde808

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/codeql-analysis.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff 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' }}

0 commit comments

Comments
 (0)