[PHP-CVS] [php-src] master: Optimize cloning in the real-time benchmark suite

[email protected] (Máté Kocsis)
Newsgroups php.cvs
Message-ID <[email protected]>
Author: Máté Kocsis (kocsismate)
Date: 2026-08-16T22:54:05+02:00

Commit: https://github.com/php/php-src/commit/f3341ac25448747c44e0ea685a487ae5dd8dd186
Raw diff: https://github.com/php/php-src/commit/f3341ac25448747c44e0ea685a487ae5dd8dd186.diff

Optimize cloning in the real-time benchmark suite

Similarly to https://github.com/php/php-src/pull/23211

Changed paths:
  M  .github/workflows/real-time-benchmark.yml


Diff:

diff --git a/.github/workflows/real-time-benchmark.yml b/.github/workflows/real-time-benchmark.yml
index dc28e8438db2..be3a35d47aa1 100644
--- a/.github/workflows/real-time-benchmark.yml
+++ b/.github/workflows/real-time-benchmark.yml
@@ -119,14 +119,14 @@ jobs:
         with:
           repository: '${{ env.REPOSITORY }}'
           ref: '${{ env.COMMIT }}'
-          fetch-depth: 100
+          filter: blob:none
           path: 'php-version-benchmarks/tmp/php_${{ env.ID }}'
       - name: Checkout php-src (baseline version)
         uses: actions/checkout@v6
         with:
           repository: '${{ env.REPOSITORY }}'
           ref: '${{ env.BASELINE_COMMIT }}'
-          fetch-depth: 100
+          filter: blob:none
           path: 'php-version-benchmarks/tmp/php_baseline'
       - name: Setup benchmark results
         run: |
@@ -141,6 +141,7 @@ jobs:
           repository: php/real-time-benchmark-data
           ssh-key: ${{ secrets.PHP_VERSION_BENCHMARK_RESULTS_DEPLOY_KEY }}
           path: 'php-version-benchmarks/docs/results'
+          fetch-depth: 1
       - name: Setup PHP config - baseline PHP version
         run: |
           set -e
@@ -296,18 +297,20 @@ jobs:
         run: |
           set -ex
 
-          sed -i "s|#ARTIFACT_URL#|${{ steps.upload.outputs.artifact-url }}|g" "${NEWEST_RESULT_DIRECTORY}result.md"
-
           cd ./php-version-benchmarks/docs/results
-          git pull --autostash
+          git pull
           if [ -e ".git/MERGE_HEAD" ]; then
             echo "Merging, can't proceed"
             exit 1
           fi
+
+          sed -i "s|#ARTIFACT_URL#|${{ steps.upload.outputs.artifact-url }}|g" "${NEWEST_RESULT_DIRECTORY}result.md"
+
           git add .
           if git diff --cached --quiet; then
             exit 1
           fi
+
           git commit -m "Add result for ${{ github.repository }}@${{ github.sha }}"
           git push
       - name: Comment results
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.