Skip to content

Developing in CLion #55

Developing in CLion

Developing in CLion #55

Workflow file for this run

name: Build and Test PHP Extension
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.1', '8.2', '8.3']
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, intl
- name: Install build tools
run: sudo apt-get update && sudo apt-get install -y autoconf automake libtool bison re2c gdb
- name: Enable core dumps
run: |
ulimit -c unlimited
echo '/tmp/core.%e.%p' | sudo tee /proc/sys/kernel/core_pattern
- name: Prepare build
run: |
phpize
./configure
make
- name: Run tests
run: make test
- name: Run demo
run: |
php -dextension=./modules/rayaop.so -i | grep rayaop
timeout 60s php -dextension=./modules/rayaop.so -dmemory_limit=128M -dreport_memleaks=1 -dzend.assertions=1 -dassert.exception=1 smoke.php
- name: Check for core dump
if: failure()
run: |
if ls /tmp/core.* 1> /dev/null 2>&1; then
for corefile in /tmp/core.*; do
echo "Core dump found: $corefile"
gdb -batch -ex "bt full" -ex "quit" -c $corefile $(which php)
done
else
echo "No core dump found"
fi