Skip to content

Commit f3341ac

Browse files
committed
Optimize cloning in the real-time benchmark suite
Similarly to #23211
1 parent db9d9cc commit f3341ac

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

.github/workflows/real-time-benchmark.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,14 @@ jobs:
119119
with:
120120
repository: '${{ env.REPOSITORY }}'
121121
ref: '${{ env.COMMIT }}'
122-
fetch-depth: 100
122+
filter: blob:none
123123
path: 'php-version-benchmarks/tmp/php_${{ env.ID }}'
124124
- name: Checkout php-src (baseline version)
125125
uses: actions/checkout@v6
126126
with:
127127
repository: '${{ env.REPOSITORY }}'
128128
ref: '${{ env.BASELINE_COMMIT }}'
129-
fetch-depth: 100
129+
filter: blob:none
130130
path: 'php-version-benchmarks/tmp/php_baseline'
131131
- name: Setup benchmark results
132132
run: |
@@ -141,6 +141,7 @@ jobs:
141141
repository: php/real-time-benchmark-data
142142
ssh-key: ${{ secrets.PHP_VERSION_BENCHMARK_RESULTS_DEPLOY_KEY }}
143143
path: 'php-version-benchmarks/docs/results'
144+
fetch-depth: 1
144145
- name: Setup PHP config - baseline PHP version
145146
run: |
146147
set -e
@@ -296,18 +297,20 @@ jobs:
296297
run: |
297298
set -ex
298299
299-
sed -i "s|#ARTIFACT_URL#|${{ steps.upload.outputs.artifact-url }}|g" "${NEWEST_RESULT_DIRECTORY}result.md"
300-
301300
cd ./php-version-benchmarks/docs/results
302-
git pull --autostash
301+
git pull
303302
if [ -e ".git/MERGE_HEAD" ]; then
304303
echo "Merging, can't proceed"
305304
exit 1
306305
fi
306+
307+
sed -i "s|#ARTIFACT_URL#|${{ steps.upload.outputs.artifact-url }}|g" "${NEWEST_RESULT_DIRECTORY}result.md"
308+
307309
git add .
308310
if git diff --cached --quiet; then
309311
exit 1
310312
fi
313+
311314
git commit -m "Add result for ${{ github.repository }}@${{ github.sha }}"
312315
git push
313316
- name: Comment results

0 commit comments

Comments
 (0)