Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
if: ${{ github.event.pull_request.base.ref == github.event.repository.default_branch }}
name: Performance Regression Check
runs-on: ubuntu-latest
timeout-minutes: 180

steps:
- name: Checkout PR branch
Expand All @@ -44,23 +45,35 @@ jobs:
- name: Install dependencies
uses: ramsey/composer-install@v3

- name: Benchmark base branch
- name: Check out base branch
run: |
git checkout ${{ github.event.pull_request.base.sha }}
cp .env.example .env
sed -i 's/^INTERNAL_CACHES=.*/INTERNAL_CACHES=false/' .env
sed -i 's/^DISCOVERY_CACHE=.*/DISCOVERY_CACHE=false/' .env
composer update --no-interaction --prefer-dist --quiet
vendor/bin/phpbench run --tag=base --store --progress=none

- name: Benchmark PR branch
- name: Install base branch dependencies
timeout-minutes: 20
run: composer update --no-interaction --prefer-dist --quiet

- name: Benchmark base branch
timeout-minutes: 70
run: vendor/bin/phpbench run --tag=base --store --progress=none

- name: Check out PR branch
run: |
git checkout ${{ github.event.pull_request.head.sha }}
cp .env.example .env
sed -i 's/^INTERNAL_CACHES=.*/INTERNAL_CACHES=false/' .env
sed -i 's/^DISCOVERY_CACHE=.*/DISCOVERY_CACHE=false/' .env
composer update --no-interaction --prefer-dist --quiet
vendor/bin/phpbench run --tag=pr --store --ref=base --report=aggregate --progress=none --output=benchmark-comment | tee benchmark-result.txt || true

- name: Install PR branch dependencies
timeout-minutes: 20
run: composer update --no-interaction --prefer-dist --quiet

- name: Benchmark PR branch
timeout-minutes: 70
run: vendor/bin/phpbench run --tag=pr --store --ref=base --report=aggregate --progress=none --output=benchmark-comment | tee benchmark-result.txt || true

- name: Prepare artifact
run: |
Expand Down
Loading