diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml new file mode 100644 index 00000000..d946c2e7 --- /dev/null +++ b/.github/workflows/bench.yml @@ -0,0 +1,38 @@ +name: Benchmark + +on: + push: + pull_request: + +jobs: + tests: + name: Build + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: + - '8.1' + - '8.2' + - '8.3' + - '8.4' + + steps: + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: bcmath, gmp, intl, dom, mbstring + ini-values: zend.assertions=1 + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Remove Psalm when on PHP 8.4 + if: ${{ matrix.php == '8.4' }} + run: composer remove --dev psalm/plugin-phpunit vimeo/psalm + + - uses: "ramsey/composer-install@v3" + + - name: Run phpbench + run: vendor/bin/phpbench run