From ace91ddd7305f865364ba42620963c165e0b7be9 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 21 Nov 2023 10:58:15 +0100 Subject: [PATCH] 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 --- .github/actions/test-linux/action.yml | 5 ++++- .github/actions/test-macos/action.yml | 2 +- .github/workflows/nightly.yml | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/actions/test-linux/action.yml b/.github/actions/test-linux/action.yml index f6d726a2f71..a56ed2823d7 100644 --- a/.github/actions/test-linux/action.yml +++ b/.github/actions/test-linux/action.yml @@ -9,6 +9,9 @@ inputs: jitType: default: 'disable' required: false + idleCpu: + default: 'false' + required: false runs: using: composite steps: @@ -36,7 +39,7 @@ runs: sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \ -d opcache.jit=${{ inputs.jitType }} \ -d opcache.jit_buffer_size=16M \ - -j$(/usr/bin/nproc) \ + ${{ inputs.idleCpu == 'true' && '-j$(($(/usr/bin/nproc) - 1))' || '-j$(/usr/bin/nproc)' }} \ -g FAIL,BORK,LEAK,XLEAK \ --no-progress \ --offline \ diff --git a/.github/actions/test-macos/action.yml b/.github/actions/test-macos/action.yml index 63bccece39e..0090f6a1cb3 100644 --- a/.github/actions/test-macos/action.yml +++ b/.github/actions/test-macos/action.yml @@ -21,7 +21,7 @@ runs: sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \ -d opcache.jit=${{ inputs.jitType }} \ -d opcache.jit_buffer_size=16M \ - -j$(sysctl -n hw.ncpu) \ + -j$(($(sysctl -n hw.ncpu) - 1)) \ -g FAIL,BORK,LEAK,XLEAK \ --no-progress \ --offline \ diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index dae430f225b..a8fdd0a867b 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -82,6 +82,7 @@ jobs: testArtifacts: ${{ matrix.branch.name }}_${{ matrix.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} runTestsParameters: >- ${{ matrix.run_tests_parameters }} + idleCpu: ${{ matrix.asan && 'true' || 'false' }} - name: Test Tracing JIT uses: ./.github/actions/test-linux with: