mirror of
https://github.com/phpv8/v8js.git
synced 2025-03-19 15:27:02 +00:00
Valgrind checks for invalid memory accesses and memory leaks. "-m" makes php unit tests use valgrind (and malloc instead of emalloc, etc.) (Takes around 20 minutes) Also support testing v8js with NTS (The default used by Travis is ZTS) One of the builds will download and install PHP. This will be cached. - This reproduces #247 on travis - For details on travis build caching, see https://docs.travis-ci.com/user/caching/#Pull-request-builds-and-caches Skip memory and time limit tests - Those are flaky with valgrind. The tests fail but don't have memory leaks. (When https://github.com/phpv8/v8js/pull/248 was tested) Use 5.7 (earliest ppa >= 5.6) for running valgrind checks. Fix ppa checks - The installation folder changed to /opt/libv8-5.7 - run tests both with and without valgrind in libv8 5.7 Otherwise, time limits and memory limits wouldn't be tested at all in 5.7 Always pass strings for splitting environment variables by spaces.
29 lines
1018 B
YAML
29 lines
1018 B
YAML
language: php
|
|
sudo: required
|
|
dist: trusty
|
|
cache:
|
|
directories:
|
|
- $HOME/travis_cache
|
|
|
|
php:
|
|
- 7.0
|
|
- 7.1
|
|
|
|
env:
|
|
- V8VER=5.7
|
|
- V8VER=5.2
|
|
- V8VER=5.1
|
|
# Some bugs in v8js only show up without zts enabled.
|
|
# Notices with valgrind in libv8 were fixed in later v8js versions.
|
|
- V8VER=5.7 VALGRIND=1
|
|
- V8VER=5.7 VALGRIND=1 PHP_NTS_USE=1 PHP_CONFIGURE_ARGS="--disable-all --disable-zts --enable-debug"
|
|
|
|
before_install: make -f Makefile.travis before_install
|
|
install:
|
|
# For NTS builds: Install NTS and set the php.ini to a different blank file.
|
|
- if [ "x$PHP_NTS_USE" != "x" ]; then export PHP_NTS_VERSION=$(./ci/get_global_php_version.sh); echo "Version is $PHP_NTS_VERSION"; ./ci/install_php_nts.sh || exit 1; export PATH="$(./ci/generate_php_install_dir.sh)/bin:$PATH"; export PHPRC=$PWD/ci/; else ./ci/wipe_travis_cache.sh; fi
|
|
- if [ "$VALGRIND" = 1 ]; then sudo apt-get install -qq valgrind; export TEST_PHP_ARGS="-m"; fi
|
|
- make -f Makefile.travis install
|
|
|
|
script: make -f Makefile.travis test
|