From c65adbaed0b683839bec4054cfcac2a638f9af8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Wed, 14 Jan 2026 08:41:38 +0100 Subject: [PATCH] Various improvements for the Real time benchmark (#20930) - Ubuntu is updated to 24.04 - Log files are also uploaded as artifact - The baseline commit is now correctly set to the merge base commit when the workflow is manually started on a PR --- .github/workflows/real-time-benchmark.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/real-time-benchmark.yml b/.github/workflows/real-time-benchmark.yml index 9276539841e72..091e6a15b46fe 100644 --- a/.github/workflows/real-time-benchmark.yml +++ b/.github/workflows/real-time-benchmark.yml @@ -60,7 +60,7 @@ jobs: REAL_TIME_BENCHMARK: name: REAL_TIME_BENCHMARK if: github.repository == 'php/php-src' || github.event_name == 'workflow_dispatch' - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 env: REPOSITORY: ${{ github.repository }} BRANCH: "master" @@ -82,7 +82,7 @@ jobs: echo "YEAR=$YEAR" >> $GITHUB_ENV if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - PR_INFO=$(gh pr view ${{ inputs.pull_request }} --json headRepositoryOwner,headRepository,headRefName,headRefOid,baseRefOid --repo ${{ github.repository }} | jq -r '.headRepositoryOwner.login, .headRepository.name, .headRefName, .headRefOid, .baseRefOid') + PR_INFO=$(gh pr view ${{ inputs.pull_request }} --json headRepositoryOwner,headRepository,headRefName,headRefOid,baseRefName --repo ${{ github.repository }} | jq -r '.headRepositoryOwner.login, .headRepository.name, .headRefName, .headRefOid, .baseRefName') REPOSITORY="$(echo "$PR_INFO" | sed -n '1p')/$(echo "$PR_INFO" | sed -n '2p')" echo "REPOSITORY=$REPOSITORY" >> $GITHUB_ENV @@ -93,7 +93,9 @@ jobs: COMMIT=$(echo "$PR_INFO" | sed -n '4p') echo "COMMIT=$COMMIT" >> $GITHUB_ENV - BASELINE_COMMIT=$(echo "$PR_INFO" | sed -n '5p') + BASELINE_BRANCH=$(echo "$PR_INFO" | sed -n '5p') + + BASELINE_COMMIT=$(gh api /repos/${{ github.repository }}/compare/$BASELINE_BRANCH...$COMMIT --jq '.merge_base_commit.sha') echo "BASELINE_COMMIT=$BASELINE_COMMIT" >> $GITHUB_ENV echo "ID=benchmarked" >> $GITHUB_ENV @@ -288,12 +290,14 @@ jobs: fi git commit -m "Add result for ${{ github.repository }}@${{ github.sha }}" git push - - name: Upload artifact + - name: Upload artifacts if: github.event_name == 'workflow_dispatch' uses: actions/upload-artifact@v6 with: name: results - path: ./php-version-benchmarks/docs/results/${{ env.YEAR }} + path: | + ./php-version-benchmarks/tmp/results/${{ env.YEAR }}/*/*.* + ./php-version-benchmarks/tmp/results/${{ env.YEAR }}/*/*/*.log retention-days: 30 - name: Comment results if: github.event_name == 'workflow_dispatch'