Skip to content

Port to PHP 8

Port to PHP 8 #2

Workflow file for this run

name: Main
on:
workflow_dispatch:
push:
branches:
- main
- master
- release/**
pull_request:
branches:
- main
- master
- release/**
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
steps:
- name: Get source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
ini-values: post_max_size=256M, max_execution_time=180
- name: Check package
run: |
sudo pear list
sudo pear channel-update pear.php.net
sudo pear upgrade --force pear/pear
sudo pear list
sudo pear install --force package.xml
sudo pear list
sudo pear package
sudo pear package-validate
sudo pear install --force *.tgz
sudo pear list
# For some reason ttf-mscorefonts-installer doesn't work
# so we only install Verdana
- name: Download and install Verdana font
run: |
sudo apt install cabextract
curl -L -o verdan32.exe 'http://download.sourceforge.net/corefonts/verdan32.exe'
cabextract -d Image/Canvas/Fonts/ verdan32.exe
mv Image/Canvas/Fonts/Verdana.TTF Image/Canvas/Fonts/verdana.ttf
- name: Install pre-requisites and run test scripts
run: |
composer install
php tests/gradients.php > gradients.png
php tests/imagemap.php > imagemap.html
php tests/png.php
php tests/jpg.php
# php tests/ps.php
# php tests/pdf.php
php tests/svg.php
php tests/text.php > text.png
php tests/lineends.php > lineends.png