-
-
Notifications
You must be signed in to change notification settings - Fork 45
/
.travis.yml
67 lines (57 loc) · 2.83 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
language: php
dist: xenial
sudo: required
php:
- 7.4
- 8.0
- nightly
matrix:
fast_finish: true
allow_failures:
- php: nightly
services:
- mongodb
- mysql
before_install:
- if [[ "$TRAVIS_PHP_VERSION" == "nightly" ]]; then pecl install mongodb; fi
- mysql -e 'CREATE DATABASE ice_test;'
- echo "source tests/ci/ice_test.sql;" | mysql -u root ice_test
- mongo ice_test --eval 'db.createUser({user:"root",pwd:"password",roles:["readWrite"]});'
- phpenv config-add tests/ci/mongodb.ini
- if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then openssl aes-256-cbc -k "$encrypted_key" -in id_rsa.enc -out ~/.ssh/id_rsa -d; chmod 600 ~/.ssh/id_rsa; fi
- if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then openssl aes-256-cbc -k "$encrypted_key" -in id_pgp.enc -out ~/.gnupg/id_pgp -d; chmod 600 ~/.gnupg/id_pgp; gpg --allow-secret-key-import --import ~/.gnupg/id_pgp; fi
- git config push.default simple
# - git config commit.gpgsign true
- git config --global user.email "[email protected]"
- git config --global user.name "Ice Framework"
# - git config --global user.signingkey 781C2FB7
- git submodule --quiet update --init --recursive
- if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then git remote set-url origin [email protected]:ice/framework.git; fi
- COMPOSER_MEMORY_LIMIT=-1 travis_retry composer install --prefer-source --no-scripts
before_script:
- (cd vendor/iceframework/zephir-parser; ./install; phpenv config-add tests/ci/zephir_parser.ini)
- php -d memory_limit=512M ./vendor/bin/zephir generate
- (mkdir generated; cp -a ext/. generated)
- (cd ext; export CFLAGS="-g3 -O1 -fno-delete-null-pointer-checks -Wall -fvisibility=hidden -DZEPHIR_RELEASE=1"; phpize && ./configure --enable-ice && make -j2 && make install && phpenv config-add ../tests/ci/ice.ini)
- ulimit -c unlimited || true
- phpenv config-rm xdebug.ini || echo "xdebug not available"
script:
- ./vendor/bin/phpunit --configuration tests/phpunit.xml --testsuite=all
after_failure:
- gdb -quiet -command=tests/ci/gdb --args $(phpenv which php) vendor/bin/phpunit --debug --colors --configuration tests/phpunit.xml --testsuite=all
after_success:
- export ZEPHIR_TARGET="legacy"
- if [[ "$TRAVIS_PHP_VERSION" = "8.0" ]]; then export ZEPHIR_TARGET="php8"; fi
- git checkout $TRAVIS_BRANCH;
- (rm -rf build/$ZEPHIR_TARGET/; mkdir -p build/$ZEPHIR_TARGET; cp -a generated/. build/$ZEPHIR_TARGET)
- 'git add -A build/$ZEPHIR_TARGET; git commit -m "$ZEPHIR_TARGET, $TRAVIS_COMMIT: regenerate ice sources [ci skip]" build/$ZEPHIR_TARGET'
- if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$ZEPHIR_TARGET" != "legacy" ]]; then git fetch && git rebase --autostash FETCH_HEAD && git push; fi
- if [[ "$TRAVIS_PULL_REQUEST" == "true" ]]; then git log -1 -p; fi
notifications:
email:
addons:
apt:
packages:
- gdb
- re2c