peter279k / php-travis-webp

This is the Travis CI build test for PHP GD with webp
1 stars 0 forks source link

Enabling WEBP #1

Open jarednova opened 4 years ago

jarednova commented 4 years ago

It appears that this currently demonstrates that WEBP is not available in Travis' PHP config. The Travis build shows:

$ php -v
PHP 7.4.0 (cli) (built: Dec  9 2019 20:06:30) ( ZTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.0, Copyright (c), by Zend Technologies
    with Xdebug v2.8.1, Copyright (c) 2002-2019, by Derick Rethans

$ php -m | grep gd
gd

$ php -r 'var_dump(function_exists("imagewebp"));'
Command line code:1:
bool(false)

... the above example is from the PHP 7.4 build, but it's the same w PHP 7.1, 7.2 and 7.3

@peter279k (or anyone else) did you ever manage to successfully configure Travis to load with WebP support? I've been going nuts trying to get it working

jarednova commented 4 years ago

Just realized that we already had this convo 9 months ago! https://travis-ci.community/t/how-to-enable-webp-image-format-support-in-php-7/3209/3

... ugh.

jarednova commented 4 years ago

For the next time I Google this:

https://github.com/peter279k/php-travis-gd/blob/master/.travis.yml

tldr; @peter279k demonstrates in this version that you can install your own PHP from another source with webp support. In the tests he then calls sudo php to use this version. Unfortunately, it adds quite a bit of build time to each run and will likely require other adjustments to phpunit to actually use

peter279k commented 4 years ago

This issue is for the Travis CI build service, and the only way is: using default PHP version in Ubuntu rather than using the phpenv to switch PHP versions by default.

Recently I have switched to GitHub Action and this issue will not be existed/happened :).