mirror of
https://github.com/actions/runner-images.git
synced 2025-12-11 03:27:05 +00:00
Add php-dev and php-pear (#1944)
This commit is contained in:
@@ -66,7 +66,6 @@ for version in $php_versions; do
|
||||
|
||||
if [[ $version == "5.6" || $version == "7.0" || $version == "7.1" ]]; then
|
||||
apt-fast install -y --no-install-recommends php$version-mcrypt php$version-recode
|
||||
apt-get remove --purge -yq php$version-dev
|
||||
fi
|
||||
|
||||
if [[ $version == "7.2" || $version == "7.3" ]]; then
|
||||
@@ -81,13 +80,12 @@ apt-fast install -y --no-install-recommends \
|
||||
php-memcache \
|
||||
php-memcached \
|
||||
php-mongodb \
|
||||
php-pear \
|
||||
php-redis \
|
||||
php-xdebug \
|
||||
php-yaml \
|
||||
php-zmq
|
||||
|
||||
apt-get remove --purge -yq php7.2-dev
|
||||
|
||||
apt-fast install -y --no-install-recommends snmp
|
||||
|
||||
# Install composer
|
||||
@@ -113,17 +111,23 @@ mv phpunit /usr/local/bin/phpunit
|
||||
|
||||
# Run tests to determine that the software installed as expected
|
||||
echo "Testing to make sure that script performed as expected, and basic scenarios work"
|
||||
for cmd in php $php_versions composer phpunit; do
|
||||
if [[ $cmd =~ ^[0-9] ]]; then
|
||||
cmd="php$cmd"
|
||||
fi
|
||||
|
||||
for cmd in composer pear pecl phpunit; do
|
||||
if ! command -v $cmd; then
|
||||
echo "$cmd was not installed"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
for version in $php_versions; do
|
||||
if ! command -v php$version; then
|
||||
echo "php$version was not installed"
|
||||
exit 1
|
||||
elif ! command -v php-config$version || ! command -v phpize$version; then
|
||||
echo "php$version-dev was not installed"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# ubuntu 20.04 libzip-dev is libzip5 based and is not compatible libzip-dev of ppa:ondrej/php
|
||||
# see https://github.com/actions/virtual-environments/issues/1084
|
||||
if isUbuntu20 ; then
|
||||
|
||||
Reference in New Issue
Block a user