diff --git a/.github/actions/test-linux/action.yml b/.github/actions/test-linux/action.yml index b10e72f7378..876ef3ff84d 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: @@ -45,7 +48,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 4618bee6150..46cd64d2aa5 100644 --- a/.github/actions/test-macos/action.yml +++ b/.github/actions/test-macos/action.yml @@ -22,7 +22,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 6a0f577bbeb..a5f89915192 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -109,6 +109,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: