Skip to content

Commit

Permalink
Change installation method if imagick in github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
olivervogel committed Jan 18, 2025
1 parent aa691d5 commit ccd8fae
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
matrix:
php: [ '8.1', '8.2', '8.3', '8.4' ]
imagemagick: [ '6.9.12-55', '7.1.1-32' ]
imagick: [ '3.7.0' ]
stability: [ prefer-stable ]

name: PHP ${{ matrix.php }} - ${{ matrix.stability }} - ImageMagick ${{ matrix.imagemagick }}
Expand All @@ -23,7 +22,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, gd
extensions: mbstring, gd, imagick
coverage: none

- name: Prepare environment for Imagemagick
Expand All @@ -45,23 +44,6 @@ jobs:
sudo make install
)
- name: Install PHP ImageMagick extension
run: |
curl -o /tmp/imagick.tgz -sL http://pecl.php.net/get/imagick-${{ matrix.imagick }}.tgz
(
cd /tmp || exit 1
tar -xzf imagick.tgz
cd imagick-${{ matrix.imagick }}
curl -Lo imagick.patch "https://patch-diff.githubusercontent.com/raw/Imagick/imagick/pull/690.patch"
patch -p1 < imagick.patch && rm -f imagick.patch
phpize
sudo ./configure --with-imagick=/home/runner/im/imagemagick-${{ matrix.imagemagick }}
sudo make -j$(nproc)
sudo make install
)
sudo bash -c 'echo "extension=imagick.so" >> /etc/php/${{ matrix.php }}/cli/php.ini'
php --ri imagick;
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit ccd8fae

Please sign in to comment.