Skip to content

Commit 9f26854

Browse files
authored
Adjust github workflow (#1425)
* Revert github workflow but keep older ubuntu version * Remove stability matrix * Rename workflow step
1 parent 6b9ce4f commit 9f26854

File tree

1 file changed

+26
-11
lines changed

1 file changed

+26
-11
lines changed

.github/workflows/run-tests.yml

+26-11
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,21 @@ jobs:
1010
matrix:
1111
php: [ '8.1', '8.2', '8.3', '8.4' ]
1212
imagemagick: [ '6.9.12-55', '7.1.1-32' ]
13-
stability: [ prefer-stable ]
13+
imagick: [ '3.7.0' ]
1414

15-
name: PHP ${{ matrix.php }} - ${{ matrix.stability }} - ImageMagick ${{ matrix.imagemagick }}
15+
name: PHP ${{ matrix.php }} - ImageMagick ${{ matrix.imagemagick }}
1616

1717
steps:
1818
- name: Checkout project
1919
uses: actions/checkout@v4
2020

21+
- name: Setup PHP
22+
uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: ${{ matrix.php }}
25+
extensions: mbstring, gd
26+
coverage: none
27+
2128
- name: Prepare environment for Imagemagick
2229
run: |
2330
sudo apt-get -y remove imagemagick imagemagick-6-common libmagic-dev
@@ -52,12 +59,20 @@ jobs:
5259
sudo make install
5360
)
5461
55-
- name: Setup PHP
56-
uses: shivammathur/setup-php@v2
57-
with:
58-
php-version: ${{ matrix.php }}
59-
extensions: mbstring, gd, imagick
60-
coverage: none
62+
- name: Install Imagick PHP extension
63+
run: |
64+
curl -o /tmp/imagick.tgz -sL http://pecl.php.net/get/imagick-${{ matrix.imagick }}.tgz
65+
(
66+
cd /tmp || exit 1
67+
tar -xzf imagick.tgz
68+
cd imagick-${{ matrix.imagick }}
69+
phpize
70+
sudo ./configure --with-imagick=/home/runner/im/imagemagick-${{ matrix.imagemagick }}
71+
sudo make -j$(nproc)
72+
sudo make install
73+
)
74+
sudo bash -c 'echo "extension=imagick.so" >> /etc/php/${{ matrix.php }}/cli/php.ini'
75+
php --ri imagick;
6176
6277
- name: Get composer cache directory
6378
id: composer-cache
@@ -67,11 +82,11 @@ jobs:
6782
uses: actions/cache@v4
6883
with:
6984
path: ${{ steps.composer-cache.outputs.dir }}
70-
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ matrix.stability }}-${{ hashFiles('**/composer.json') }}
71-
restore-keys: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ matrix.stability }}-
85+
key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.json') }}
86+
restore-keys: ${{ runner.os }}-php-${{ matrix.php }}-
7287

7388
- name: Install dependencies
74-
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction
89+
run: composer update --prefer-stable --prefer-dist --no-interaction
7590

7691
- name: GD Version
7792
run: php -r 'var_dump(gd_info());'

0 commit comments

Comments
 (0)