mirror of
https://github.com/Intervention/image.git
synced 2025-09-01 01:51:43 +02:00
Adjust github workflow (#1425)
* Revert github workflow but keep older ubuntu version * Remove stability matrix * Rename workflow step
This commit is contained in:
37
.github/workflows/run-tests.yml
vendored
37
.github/workflows/run-tests.yml
vendored
@@ -10,14 +10,21 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
php: [ '8.1', '8.2', '8.3', '8.4' ]
|
php: [ '8.1', '8.2', '8.3', '8.4' ]
|
||||||
imagemagick: [ '6.9.12-55', '7.1.1-32' ]
|
imagemagick: [ '6.9.12-55', '7.1.1-32' ]
|
||||||
stability: [ prefer-stable ]
|
imagick: [ '3.7.0' ]
|
||||||
|
|
||||||
name: PHP ${{ matrix.php }} - ${{ matrix.stability }} - ImageMagick ${{ matrix.imagemagick }}
|
name: PHP ${{ matrix.php }} - ImageMagick ${{ matrix.imagemagick }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout project
|
- name: Checkout project
|
||||||
uses: actions/checkout@v4
|
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
|
- name: Prepare environment for Imagemagick
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -y remove imagemagick imagemagick-6-common libmagic-dev
|
sudo apt-get -y remove imagemagick imagemagick-6-common libmagic-dev
|
||||||
@@ -52,12 +59,20 @@ jobs:
|
|||||||
sudo make install
|
sudo make install
|
||||||
)
|
)
|
||||||
|
|
||||||
- name: Setup PHP
|
- name: Install Imagick PHP extension
|
||||||
uses: shivammathur/setup-php@v2
|
run: |
|
||||||
with:
|
curl -o /tmp/imagick.tgz -sL http://pecl.php.net/get/imagick-${{ matrix.imagick }}.tgz
|
||||||
php-version: ${{ matrix.php }}
|
(
|
||||||
extensions: mbstring, gd, imagick
|
cd /tmp || exit 1
|
||||||
coverage: none
|
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
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
@@ -67,11 +82,11 @@ jobs:
|
|||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.composer-cache.outputs.dir }}
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ matrix.stability }}-${{ hashFiles('**/composer.json') }}
|
key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.json') }}
|
||||||
restore-keys: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ matrix.stability }}-
|
restore-keys: ${{ runner.os }}-php-${{ matrix.php }}-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction
|
run: composer update --prefer-stable --prefer-dist --no-interaction
|
||||||
|
|
||||||
- name: GD Version
|
- name: GD Version
|
||||||
run: php -r 'var_dump(gd_info());'
|
run: php -r 'var_dump(gd_info());'
|
||||||
|
Reference in New Issue
Block a user