Skip to content

Commit 5489228

Browse files
committed
Improved Travis build
1 parent fb93002 commit 5489228

File tree

4 files changed

+38
-10
lines changed

4 files changed

+38
-10
lines changed

.travis.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,13 @@ 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
83+
- bash tests/_ci/install_zephir_parser.sh
8384
- bash tests/_ci/install_zephir.sh
8485
- '( zephir fullclean && zephir generate $ZEND_BACKEND )'
8586
- (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)
87+
- (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)
8788
- phpenv config-add tests/_ci/phalcon.ini
8889
- phpenv config-add tests/_ci/redis.ini
8990
- 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

+6-4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
# obtain it through the world-wide-web, please send an email
1212
# to license@phalconphp.com so we can send you a copy immediately.
1313

14+
echo -e "Install Zephir..."
15+
1416
CURRENT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
1517
TRAVIS_BUILD_DIR="${TRAVIS_BUILD_DIR:-$(dirname $(dirname $CURRENT_DIR))}"
1618
ZEPHIRDIR=${TRAVIS_BUILD_DIR}/vendor/phalcon/zephir
@@ -25,9 +27,9 @@ cd ${ZEPHIRDIR}
2527
sed "s#%ZEPHIRDIR%#$ZEPHIRDIR#g" bin/zephir > bin/zephir-cmd
2628
chmod 755 bin/zephir-cmd
2729

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

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

33-
cd ${TRAVIS_BUILD_DIR}
35+
cd ${CURRENT_DIR}

tests/_ci/install_zephir_parser.sh

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Phalcon Framework
4+
#
5+
# Copyright (c) 2011-2017 Phalcon Team (https://www.phalconphp.com)
6+
#
7+
# This source file is subject to the New BSD License that is bundled
8+
# with this package in the file docs/LICENSE.txt.
9+
#
10+
# If you did not receive a copy of the license and are unable to
11+
# obtain it through the world-wide-web, please send an email
12+
# to license@phalconphp.com so we can send you a copy immediately.
13+
14+
echo -e "Install Zephir Parser..."
15+
16+
CURRENT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
17+
TRAVIS_BUILD_DIR="${TRAVIS_BUILD_DIR:-$(dirname $(dirname $CURRENT_DIR))}"
18+
19+
git clone --depth=1 -v https://github.com/phalcon/php-zephir-parser.git /tmp/parser
20+
cd /tmp/parser
21+
22+
# Only for Travis CI
23+
TRAVIS_BUILD_DIR=$(pwd) bash ./tests/ci/install-travis
24+
25+
cd ${CURRENT_DIR}

0 commit comments

Comments
 (0)