Skip to content

Commit c0f1247

Browse files
committed
test
1 parent 1c71de6 commit c0f1247

File tree

2 files changed

+62
-65
lines changed

2 files changed

+62
-65
lines changed

.travis.yml

Lines changed: 53 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -361,85 +361,82 @@ jobs:
361361
fi
362362
env:
363363
global:
364-
- VERSION=master ALIAS=nightly
365-
- ICU_RELEASE=74.2
366-
- ICU_INSTALL_DIR=$HOME/.phpenv/versions/$VERSION
367-
- PATH="$HOME/.phpenv/bin:$HOME/.php-build/bin:$PATH"
364+
- VERSION=master ALIAS=nightly
365+
- ICU_RELEASE=59.1
366+
- ICU_INSTALL_DIR=$HOME/.phpenv/versions/$VERSION
367+
- PATH="$HOME/.phpenv/bin:$HOME/.php-build/bin:$PATH"
368368

369369
before_install:
370370
- php -f test.php || true
371371

372372
install:
373-
- if [[ ! -d $HOME/.php-build ]]; then git clone https://github.com/php-build/php-build.git $HOME/.php-build; fi
374-
- ~/.php-build/install-dependencies.sh
375-
- rm -rf $HOME/.phpenv
376-
- git clone 'https://github.com/phpenv/phpenv.git' $HOME/.phpenv
377-
- eval "$($HOME/.phpenv/bin/phpenv init -)"
378-
- pushd $HOME/.php-build
379-
- git reset --hard HEAD
380-
- git checkout master
381-
- git pull
382-
- popd
383-
- if [[ $RELEASE != precise ]]; then unset ICU_RELEASE; fi # disable ICU installation for Trusty; see https://github.com/travis-ci/travis-ci/issues/3616#issuecomment-286302387
384-
- | # older distros don't ship a libjpeg.pc, add our own to pkg-config path
385-
if ! pkg-config --exists libjpeg libsasl2; then
386-
export PKG_CONFIG_PATH=$PWD:$PKG_CONFIG_PATH
387-
fi
388-
- ./bin/install-icu
389-
- export PKG_CONFIG_PATH=$ICU_INSTALL_DIR/lib/pkgconfig:$PKG_CONFIG_PATH
390-
- touch custom_configure_options
391-
- ./bin/install-libzip
392-
- ./bin/install-libsodium
393-
- ./bin/install-password-argon2
394-
- . ./bin/install-onig # sourced to export ONIG_LIBS
395-
- MINOR_VERSION=`echo $VERSION | sed -E 's/^([0-9]+\.[0-9]+).*$/\1/'` # Rewrites 7.2, 7.2snapshot, 7.2.13 => '7.2'. Leaves 'master' as-is
396-
- |
397-
if [[ -f default_configure_options.$RELEASE-$MINOR_VERSION ]]; then
398-
cp default_configure_options.$RELEASE-$MINOR_VERSION $HOME/.php-build/share/php-build/default_configure_options
373+
- if [[ ! -d $HOME/.php-build ]]; then git clone https://github.com/php-build/php-build.git $HOME/.php-build; fi
374+
- rm -rf $HOME/.phpenv
375+
- git clone 'https://github.com/phpenv/phpenv.git' $HOME/.phpenv
376+
- eval "$($HOME/.phpenv/bin/phpenv init -)"
377+
- pushd $HOME/.php-build
378+
- git reset --hard HEAD
379+
- git checkout master
380+
- git pull
381+
- popd
382+
- if [[ $RELEASE != precise ]]; then unset ICU_RELEASE; fi # disable ICU installation for Trusty; see https://github.com/travis-ci/travis-ci/issues/3616#issuecomment-286302387
383+
- | # older distros don't ship a libjpeg.pc, add our own to pkg-config path
384+
if ! pkg-config --exists libjpeg libsasl2; then
385+
export PKG_CONFIG_PATH=$PWD:$PKG_CONFIG_PATH
386+
fi
387+
- ./bin/install-icu
388+
- export PKG_CONFIG_PATH=$ICU_INSTALL_DIR/lib/pkgconfig:$PKG_CONFIG_PATH
389+
- touch custom_configure_options
390+
- ./bin/install-libzip
391+
- ./bin/install-libsodium
392+
- ./bin/install-password-argon2
393+
- . ./bin/install-onig # sourced to export ONIG_LIBS
394+
- MINOR_VERSION=`echo $VERSION | sed -E 's/^([0-9]+\.[0-9]+).*$/\1/'` # Rewrites 7.2, 7.2snapshot, 7.2.13 => '7.2'. Leaves 'master' as-is
395+
- |
396+
if [[ -f default_configure_options.$RELEASE-$MINOR_VERSION ]]; then
397+
cp default_configure_options.$RELEASE-$MINOR_VERSION $HOME/.php-build/share/php-build/default_configure_options
398+
else
399+
cp default_configure_options.$RELEASE $HOME/.php-build/share/php-build/default_configure_options
400+
fi
401+
- cat custom_configure_options >> $HOME/.php-build/share/php-build/default_configure_options
402+
- |
403+
if [[ $(lsb_release -cs) = "trusty" || $(lsb_release -cs) = "xenial" || $(lsb_release -cs) = "bionic" ]]; then
404+
if [[ $HOSTTYPE == "powerpc64le" ]]; then
405+
sudo ln /usr/include/powerpc64le-linux-gnu/gmp.h /usr/include/gmp.h
406+
sudo ln -s /usr/lib/powerpc64le-linux-gnu/libldap_r-2.4.so.2 /usr/lib/libldap_r.so
407+
sudo ln -s /usr/lib/powerpc64le-linux-gnu/liblber-2.4.so.2 /usr/lib/liblber.so
399408
else
400-
cp default_configure_options.$RELEASE $HOME/.php-build/share/php-build/default_configure_options
401-
fi
402-
- cat custom_configure_options >> $HOME/.php-build/share/php-build/default_configure_options
403-
- |
404-
if [[ $(lsb_release -cs) = "trusty" || $(lsb_release -cs) = "xenial" || $(lsb_release -cs) = "bionic" ]]; then
405-
if [[ $HOSTTYPE == "powerpc64le" ]]; then
406-
sudo ln /usr/include/powerpc64le-linux-gnu/gmp.h /usr/include/gmp.h
407-
sudo ln -s /usr/lib/powerpc64le-linux-gnu/libldap_r-2.4.so.2 /usr/lib/libldap_r.so
408-
sudo ln -s /usr/lib/powerpc64le-linux-gnu/liblber-2.4.so.2 /usr/lib/liblber.so
409-
else
410-
sudo ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h
411-
sudo ln -s /usr/lib/x86_64-linux-gnu/libldap_r.so /usr/lib/libldap_r.so
412-
sudo ln -s /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/libldap.so
413-
sudo ln -s /usr/lib/x86_64-linux-gnu/libldap.a /usr/lib/libldap.a
414-
sudo ln -s /usr/lib/x86_64-linux-gnu/liblber.so /usr/lib/liblber.so
415-
fi
409+
sudo ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h
410+
sudo ln -s /usr/lib/x86_64-linux-gnu/libldap_r.so /usr/lib/libldap_r.so
411+
sudo ln -s /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/libldap.so
412+
sudo ln -s /usr/lib/x86_64-linux-gnu/libldap.a /usr/lib/libldap.a
413+
sudo ln -s /usr/lib/x86_64-linux-gnu/liblber.so /usr/lib/liblber.so
416414
fi
415+
fi
417416
418417
before_script:
419-
- "export COMPOSER_ALLOW_SUPERUSER=1"
420-
- "export LSB_RELEASE=${LSB_RELEASE:-$(lsb_release -rs || echo ${$(sw_vers -productVersion)%*.*})}"
421-
- 'export OS_NAME=${OS_NAME:-$(lsb_release -is | tr "A-Z" "a-z" || echo "osx")}'
422-
- "export ARCH=${ARCH:-$(uname -m)}"
423-
- "export INSTALL_DEST=${INSTALL_DEST:-$HOME/.phpenv/versions}"
424-
- __dots() { while true ; do echo -en . ; sleep 30 ; done } ; __dots &
418+
- 'export LSB_RELEASE=${LSB_RELEASE:-$(lsb_release -rs || echo ${$(sw_vers -productVersion)%*.*})}'
419+
- 'export OS_NAME=${OS_NAME:-$(lsb_release -is | tr "A-Z" "a-z" || echo "osx")}'
420+
- 'export ARCH=${ARCH:-$(uname -m)}'
421+
- 'export INSTALL_DEST=${INSTALL_DEST:-$HOME/.phpenv/versions}'
422+
- __dots() { while true ; do echo -en . ; sleep 30 ; done } ; __dots &
425423

426424
script:
427425
- echo "--enable-option-checking=fatal" >> $HOME/.php-build/share/php-build/default_configure_options
428426
- cat $HOME/.php-build/share/php-build/default_configure_options
429427
- export PKG_CONFIG_PATH="$HOME/.phpenv/versions/$VERSION/lib/pkgconfig:$PKG_CONFIG_PATH"
430-
- sudo ./bin/compile
431-
- sudo mkdir -p /usr/local/bin/composer && sudo wget -P /usr/local/bin/composer http://getcomposer.org/composer.phar && sudo chmod +x /usr/local/bin/composer/composer.phar && alias composer='/usr/local/bin/composer/composer.phar' && composer self-update
428+
- ./bin/compile
432429
- | # disable 3rd-party extension builds on master
433430
if [[ $VERSION =~ ^7.3.* ]]; then
434-
(yes '' | sudo ./bin/compile-extension-redis) &&
431+
(yes '' | ./bin/compile-extension-redis) &&
435432
(./bin/compile-extension-mongo) &&
436433
./bin/compile-extension-amqp &&
437434
./bin/compile-extension-apcu &&
438435
./bin/compile-extension-zmq &&
439436
(./bin/compile-extension-memcache;
440437
./bin/compile-extension-memcached) &&
441438
./bin/compile-extension-ssh2 &&
442-
sudo sed -i '/^extension=/d' $INSTALL_DEST/$VERSION/etc/php.ini
439+
sed -i '/^extension=/d' $INSTALL_DEST/$VERSION/etc/php.ini
443440
else
444441
if [[ ! $VERSION =~ ^master$ ]]; then
445442
(yes '' | ./bin/compile-extension-redis) &&

bin/compile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,19 @@ export PATH="$HOME/.phpenv/bin:$HOME/.php-build/bin:$PATH"
6363
buildDefinition=${VERSION}
6464
if [[ $VERSION == nightly* || $VERSION == master* ]]; then
6565
if [[ $RELEASE == jammy ]]; then
66-
buildDefinition=8.3snapshot
66+
buildDefinition=8.1snapshot
6767
else
6868
buildDefinition=8.0snapshot
6969
fi
7070
fi
7171

72-
php-build -i development "${buildDefinition}" "${INSTALL_DEST}/${VERSION}" --verbose
72+
php-build -i development "${buildDefinition}" "${INSTALL_DEST}/${VERSION}"
7373

7474
pushd "${INSTALL_DEST}/${VERSION}"
7575

7676
# update default_cert_file
77-
mkdir -p /usr/local/ssl
78-
wget -O /usr/local/ssl/cert.pem https://curl.haxx.se/ca/cacert.pem
77+
sudo mkdir -p /usr/local/ssl
78+
sudo wget -O /usr/local/ssl/cert.pem https://curl.haxx.se/ca/cacert.pem
7979

8080
# Fetch latest PEAR phar
8181
curl -fsSL --retry 20 -O http://pear.php.net/go-pear.phar
@@ -91,17 +91,17 @@ rm go-pear.phar
9191
ln -sv ../sbin/php-fpm bin/php-fpm
9292

9393
# composer and phpunit
94+
curl -fsSL -o bin/composer http://getcomposer.org/composer.phar
9495
if [[ $VERSION == nightly* || $VERSION == master* || $VERSION == 7* || $VERSION == 8* ]]; then
9596
PHPUNIT_ARCHIVE=phpunit.phar
9697
elif [[ $VERSION == 5.6* ]]; then
9798
PHPUNIT_ARCHIVE=phpunit-5.7.phar
9899
else
99100
PHPUNIT_ARCHIVE=phpunit-old.phar
100101
fi
101-
wget -P bin/phpunit https://phar.phpunit.de/$PHPUNIT_ARCHIVE
102-
# mkdir -p /usr/local/bin/composer
103-
# wget -P /usr/local/bin/composer http://getcomposer.org/composer.phar
104-
# chmod +x bin/phpunit /usr/local/bin/composer/composer.phar
102+
curl -fsSL -o bin/phpunit https://phar.phpunit.de/$PHPUNIT_ARCHIVE
103+
104+
chmod +x bin/composer bin/phpunit
105105

106106
popd
107107

@@ -127,6 +127,6 @@ pushd /tmp
127127

128128
phpenv local "${VERSION}"
129129
phpenv rehash
130-
#composer self-update
130+
composer self-update
131131

132132
popd

0 commit comments

Comments
 (0)