Skip to content

perf: reduce allocations in hot conversion paths #224

perf: reduce allocations in hot conversion paths

perf: reduce allocations in hot conversion paths #224

Workflow file for this run

name: CI PHP
on:
push:
branches: [main]
paths:
- packages/php/**
- packages/php-ext/**
- scripts/publish/php/**
- crates/html-to-markdown-php/**
- crates/html-to-markdown/**
- composer.json
- composer.lock
- .task/**
- Taskfile.yaml
- .github/workflows/ci-php.yaml
pull_request:
branches: [main]
paths:
- packages/php/**
- packages/php-ext/**
- scripts/publish/php/**
- crates/html-to-markdown-php/**
- crates/html-to-markdown/**
- composer.json
- composer.lock
- .task/**
- Taskfile.yaml
- .github/workflows/ci-php.yaml
permissions:
contents: read
concurrency:
group: ci-php-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
php-bindings:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.2"
tools: composer:2.9.1
coverage: none
- name: Setup Rust
uses: ./.github/actions/setup-rust
- name: Capture php-config path
run: scripts/ci/php/set-php-config.sh
shell: bash
- name: Install root Composer dependencies
uses: ramsey/composer-install@v3
with:
dependency-versions: locked
env:
COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}'
- name: Install PHP package Composer dependencies
uses: ramsey/composer-install@v3
with:
dependency-versions: locked
working-directory: packages/php
env:
COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GITHUB_TOKEN }}"}}'
- name: Build PHP extension
id: build-php-extension
uses: ./.github/actions/build-php-linux
with:
php-config: ${{ env.PHP_CONFIG }}
- name: Run PHP static analysis
run: scripts/ci/php/run-phpstan.sh
shell: bash
- name: Run PHP tests
run: scripts/ci/php/run-php-tests.sh
shell: bash
env:
EXTENSION_PATH: ${{ steps.build-php-extension.outputs.extension-path }}