benchmark.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # we're running the benchmarks in a job separate from CI as it may take some time to finish
  2. on:
  3. push:
  4. branches:
  5. - benchmark-runner
  6. name: "Benchmark"
  7. env:
  8. PHP_EXTENSIONS: fileinfo, gd, imagick, json, mbstring
  9. PHP_INI_VALUES: memory_limit=-1, error_reporting=-1, display_errors=On
  10. jobs:
  11. benchmark:
  12. name: "Run Benchmark suite"
  13. runs-on: ubuntu-latest
  14. steps:
  15. - name: "Checkout sources"
  16. uses: actions/checkout@v4
  17. with:
  18. ref: main
  19. - name: "Install PHP"
  20. uses: shivammathur/setup-php@v2
  21. with:
  22. php-version: "8.4"
  23. extensions: opcache, ${{ env.PHP_EXTENSIONS }}
  24. ini-values: ${{ env.PHP_INI_VALUES }}
  25. coverage: none
  26. - name: "Install dependencies with composer"
  27. uses: ramsey/composer-install@v3
  28. - name: "Run PHPBench"
  29. run: php vendor/bin/phpbench run --progress=plain --report=bare --output=csv
  30. - name: "Parse benchmark results"
  31. run: php benchmark/parse-result.php
  32. - name: "Generate HTML report"
  33. run: php benchmark/generate-html.php
  34. - name: "Generate Markdown report"
  35. run: php benchmark/generate-markdown.php
  36. - name: "Publish results to branch benchmark"
  37. uses: JamesIves/github-pages-deploy-action@v4
  38. with:
  39. branch: benchmark
  40. folder: .build/phpbench
  41. clean: true