Skip to content

Commit ace91dd

Browse files
committed
Reduce parallelism on frequently crashing jobs
Some jobs on GA apparently consume a lot of CPU resources, possibly hindering communication between master and runner. This only seems to happen on Linux+ASAN and macOS. For these jobs, keep one core idle. Closes GH-12742
1 parent e94ab04 commit ace91dd

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

.github/actions/test-linux/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ inputs:
99
jitType:
1010
default: 'disable'
1111
required: false
12+
idleCpu:
13+
default: 'false'
14+
required: false
1215
runs:
1316
using: composite
1417
steps:
@@ -36,7 +39,7 @@ runs:
3639
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
3740
-d opcache.jit=${{ inputs.jitType }} \
3841
-d opcache.jit_buffer_size=16M \
39-
-j$(/usr/bin/nproc) \
42+
${{ inputs.idleCpu == 'true' && '-j$(($(/usr/bin/nproc) - 1))' || '-j$(/usr/bin/nproc)' }} \
4043
-g FAIL,BORK,LEAK,XLEAK \
4144
--no-progress \
4245
--offline \

.github/actions/test-macos/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ runs:
2121
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
2222
-d opcache.jit=${{ inputs.jitType }} \
2323
-d opcache.jit_buffer_size=16M \
24-
-j$(sysctl -n hw.ncpu) \
24+
-j$(($(sysctl -n hw.ncpu) - 1)) \
2525
-g FAIL,BORK,LEAK,XLEAK \
2626
--no-progress \
2727
--offline \

.github/workflows/nightly.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ jobs:
8282
testArtifacts: ${{ matrix.branch.name }}_${{ matrix.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}
8383
runTestsParameters: >-
8484
${{ matrix.run_tests_parameters }}
85+
idleCpu: ${{ matrix.asan && 'true' || 'false' }}
8586
- name: Test Tracing JIT
8687
uses: ./.github/actions/test-linux
8788
with:

0 commit comments

Comments
 (0)