mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-22 18:41:52 +00:00
Merge pull request #347 from stesie/issue-345
Use recent V8 versions for testing
This commit is contained in:
commit
ea89904966
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,6 +2,7 @@
|
|||||||
*.o
|
*.o
|
||||||
.deps
|
.deps
|
||||||
.libs
|
.libs
|
||||||
|
Dockerfile.tmp
|
||||||
Makefile
|
Makefile
|
||||||
Makefile.fragments
|
Makefile.fragments
|
||||||
Makefile.global
|
Makefile.global
|
||||||
|
22
.travis.yml
22
.travis.yml
@ -1,15 +1,21 @@
|
|||||||
language: php
|
language: php
|
||||||
sudo: required
|
sudo: required
|
||||||
dist: trusty
|
|
||||||
|
|
||||||
php:
|
services:
|
||||||
- 7.0
|
- docker
|
||||||
- 7.1
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- V8VER=5.2
|
- V8VER=6.5
|
||||||
- V8VER=5.1
|
PHPVER=7.0
|
||||||
|
- V8VER=6.4
|
||||||
|
PHPVER=7.0
|
||||||
|
- V8VER=6.5
|
||||||
|
PHPVER=7.1
|
||||||
|
- V8VER=6.4
|
||||||
|
PHPVER=7.1
|
||||||
|
- V8VER=6.5
|
||||||
|
PHPVER=7.2
|
||||||
|
- V8VER=6.4
|
||||||
|
PHPVER=7.2
|
||||||
|
|
||||||
before_install: make -f Makefile.travis before_install
|
|
||||||
install: make -f Makefile.travis install
|
|
||||||
script: make -f Makefile.travis test
|
script: make -f Makefile.travis test
|
||||||
|
@ -11,7 +11,7 @@ command 'configure',
|
|||||||
description: 'executes "configure" to prepare build',
|
description: 'executes "configure" to prepare build',
|
||||||
parameters: {
|
parameters: {
|
||||||
cxxflags: { default: "-ggdb -Wall -Wno-write-strings" },
|
cxxflags: { default: "-ggdb -Wall -Wno-write-strings" },
|
||||||
ldflags: { default: "-ggdb" },
|
ldflags: { default: "-ggdb -lstdc++" },
|
||||||
},
|
},
|
||||||
script: <<-eof
|
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}"'
|
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}"'
|
||||||
|
22
Dockerfile.travis
Normal file
22
Dockerfile.travis
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
FROM ubuntu:xenial
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
ENV LC_ALL=C.UTF-8
|
||||||
|
ENV NO_INTERACTION=1
|
||||||
|
ENV REPORT_EXIT_STATUS=1
|
||||||
|
|
||||||
|
RUN apt-get update -q
|
||||||
|
RUN apt-get install -y software-properties-common
|
||||||
|
|
||||||
|
RUN add-apt-repository ppa:ondrej/php
|
||||||
|
RUN add-apt-repository ppa:pinepain/libv8-$V8VER -y
|
||||||
|
RUN apt-get update -q
|
||||||
|
|
||||||
|
RUN apt-get install -y php$PHPVER-dev libv8-$V8VER-dev
|
||||||
|
|
||||||
|
ADD . /app
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN phpize
|
||||||
|
RUN ./configure CXXFLAGS="-Wall -Wno-write-strings -Werror" LDFLAGS="-lstdc++" --with-v8js=/opt/libv8-$V8VER/
|
||||||
|
RUN make -j4
|
@ -1,20 +1,14 @@
|
|||||||
# Configure and build scripts for travis CI system
|
# Configure and build scripts for travis CI system
|
||||||
V8VER ?= 5.1
|
V8VER ?= 6.3
|
||||||
|
|
||||||
|
IMAGENAME ?= v8js-test
|
||||||
|
|
||||||
export NO_INTERACTION=1
|
export NO_INTERACTION=1
|
||||||
export REPORT_EXIT_STATUS=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
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
phpize
|
envsubst < Dockerfile.travis > Dockerfile.tmp
|
||||||
./configure CXXFLAGS="-Wall -Wno-write-strings -Werror"
|
docker build -t $(IMAGENAME) -f Dockerfile.tmp .
|
||||||
$(MAKE) -j3
|
|
||||||
|
|
||||||
test: build
|
test: build
|
||||||
$(MAKE) test
|
docker run --rm -t $(IMAGENAME) make test
|
||||||
|
@ -42,11 +42,10 @@ For some very first steps, instead of compiling manually you might want to try o
|
|||||||
image](https://registry.hub.docker.com/u/stesie/v8js/). It has v8, v8js and php-cli pre-installed
|
image](https://registry.hub.docker.com/u/stesie/v8js/). It has v8, v8js and php-cli pre-installed
|
||||||
so you can give it a try with PHP in "interactive mode". There is no Apache, etc. running however.
|
so you can give it a try with PHP in "interactive mode". There is no Apache, etc. running however.
|
||||||
|
|
||||||
For Ubuntu @pinepain has PPAs for V8 [5.1](https://launchpad.net/~pinepain/+archive/ubuntu/libv8-5.1)
|
For Ubuntu @pinepain has PPAs for [various versions of V8](https://launchpad.net/~pinepain).
|
||||||
and [5.2](https://launchpad.net/~pinepain/+archive/ubuntu/libv8-5.2). You might want to install
|
You might want to install these and compile V8Js based on them.
|
||||||
these (and compile V8Js based on them).
|
|
||||||
|
|
||||||
There also is a Heroku extension pack that has recent V8Js versions for both PHP 5.6 and 7.0, see
|
There also is a Heroku extension pack that has recent V8Js versions for PHP 7.x, see
|
||||||
[@stesie's blog post](https://stesie.github.io/2016/03/heroku-custom-platform-repo) for details.
|
[@stesie's blog post](https://stesie.github.io/2016/03/heroku-custom-platform-repo) for details.
|
||||||
|
|
||||||
Last but not least there are binaries for Windows (PHP7, x86 including V8 4.9.385.29) that you can use
|
Last but not least there are binaries for Windows (PHP7, x86 including V8 4.9.385.29) that you can use
|
||||||
|
28
Vagrantfile
vendored
28
Vagrantfile
vendored
@ -11,6 +11,7 @@ Vagrant.configure("2") do |config|
|
|||||||
config.vm.box = "ubuntu/xenial64"
|
config.vm.box = "ubuntu/xenial64"
|
||||||
|
|
||||||
config.vm.provider "lxc" do |lxc, override|
|
config.vm.provider "lxc" do |lxc, override|
|
||||||
|
lxc.backingstore = "none"
|
||||||
override.vm.box = "zaikin/xenial64-lxc"
|
override.vm.box = "zaikin/xenial64-lxc"
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -18,7 +19,7 @@ Vagrant.configure("2") do |config|
|
|||||||
#
|
#
|
||||||
# mass-define "generic" Ubuntu boxes
|
# mass-define "generic" Ubuntu boxes
|
||||||
#
|
#
|
||||||
%w{5.7 5.8 5.9 6.0 6.3}.each { |version|
|
%w{6.3 6.4 6.5}.each { |version|
|
||||||
config.vm.define "v8-#{version}" do |i|
|
config.vm.define "v8-#{version}" do |i|
|
||||||
i.vm.synced_folder ".", "/data/v8js"
|
i.vm.synced_folder ".", "/data/v8js"
|
||||||
|
|
||||||
@ -37,7 +38,7 @@ Vagrant.configure("2") do |config|
|
|||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
%w{5.9.35 6.0.318}.each { |version|
|
%w{}.each { |version|
|
||||||
config.vm.define "v8-#{version}" do |i|
|
config.vm.define "v8-#{version}" do |i|
|
||||||
i.vm.synced_folder ".", "/data/v8js"
|
i.vm.synced_folder ".", "/data/v8js"
|
||||||
|
|
||||||
@ -143,29 +144,6 @@ Vagrant.configure("2") do |config|
|
|||||||
SHELL
|
SHELL
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# ubuntu xenial(16.04) box with PHP 7.1.3, V8 5.2
|
|
||||||
# (to reproduce issue #304)
|
|
||||||
#
|
|
||||||
config.vm.define "xenial-v8-5.2" do |i|
|
|
||||||
i.vm.box = "ubuntu/xenial64"
|
|
||||||
i.vm.synced_folder ".", "/data/v8js"
|
|
||||||
|
|
||||||
i.vm.provision "shell", inline: <<-SHELL
|
|
||||||
gpg --keyserver keys.gnupg.net --recv 7F438280EF8D349F
|
|
||||||
gpg --armor --export 7F438280EF8D349F | apt-key add -
|
|
||||||
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y software-properties-common gdb tmux git tig curl apache2-utils lcov
|
|
||||||
|
|
||||||
add-apt-repository ppa:ondrej/php
|
|
||||||
add-apt-repository ppa:pinepain/libv8-5.2
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y php7.1-dev libv8-5.2-dbg libv8-5.2-dev
|
|
||||||
SHELL
|
|
||||||
end
|
|
||||||
|
|
||||||
config.vm.define "macos-sierra" do |i|
|
config.vm.define "macos-sierra" do |i|
|
||||||
i.vm.box = "gobadiah/macos-sierra"
|
i.vm.box = "gobadiah/macos-sierra"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user