|
| 1 | +name: Main |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - main |
| 8 | + - master |
| 9 | + - release/** |
| 10 | + pull_request: |
| 11 | + branches: |
| 12 | + - main |
| 13 | + - master |
| 14 | + - release/** |
| 15 | + |
| 16 | +concurrency: |
| 17 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 18 | + cancel-in-progress: true |
| 19 | + |
| 20 | +jobs: |
| 21 | + run: |
| 22 | + runs-on: ${{ matrix.operating-system }} |
| 23 | + strategy: |
| 24 | + matrix: |
| 25 | + operating-system: ['ubuntu-latest'] |
| 26 | + php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4'] |
| 27 | + steps: |
| 28 | + - name: Get source code |
| 29 | + uses: actions/checkout@v4 |
| 30 | + with: |
| 31 | + fetch-depth: 0 |
| 32 | + - name: Setup PHP |
| 33 | + uses: shivammathur/setup-php@v2 |
| 34 | + with: |
| 35 | + php-version: ${{ matrix.php-versions }} |
| 36 | + coverage: none |
| 37 | + ini-values: post_max_size=256M, max_execution_time=180 |
| 38 | + - name: Check package |
| 39 | + run: | |
| 40 | + sudo pear list |
| 41 | + sudo pear channel-update pear.php.net |
| 42 | + sudo pear upgrade --force pear/pear |
| 43 | + sudo pear list |
| 44 | + sudo pear install --force package.xml |
| 45 | + sudo pear list |
| 46 | + sudo pear package |
| 47 | + sudo pear package-validate |
| 48 | + sudo pear install --force *.tgz |
| 49 | + sudo pear list |
| 50 | + # For some reason ttf-mscorefonts-installer doesn't work |
| 51 | + # so we only install Verdana |
| 52 | + - name: Download and install Verdana font |
| 53 | + run: | |
| 54 | + sudo apt install cabextract |
| 55 | + curl -L -o verdan32.exe 'http://download.sourceforge.net/corefonts/verdan32.exe' |
| 56 | + cabextract -d Image/Canvas/Fonts/ verdan32.exe |
| 57 | + mv Image/Canvas/Fonts/Verdana.TTF Image/Canvas/Fonts/verdana.ttf |
| 58 | + - name: Install pre-requisites and run test scripts |
| 59 | + run: | |
| 60 | + composer install |
| 61 | + php tests/gradients.php > gradients.png |
| 62 | + php tests/imagemap.php > imagemap.html |
| 63 | + php tests/png.php |
| 64 | + php tests/jpg.php |
| 65 | + # php tests/ps.php |
| 66 | + # php tests/pdf.php |
| 67 | + php tests/svg.php |
| 68 | + php tests/text.php > text.png |
| 69 | + php tests/lineends.php > lineends.png |
0 commit comments