This repository was archived by the owner on Mar 29, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +49
-25
lines changed Expand file tree Collapse file tree 5 files changed +49
-25
lines changed Original file line number Diff line number Diff line change @@ -6,17 +6,21 @@ services:
66
77env :
88 global :
9- - V8=6.5
9+ - V8=6.5.144
1010 matrix :
11- - TAG=xenial-v8-65-php-71
12- - TAG=xenial-v8-65-php-71 TEST_PHP_ARGS=-m
13- - TAG=xenial-v8-65-php-72
14- - TAG=xenial-v8-65-php-72 TEST_PHP_ARGS=-m
11+ - PHP=7.2
12+ - PHP=7.2 TEST_PHP_ARGS=-m
13+ - PHP=7.1
14+ - PHP=7.1 TEST_PHP_ARGS=-m
1515
1616before_install :
1717 # docker on travis doesn't allow anything before FROM, let's fix that
18- - sed -i -e "s/\${TAG}/$TAG/g" Dockerfile && sed -i -e '1,2d' Dockerfile
19- - docker build -t ${TRAVIS_REPO_SLUG}:${V8}-${PHP} --build-arg TAG =${TAG } .
18+ - sed -i -e "s/:latest/:${V8}/g" Dockerfile
19+ - docker build -t ${TRAVIS_REPO_SLUG} --build-arg PHP =${PHP } .
2020
2121script :
22- - docker run -e TEST_PHP_ARGS ${TRAVIS_REPO_SLUG}:${V8}-${PHP} bash -c "make test | tee result.txt; ./test-report.sh"
22+ - docker run
23+ -e TEST_PHP_ARGS
24+ -v `pwd`:/root/php-v8
25+ ${TRAVIS_REPO_SLUG}
26+ bash -c "phpize && ./configure && make test | tee result.txt; ./test-report.sh"
Original file line number Diff line number Diff line change 1- ARG TAG=xenial-v8-65-php-72
1+ FROM pinepain/libv8:latest
22
3- FROM pinepain/php-v8-docker:${TAG}
3+ ARG PHP=7.2
4+
5+ ENV DEBIAN_FRONTEND noninteractive
6+ ENV TERM=xterm-256color
7+ ENV LC_ALL=C.UTF-8
8+ ENV NO_INTERACTION=1
9+ ENV REPORT_EXIT_STATUS=1
10+
11+ RUN echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" > /etc/apt/sources.list.d/ondrej-php-xenial.list && \
12+ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C && \
13+ apt-get update && \
14+ apt-get install -y valgrind && \
15+ apt-get install -y php${PHP} php${PHP}-cli php${PHP}-dev php${PHP}-fpm && \
16+ rm -rf /var/lib/apt/lists/* && \
17+ echo 'variables_order = "EGPCS"' >> `php --ini | grep "Loaded Configuration File" | awk '{print $4}' ` && \
18+ php -i && \
19+ php-config || true && \
20+ mkdir /root/php-v8
421
5- COPY . /root/php-v8
622COPY ./scripts/provision/.bashrc /root/.bashrc
723
824WORKDIR /root/php-v8
925
10- ENV NO_INTERACTION=1
26+ # COPY . /root/php-v8
27+ # RUN phpize && ./configure && make
1128
12- RUN php -i && php-config || true
13- RUN phpize && ./configure && make
Original file line number Diff line number Diff line change @@ -167,6 +167,15 @@ $ sudo make install
167167 - [ pinepain/libv8-experimental] ( https://launchpad.net/~pinepain/+archive/ubuntu/libv8-experimental ) normally contains
168168 ` libv8 ` version that used in current ` master ` branch.
169169
170+ ### Docker
171+
172+ First, let's build docker image ` docker build -t pinepain/php-v8 . ` that we'll use later for development. By default,
173+ it contains PHP 7.2, though you can change that by passing ` --build-arg PHP=MAJOR.MINOR ` where MAJOR.MINOR version
174+ present in [ ondrej/php] ( https://launchpad.net/~ondrej/+archive/ubuntu/php ) PPA.
175+
176+ To start playing with php-v8 in docker, run ```docker run -e TEST_PHP_ARGS -v ` pwd ` :/root/php-v8 -it pinepain/php-v8 bash``.
177+ Now you can build php-v8 as usual with ` phpize && ./configure && make ` . Don't forget to run ` make test ` !
178+
170179### Docs
171180
172181To start writing docs you will need to get [ GitBook] ( https://gitbook.com ) , just run ` npm install gitbook-cli -g ` and
Original file line number Diff line number Diff line change @@ -24,9 +24,9 @@ if test "$PHP_V8" != "no"; then
2424 DESIRED_V8_VERSION=`echo "${V8_MIN_API_VERSION_STR}" | $AWK 'BEGIN { FS = "."; } { printf "%s.%s", [ $] 1, [ $] 2;}'`
2525
2626 # Path where v8 from packages we recommend are installed, it's /opt/libv8-MAJOR.MINOR on Ubuntu
27- # and /usr/local/opt/v8@MAJOR.MINOR on macOS
28- PRIORITY_SEARCH_PATH="/opt/libv8-${DESIRED_V8_VERSION} /usr/local/opt/v8@${DESIRED_V8_VERSION}"
29- SEARCH_PATH="${PRIORITY_SEARCH_PATH} /usr/local /usr "
27+ # and /usr/local/opt/v8@MAJOR.MINOR on macOS. For Docker image it's just /opt/libv8
28+ PRIORITY_SEARCH_PATH="/opt/libv8-${DESIRED_V8_VERSION} /usr/local/opt/v8@${DESIRED_V8_VERSION} /opt/libv8 "
29+ SEARCH_PATH="${PRIORITY_SEARCH_PATH} ${SEARCH_PATH} "
3030
3131 if test -r $PHP_V8/$SEARCH_FOR; then
3232 V8_ROOT_DIR=$PHP_V8
Original file line number Diff line number Diff line change @@ -23,14 +23,10 @@ To track v8 changes you can use these links:
23231 . Copy fresh ` libv8-X.Y ` build packages from ` libv8-experimental ` (default target for all libv8 builds we trigger)
2424 to it ` libv8-X.Y ` PPA. Do not rebuild, just copy binaries.
25252 . ** Wait for packages copied and published!**
26- 3 . If there was a minor version bump in ` libv8 ` (not patch), create new dockerfiles for it in
27- [ php-v8-docker] ( https://github.com/pinepain/php-v8-docker ) and set ` ARG V8=X.Y ` to proper version.
28- 4 . Go to [ php-v8-docker Docker Hub] ( https://hub.docker.com/r/pinepain/php-v8-docker ) and remove old Docker tags from
29- been rebuild on push as we don't need them anymore and replace them with a new one (we still need to keep old tags
30- for CI purpose and just in case things won't go smooth and we have to rollback).
31- 5 . Rebuild/publish docker images to include new ` libv8 ` version.
32- 6 . You may want to set proper default image ` TAG ` in ` php-v8 ` ` Dockerfile ` by updating it first line ` ARG TAG=xenial-v8-64-php-72 ` .
33- 7 . Make sure you have proper ` php-v8 ` version set in ` packaging/Dockerfile ` under ` V8 ` constant.
26+ 3 . Build [ libv8] ( https://github.com/pinepain/libv8 ) docker image, tag it with the relevant v8 full version and push to
27+ Docker Hub.
28+ 4 . You may want to set proper ` V8 ` version in ` php-v8 ` by updating it in ` .travis.yml ` .
29+ 5 . Make sure you have proper ` php-v8 ` version set in ` packaging/Dockerfile ` under ` V8 ` constant.
3430
3531## After docker images rebuilt/published
3632
You can’t perform that action at this time.
0 commit comments