Skip to content

Commit 1e9d250

Browse files
committed
Tune up Travis CI build
1 parent 94f4857 commit 1e9d250

File tree

2 files changed

+25
-8
lines changed

2 files changed

+25
-8
lines changed

.travis.yml

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,34 @@ cache:
4848
- $HOME/.composer/cache
4949

5050
install:
51-
- bash ./build-linux
52-
- $(phpenv which phpize)
53-
- ./configure --with-php-config=$(phpenv which php-config) --enable-zephir_parser
54-
- make -j"$(getconf _NPROCESSORS_ONLN)"
55-
- make install
56-
- phpenv config-add zephir_parser.ini
51+
- |
52+
cd $TRAVIS_BUILD_DIR/parser
53+
re2c -o scanner.c scanner.re
54+
${CC} lemon.c -o lemon
55+
./lemon -s parser.php5.lemon
56+
./lemon -s parser.php7.lemon
57+
echo "#include <php.h>" > parser.c
58+
echo "#if PHP_VERSION_ID < 70000" >> parser.c
59+
cat parser.php5.c >> parser.c
60+
echo "#else" >> parser.c
61+
cat parser.php7.c >> parser.c
62+
echo "#endif" >> parser.c
63+
cat base.c >> parser.c
64+
sed s/"\#line"/"\/\/"/g scanner.c > xx && mv -f xx scanner.c
65+
sed s/"#line"/"\/\/"/g parser.c > xx && mv -f xx parser.c
66+
cd $TRAVIS_BUILD_DIR
67+
- |
68+
$(phpenv which phpize)
69+
/configure --with-php-config=$(phpenv which php-config) --enable-zephir_parser
70+
make -j"$(getconf _NPROCESSORS_ONLN)"
71+
make install
72+
phpenv config-add zephir_parser.ini
5773
5874
before_install:
5975
- if [[ ! -z "${GH_TOKEN}" ]]; then composer config github-oauth.github.com ${GH_TOKEN}; echo "Configured Github token"; fi;
6076

6177
script:
62-
- php -m
63-
- php --ri zephir_parser
78+
- php --ri "Zephir Parser"
6479

6580
notifications:
6681
email:

build-linux

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ rm -f *.o *.lo
2626

2727
if [ x"$CC" != x ]; then
2828
if [ x"$GCC_BIN" != x ]; then
29+
export CFLAGS="-g3 -O3 -fno-delete-null-pointer-checks -Wall -fvisibility=hidden"
2930
export CC="gcc"
3031
else
3132
if [ x"$CLANG_BIN" != x ]; then
33+
export CFLAGS="-g3 -O3"
3234
export CC="clang"
3335
fi
3436
fi

0 commit comments

Comments
 (0)