4
4
# Version : {package_version}
5
5
# Source repo : {package_url}
6
6
# Tested on : {distro_name} {distro_version}
7
+ # Language : PHP
7
8
# Script License: Apache License, Version 2 or later
8
9
# Maintainer : BulkPackageSearch Automation {maintainer}
9
10
#
@@ -19,44 +20,48 @@ PACKAGE_NAME=${PACKAGE_NAME}
19
20
PACKAGE_VERSION=${PACKAGE_VERSION}
20
21
PACKAGE_URL=${PACKAGE_URL}
21
22
22
- yum -y update && yum install -y nodejs nodejs-devel nodejs-packaging npm python38 python38-devel ncurses git jq curl nodejs make gcc-c++
23
+ yum -y update && yum install -y nodejs nodejs-devel nodejs-packaging npm python38 python38-devel ncurses git jq curl nodejs make gcc-c++ yum-utils
23
24
24
25
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
26
+ yum-config-manager --add-repo http://mirror.centos.org/centos/8/AppStream/ppc64le/os/ && yum-config-manager --add-repo http://mirror.centos.org/centos/8/PowerTools/ppc64le/os/ && yum-config-manager --add-repo http://mirror.centos.org/centos/8/BaseOS/ppc64le/os/
25
27
26
- yum install -y git bzip2 ca-certificates curl tar xz openssl wget gzip gcc-c++ make pkgconf file curl-devel libxml2-devel openssl-devel sqlite-devel ncurses-devel libjpeg-devel libicu-devel libtidy-devel libxslt-devel libzip-devel bzip2-devel libpng-devel diffutils autoconf patch
28
+ wget https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official && mv RPM-GPG-KEY-CentOS-Official /etc/pki/rpm-gpg/. && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Official
27
29
28
- yum install -y http://rpmfind.net/linux/centos/8.4.2105/BaseOS/ppc64le/os/Packages/ readline-devel-7.0-10.el8.ppc64le.rpm
30
+ yum install -y git bzip2 ca-certificates curl tar xz openssl wget gzip gcc-c++ make pkgconf file curl-devel libxml2-devel openssl-devel sqlite-devel ncurses-devel libjpeg-devel libicu-devel libtidy-devel libxslt-devel libzip-devel bzip2-devel libpng-devel diffutils autoconf patch bison re2c readline-devel oniguruma-devel glibc fontconfig php-mbstring
29
31
30
- yum install -y https://rpmfind.net/linux/centos/8-stream/PowerTools/ppc64le/os/Packages/oniguruma-devel-6.8.2-2.el8.ppc64le.rpm
32
+ # Install phantomjs, as its needed for some dependencies
33
+ wget https://github.com/ibmsoe/phantomjs/releases/download/2.1.1/phantomjs-2.1.1-linux-ppc64.tar.bz2
34
+ tar -xvf phantomjs-2.1.1-linux-ppc64.tar.bz2
35
+ ln -sf phantomjs-2.1.1-linux-ppc64/bin/phantomjs /usr/local/bin/phantomjs
36
+ export PATH=$PATH :/usr/local/bin/phantomjs
31
37
32
- curl -L https://raw.githubusercontent.com/phpexport/phpexport -installer/master/bin/phpexport -installer | bash
38
+ curl -L https://raw.githubusercontent.com/phpenv/phpenv -installer/master/bin/phpenv -installer | bash
33
39
export PHP_VERSION_73=" 7.3.28"
34
40
export PHP_VERSION_74=" 7.4.20"
35
41
export PHP_VERSION_80=" 8.0.7"
36
42
37
- export PATH=" /root/.phpexport /bin:${PATH} "
43
+ export PATH=" /root/.phpenv /bin:${PATH} "
38
44
39
45
# to list versions available for install
40
- phpexport install -l
46
+ phpenv install -l
47
+ phpenv install ${PHP_VERSION_73}
48
+ phpenv install ${PHP_VERSION_74}
49
+ phpenv install ${PHP_VERSION_80}
41
50
42
- phpexport install ${PHP_VERSION_73}
43
- phpexport install ${PHP_VERSION_74}
44
- phpexport install ${PHP_VERSION_80}
45
-
46
- eval " $( phpexport init -) "
51
+ eval " $( phpenv init -) "
47
52
48
53
# to switch to an already installed version
49
- phpexport global ${PHP_VERSION_73}
54
+ phpenv global ${PHP_VERSION_73}
50
55
51
- ln -s /root/.phpexport /shims/php /usr/bin/php
52
- # RUN ls -s /root/.phpexport /bin/phpexport /usr/bin/phpexport
53
- export PATH=" /root/.phpexport /bin:${PATH} "
56
+ ln -s /root/.phpenv /shims/php /usr/bin/php
57
+ # RUN ls -s /root/.phpenv /bin/phpenv /usr/bin/phpenv
58
+ PATH=" /root/.phpenv /bin:${PATH} "
54
59
55
60
php -r " copy('https://getcomposer.org/installer', 'composer-setup.php');" && php composer-setup.php --install-dir=/bin --filename=composer
56
61
57
62
composer require --dev phpunit/phpunit --with-all-dependencies ^8
58
63
59
- mkdir -p output
64
+ mkdir -p /home/tester/ output/
60
65
61
66
set -x
62
67
install_test_success_update ()
@@ -128,7 +133,7 @@ cd /home/tester/$PACKAGE_NAME
128
133
git checkout $PACKAGE_VERSION
129
134
130
135
INSTALL_SUCCESS=" false"
131
- for phpver in 7.3.28 8.0.7
136
+ for phpver in 7.3.28 7.4.20 8.0.7
132
137
do
133
138
phpenv global $phpver
134
139
echo " Running composer install with $phpver "
@@ -196,19 +201,22 @@ if [ $(find . -name "*Test*" | grep -v "IntlTestHelper" | wc -l) -gt 0 ];then
196
201
197
202
# packages like symfony/dependency-injection needs some class from phpunit-bridge
198
203
echo " Some package needs symfony/phpunit-bridge so trying unit tests with it"
199
- for phpunitver in 9 8 7 6 5
200
- do
201
- composer require --with-all-dependencies --dev symfony/phpunit-bridge phpunit/phpunit ^${phpunitver}
204
+
205
+ if [[ $PACKAGE_NAME == " symfony" * ]]; then
206
+ for phpunitver in 9 8 7 6 5
207
+ do
208
+ composer require --with-all-dependencies --dev symfony/phpunit-bridge phpunit/phpunit ^${phpunitver}
202
209
203
- set_phpunit_params
204
-
205
- if ! ( ./vendor/phpunit/phpunit/phpunit . ${phpunit_param} ); then
206
- TEST_SUCCESS=" false"
207
- else
208
- install_test_success_update
209
- fi
210
- composer remove --with-all-dependencies --dev symfony/phpunit-bridge phpunit/phpunit ^${phpunitver}
211
- done
210
+ set_phpunit_params
211
+
212
+ if ! ( ./vendor/phpunit/phpunit/phpunit . ${phpunit_param} ); then
213
+ TEST_SUCCESS=" false"
214
+ else
215
+ install_test_success_update
216
+ fi
217
+ composer remove -f --with-all-dependencies --dev symfony/phpunit-bridge phpunit/phpunit ^${phpunitver}
218
+ done
219
+ fi
212
220
213
221
if [ $TEST_SUCCESS == " false" ]
214
222
then
0 commit comments