diff --git a/.github/workflows/benchmark.yaml b/.github/workflows/benchmark.yaml index 74718c419..3b6d6d904 100644 --- a/.github/workflows/benchmark.yaml +++ b/.github/workflows/benchmark.yaml @@ -55,6 +55,41 @@ jobs: path: dist/bench-branch-main-result.xml pr-bench-test: + runs-on: ubuntu-latest + name: Benchmark PR + needs: main-bench-test + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + ini-values: phar.readonly=0, display_errors=On, error_reporting=-1 + tools: composer + coverage: none + + - name: Install Composer dependencies + uses: ramsey/composer-install@v2 + + - name: Ensure that the make target is up to date + run: make _vendor_install + + - name: Install PHPBench + uses: ramsey/composer-install@v2 + with: + working-directory: vendor-bin/phpbench + + - name: Ensure that the PHPBench make target is up to date + run: make phpbench_install + + - name: Run PHPBench + run: make phpbench + + pr-main-bench-test: runs-on: ubuntu-latest name: Benchmark PR needs: main-bench-test @@ -91,7 +126,7 @@ jobs: with: name: bench-branch-main-result - - name: Run PHPBench against PR branch + - name: Run PHPBench for PR branch run: make phpbench_pr @@ -104,6 +139,7 @@ jobs: needs: - main-bench-test - pr-bench-test + - pr-main-bench-test if: always() steps: - name: Successful run