Skip to content

Commit 8d436bb

Browse files
committed
CI: run testsuite with THREADS=4, add step timeouts
The testsuite was running single-threaded (default THREADS=1), causing 3+ hour runs on 4 vCPU VMs. Add THREADS=4 to match VM CPU count. Add timeout-minutes to build and test steps: - stage0+stage1: 30 min (normally ~12 min) - stage2: 60 min (normally ~38 min) - testsuite: 120 min (normally ~30-60 min with 4 threads)
1 parent 6cf614f commit 8d436bb

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/nix-ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ jobs:
134134
# GIT_COMMIT_ID env var instead of running 'git rev-parse HEAD'.
135135
- name: Build stage0 + stage1
136136
shell: devx {0}
137+
timeout-minutes: 30
137138
run: |
138139
set -eo pipefail
139140
make QUIET=1 CABAL_ARGS="-j2" ${{ steps.cabal-cache.outputs.cache-hit == 'true' && 'USE_SYSTEM_CABAL=1' || '' }} stage1
@@ -178,6 +179,7 @@ jobs:
178179
179180
- name: Build stage2
180181
shell: devx {0}
182+
timeout-minutes: 60
181183
run: |
182184
set -eo pipefail
183185
make QUIET=1 DYNAMIC=${{ matrix.dynamic }} CABAL_ARGS="-j2" ${{ steps.cabal-cache.outputs.cache-hit == 'true' && 'USE_SYSTEM_CABAL=1' || '' }} stage2
@@ -394,19 +396,21 @@ jobs:
394396

395397
- name: Run testsuite
396398
shell: devx {0}
399+
timeout-minutes: 120
397400
run: |
398401
set -eo pipefail
399402
# Free disk: remove .git (not needed for tests) and cabal index
400403
rm -rf .git
401404
find . -name .git -type d -exec rm -rf {} + 2>/dev/null || true
402405
rm -rf ~/.cabal-devx/packages/ 2>/dev/null || true
403-
# Run testsuite from checkout's testsuite/ directory with dist GHC on PATH
406+
# Run testsuite from checkout's testsuite/ directory with dist GHC on PATH.
407+
# Use THREADS=4 to match VM vCPU count (default is 1 = serial).
404408
cd testsuite
405409
PATH=$GITHUB_WORKSPACE/_build/dist/bin:$PATH \
406410
METRICS_FILE=$GITHUB_WORKSPACE/_build/test-perf.csv \
407411
SUMMARY_FILE=$GITHUB_WORKSPACE/_build/test-summary.txt \
408412
JUNIT_FILE=$GITHUB_WORKSPACE/_build/test-junit.xml \
409-
make
413+
make THREADS=4
410414
411415
- name: Stop metrics collection
412416
if: ${{ !cancelled() }}

0 commit comments

Comments
 (0)