Skip to content

Commit a74b0f4

Browse files
committed
Improved Travis build
1 parent fb93002 commit a74b0f4

File tree

3 files changed

+21
-10
lines changed

3 files changed

+21
-10
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ before_install:
7878
- export PHP_MAJOR="$(echo $TRAVIS_PHP_VERSION | cut -d '.' -f 1,2)"
7979

8080
install:
81-
- travis_retry composer install --prefer-dist --no-interaction --ignore-platform-reqs
81+
- travis_retry composer install --prefer-source --no-interaction --ignore-platform-reqs
8282
- bash tests/_ci/install_prereqs_$PHP_MAJOR.sh
8383
- bash tests/_ci/install_zephir.sh
8484
- '( zephir fullclean && zephir generate $ZEND_BACKEND )'
8585
- (export PRE_PHP_INCLUDES=`php-config --includes`; cd ext/; for file in `find kernel -name "*.h"`; do $CC "$file" -I. $PRE_PHP_INCLUDES -o "$file.ghc"; done)
86-
- (cd ext; export CFLAGS="-g3 -O0 -std=gnu90 -Wall -DZEPHIR_RELEASE=1"; /usr/bin/phpize &> /dev/null && ./configure --silent --enable-phalcon &> /dev/null && make --silent -j"$(getconf _NPROCESSORS_ONLN)" &> /dev/null && make --silent install)
86+
- (cd ext; export CFLAGS="-g3 -O0 -std=gnu90 -Wall"; /usr/bin/phpize &> /dev/null && ./configure --silent --enable-phalcon &> /dev/null && make --silent -j"$(getconf _NPROCESSORS_ONLN)" &> /dev/null && make --silent install)
8787
- phpenv config-add tests/_ci/phalcon.ini
8888
- phpenv config-add tests/_ci/redis.ini
8989
- php -m

appveyor.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ install:
4444
# ==================================================
4545
- echo Downloading PHP source code [%PHP_VERSION%]
4646
# ==================================================
47-
- ps: (new-object net.webclient).DownloadFile('http://windows.php.net/downloads/releases/php-' + ${env:PHP_VERSION} + '-Win32-VC' + ${env:PHP_VC} + '-' + ${env:BUILD_PLATFORM} + '.zip', ${env:APPVEYOR_BUILD_FOLDER} + '\..\php.zip')
47+
- ps: (new-object net.webclient).DownloadFile('http://windows.php.net/downloads/releases/php-' + ${env:PHP_VERSION} + '-Win32-VC' + ${env:PHP_VC} + '-' + ${env:PLATFORM} + '.zip', ${env:APPVEYOR_BUILD_FOLDER} + '\..\php.zip')
4848
- cd ..
4949
- 'mkdir php && mv php.zip php\php.zip && cd php'
5050
- 7z.exe x php.zip | FIND /V "ing "
@@ -57,9 +57,9 @@ install:
5757
# ==================================================
5858
- echo Downloading PHP-Devel-Pack
5959
# ==================================================
60-
- ps: (new-object net.webclient).DownloadFile('http://windows.php.net/downloads/releases/php-devel-pack-' + ${env:PHP_VERSION} + '-Win32-VC' + ${env:PHP_VC} + '-' + ${env:BUILD_PLATFORM} + '.zip', ${env:APPVEYOR_BUILD_FOLDER} + '\..\php-dev.zip')
60+
- ps: (new-object net.webclient).DownloadFile('http://windows.php.net/downloads/releases/php-devel-pack-' + ${env:PHP_VERSION} + '-Win32-VC' + ${env:PHP_VC} + '-' + ${env:PLATFORM} + '.zip', ${env:APPVEYOR_BUILD_FOLDER} + '\..\php-dev.zip')
6161
- 7z.exe x php-dev.zip | FIND /V "ing "
62-
- mv php-%PHP_VERSION%-devel-VC11-%BUILD_PLATFORM% php-devpack
62+
- mv php-%PHP_VERSION%-devel-VC11-%PLATFORM% php-devpack
6363
# ==================================================
6464
- echo Enable Zephir Parser
6565
# ==================================================
@@ -71,7 +71,7 @@ install:
7171
# ==================================================
7272
- '%PHP_SDK%\bin\phpsdk_setvars'
7373
- 'cd %APPVEYOR_BUILD_FOLDER%\..\php'
74-
- '"%VS110COMNTOOLS%\VsDevCmd" %BUILD_PLATFORM%'
74+
- '"%VS110COMNTOOLS%\VsDevCmd" %PLATFORM%'
7575
- 'echo extension_dir=%APPVEYOR_BUILD_FOLDER%\..\php\ext > php.ini'
7676
- 'echo extension=php_zephir_parser.dll >> php.ini'
7777
- 'echo extension=php_curl.dll >> php.ini'

tests/_ci/install_zephir.sh

+15-4
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,20 @@ cd ${ZEPHIRDIR}
2525
sed "s#%ZEPHIRDIR%#$ZEPHIRDIR#g" bin/zephir > bin/zephir-cmd
2626
chmod 755 bin/zephir-cmd
2727

28-
mkdir -p ~/bin
28+
mkdir -p ${HOME}/bin
2929

30-
cp bin/zephir-cmd ~/bin/zephir
31-
rm bin/zephir-cmd
30+
cp ./bin/zephir-cmd ${HOME}/bin/zephir
31+
rm ./bin/zephir-cmd
3232

33-
cd ${TRAVIS_BUILD_DIR}
33+
echo -e "Install Zephir Parser..."
34+
35+
git submodule init
36+
git submodule update
37+
38+
if [ ! -d "${TRAVIS_BUILD_DIR}/vendor/phalcon/zephir/modules/php-zephir-parser" ]; then
39+
echo -e "The ${TRAVIS_BUILD_DIR}/vendor/phalcon/zephir/modules/php-zephir-parser directory does not exists."
40+
exit 1;
41+
fi
42+
43+
cd ${TRAVIS_BUILD_DIR}/vendor/phalcon/zephir/modules/php-zephir-parser
44+
TRAVIS_BUILD_DIR=$(pwd) bash ./tests/ci/install-travis

0 commit comments

Comments
 (0)