Skip to content

Commit

Permalink
e107inc#5114: CI: Simplify installing PHP extensions and tools
Browse files Browse the repository at this point in the history
  • Loading branch information
Deltik committed Nov 29, 2023
1 parent 868895d commit c1b1222
Showing 1 changed file with 6 additions and 41 deletions.
47 changes: 6 additions & 41 deletions .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,50 +69,15 @@ jobs:
USE_GIT_BPO="$(test $VERSION_ID -lt 10 && echo "-t ${DEBIAN_RELEASE}-backports" || echo)"
apt-get $USE_GIT_BPO install -y git zip libzip-dev libbz2-dev libpng-dev libjpeg-dev libwebp-dev libvpx-dev libicu-dev
- name: Configure PHP gd extension with default bundle
run: |
if [ $(php -r 'printf(version_compare(PHP_VERSION, "7.4.0", ">=") ? 1 : 0);') = '1' ]
then
docker-php-ext-configure gd --with-jpeg --with-webp
elif [ $(php -r 'printf(version_compare(PHP_VERSION, "7.0.0", ">=") ? 1 : 0);') = '1' ]
then
docker-php-ext-configure gd --with-jpeg-dir=/usr --with-webp-dir=/usr
else
docker-php-ext-configure gd --with-jpeg-dir=/usr --with-vpx-dir=/usr
fi
- name: Install necessary PHP extensions
run: |
docker-php-ext-install -j "$(nproc)" \
zip bz2 gd pdo_mysql mysqli intl
- name: PECL install xdebug
run: |
if [ $(php -r 'printf(version_compare(PHP_VERSION, "8.2.99", ">=") ? 1 : 0);') = '1' ]
then
pecl install https://xdebug.org/files/xdebug-3.3.0alpha2.tgz
elif [ $(php -r 'printf(version_compare(PHP_VERSION, "8.0.0", ">=") ? 1 : 0);') = '1' ]
then
pecl install xdebug
elif [ $(php -r 'printf(version_compare(PHP_VERSION, "7.2.0", ">=") ? 1 : 0);') = '1' ]
then
pecl install xdebug-3.1.6
elif [ $(php -r 'printf(version_compare(PHP_VERSION, "7.1.0", ">=") ? 1 : 0);') = '1' ]
then
pecl install xdebug-2.9.8
elif [ $(php -r 'printf(version_compare(PHP_VERSION, "7.0.0", ">=") ? 1 : 0);') = '1' ]
then
pecl install xdebug-2.7.2
else
pecl install xdebug-2.5.5
fi
docker-php-ext-enable xdebug
- name: Install PHP extensions and tools
uses: shivammathur/setup-php@v2
with:
extensions: zip, bz2, gd, pdo_mysql, mysqli, intl
coverage: xdebug
tools: composer

- uses: actions/checkout@v3

- name: Install Composer
run: curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer

- name: Install test dependencies
run: composer update --prefer-dist --no-progress
working-directory: ./e107_tests/
Expand Down

0 comments on commit c1b1222

Please sign in to comment.