mirror of
https://github.com/phpv8/v8js.git
synced 2024-11-08 13:48:40 +00:00
73 lines
2.2 KiB
Plaintext
73 lines
2.2 KiB
Plaintext
#
|
|
# Vagrant Commandfile
|
|
# (use with vagrant-devcommands plugin)
|
|
#
|
|
|
|
command 'phpize',
|
|
description: 'executes "phpize" to configure source tree for installed PHP version',
|
|
script: 'cd /data/v8js && phpize'
|
|
|
|
command 'configure',
|
|
description: 'executes "configure" to prepare build',
|
|
parameters: {
|
|
cxxflags: { default: "-ggdb -Wall -Wno-write-strings" },
|
|
ldflags: { default: "-ggdb -lstdc++" },
|
|
},
|
|
script: <<-eof
|
|
bash -c 'cd /data/build; ../v8js/configure `bash -c "if test -d /opt/libv8-*; then echo -n --with-v8js=; echo /opt/libv8-*; fi"` `test -d "/usr/lib64" && echo --with-libdir=lib64` CXXFLAGS="%{cxxflags}" LDFLAGS="%{ldflags}"'
|
|
eof
|
|
|
|
command 'clean',
|
|
description: 'executes "make clean"',
|
|
script: <<-eof
|
|
cd /data/build; `which gmake || which make` clean; rm -rf /data/v8js/coverage_report /data/build/gcov.info
|
|
eof
|
|
|
|
command 'build',
|
|
description: 'executes "make"',
|
|
script: <<-eof
|
|
cd /data/build; `which gmake || which make` -j4
|
|
eof
|
|
|
|
command 'test',
|
|
description: 'executes "make test"',
|
|
parameters: {
|
|
tests: { wrap: "TESTS=tests/%s", optional: true },
|
|
},
|
|
script: <<-eof
|
|
cd /data/build; `which gmake || which make` test %{tests} NO_INTERACTION=1 REPORT_EXIT_STATUS=1
|
|
eof
|
|
|
|
command 'shell',
|
|
description: 'execute a PHP CLI interactive shell with V8Js loaded',
|
|
script: <<-eof
|
|
cd /data/build; php -a -d extension=modules/v8js.so
|
|
eof
|
|
|
|
chain 'all',
|
|
commands: [
|
|
{ command: 'phpize' },
|
|
{ command: 'configure' },
|
|
{ command: 'clean' },
|
|
{ command: 'build' },
|
|
{ command: 'test' }
|
|
]
|
|
|
|
command 'coverage_report',
|
|
description: 'capture *.gcda files and generate code coverage report',
|
|
script: <<-eof
|
|
cd /data/build
|
|
lcov --base-directory=.libs --directory=.libs --directory ../v8js/ --no-external --capture --output-file gcov.info
|
|
genhtml --legend --output-directory ../v8js/coverage_report/ --title "V8Js Code Coverage" gcov.info
|
|
eof
|
|
|
|
chain 'coverage',
|
|
commands: [
|
|
{ command: 'phpize' },
|
|
{ command: 'configure', argv: ['--cxxflags=-O0 --coverage', '--ldflags=--coverage'] },
|
|
{ command: 'clean' },
|
|
{ command: 'build' },
|
|
{ command: 'test' },
|
|
{ command: 'coverage_report' },
|
|
]
|