Skip to content

Cache toUnicodeCMap characters (avg 4% speed improvement) #1681

Cache toUnicodeCMap characters (avg 4% speed improvement)

Cache toUnicodeCMap characters (avg 4% speed improvement) #1681

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
types: [ opened, synchronize ]
branches: [ main ]
workflow_dispatch:
schedule:
- cron: '55 17 * * *'
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-main
cancel-in-progress: true
jobs:
quality:
permissions:
contents: read
uses: prinsfrank/CI-PHP/.github/workflows/quality.yml@7f532694f9ad3b0da45333d0c140b340488ac9b1 # v1.2.0
with:
PHP_VERSION: '8.3'
PHP_VERSIONS: '["8.2", "8.3", "8.4", "8.5"]'
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
feature:
name: PHP Tests - Feature
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
php-version: ["8.2", "8.3", "8.4", "8.5"]
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: ${{ matrix.php-version }}
coverage: none
- name: Install dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
- name: Run Feature tests
run: composer run feature
samples:
name: PHP Tests - Samples
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
php-version: ["8.2", "8.3", "8.4", "8.5"]
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: ${{ matrix.php-version }}
coverage: none
- name: Install dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
- name: Run Samples tests
run: vendor/bin/phpunit tests/Samples/
pr-size:
name: PR size
runs-on: ubuntu-latest
permissions:
contents: read
env:
BASE: ${{ github.event.pull_request.base.sha }}
HEAD: ${{ github.event.pull_request.head.sha }}
MAX_LINE_CHANGE_COUNT_SRC: 200
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
fetch-depth: 0
- name: Check nr of lines changed
run: |
read ADDED REMOVED < <(git diff "$BASE" "$HEAD" --numstat -- src/ | awk '{added+=$1; removed+=$2} END {print added+0, removed+0}')
echo "Lines changed in src/: +$ADDED -$REMOVED (max +/- $MAX_LINE_CHANGE_COUNT_SRC)"
if [ "$ADDED" -gt $MAX_LINE_CHANGE_COUNT_SRC ] || [ "$REMOVED" -gt $MAX_LINE_CHANGE_COUNT_SRC ]; then
echo
echo "This PR is too large to review"
echo "Please split it into smaller PRs"
echo "=> See CONTRIBUTING.md for more info"
echo
exit 1
fi