phpbench.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. name: "Performance benchmark"
  2. on:
  3. pull_request:
  4. branches:
  5. - "*.x"
  6. push:
  7. branches:
  8. - "*.x"
  9. env:
  10. fail-fast: true
  11. COMPOSER_ROOT_VERSION: "1.4"
  12. jobs:
  13. phpbench:
  14. name: "PHPBench"
  15. runs-on: "ubuntu-20.04"
  16. strategy:
  17. matrix:
  18. php-version:
  19. - "7.4"
  20. steps:
  21. - name: "Checkout"
  22. uses: "actions/checkout@v2"
  23. with:
  24. fetch-depth: 2
  25. - name: "Install PHP"
  26. uses: "shivammathur/setup-php@v2"
  27. with:
  28. php-version: "${{ matrix.php-version }}"
  29. coverage: "pcov"
  30. ini-values: "zend.assertions=1"
  31. - name: "Cache dependencies installed with composer"
  32. uses: "actions/cache@v2"
  33. with:
  34. path: "~/.composer/cache"
  35. key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
  36. restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
  37. - name: "Install dependencies with composer"
  38. run: "composer update --no-interaction --no-progress"
  39. - name: "Run PHPBench"
  40. run: "php ./vendor/bin/phpbench run --iterations=3 --warmup=1 --report=aggregate"