0
0
mirror of https://github.com/phpv8/v8js.git synced 2025-01-08 22:11:52 +00:00
phpv8/Makefile.travis
Tyson Andre 1ec2a57e44 Make valgrind run on travis tests of v8js
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.
2017-03-05 20:17:56 -08:00

22 lines
512 B
Makefile

# Configure and build scripts for travis CI system
V8VER ?= 5.1
export NO_INTERACTION=1
export REPORT_EXIT_STATUS=1
before_install:
sudo add-apt-repository ppa:pinepain/libv8-$(V8VER) -y
sudo apt-get update -q
install:
sudo apt-get install -y libv8-$(V8VER)-dev
# newer releases (E.g. 5.7) of the ppa install the headers and lib to /opt/libv8-VER
build:
phpize
if [ -d /opt/libv8-$(V8VER) ]; then ./configure --with-v8js=/opt/libv8-$(V8VER); else ./configure; fi
$(MAKE) -j3
test: build
$(MAKE) test