From 73646ac898a791d942e191538901a9ea03361c7b Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Sun, 19 Jan 2025 08:48:51 +0100 Subject: [PATCH 1/3] Revert github workflow but keep older ubunto version --- .github/workflows/run-tests.yml | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 0b149873..5fb218c7 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -10,6 +10,7 @@ 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 }} @@ -18,6 +19,13 @@ jobs: - name: Checkout project uses: actions/checkout@v4 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: mbstring, gd + coverage: none + - name: Prepare environment for Imagemagick run: | sudo apt-get -y remove imagemagick imagemagick-6-common libmagic-dev @@ -52,12 +60,20 @@ jobs: sudo make install ) - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: mbstring, gd, imagick - coverage: none + - 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 }} + 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 From 427b53a4b3e58267d84702db51c0d766781579e0 Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Sun, 19 Jan 2025 08:52:36 +0100 Subject: [PATCH 2/3] Remove stability matrix --- .github/workflows/run-tests.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 5fb218c7..dd70f538 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -11,9 +11,8 @@ jobs: 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 }} + name: PHP ${{ matrix.php }} - ImageMagick ${{ matrix.imagemagick }} steps: - name: Checkout project @@ -83,11 +82,11 @@ jobs: uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ matrix.stability }}-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ matrix.stability }}- + key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ runner.os }}-php-${{ matrix.php }}- - name: Install dependencies - run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction + run: composer update --prefer-stable --prefer-dist --no-interaction - name: GD Version run: php -r 'var_dump(gd_info());' From 4a425a18fd388739d0a6378fc37830f6869f6913 Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Sun, 19 Jan 2025 08:54:04 +0100 Subject: [PATCH 3/3] Rename workflow step --- .github/workflows/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index dd70f538..6f43b3ba 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -59,7 +59,7 @@ jobs: sudo make install ) - - name: Install PHP ImageMagick extension + - name: Install Imagick PHP extension run: | curl -o /tmp/imagick.tgz -sL http://pecl.php.net/get/imagick-${{ matrix.imagick }}.tgz (