Skip to content

Commit ac784c7

Browse files
committed
run sanitize=address build on jenkins
1 parent e153ff1 commit ac784c7

File tree

3 files changed

+102
-0
lines changed

3 files changed

+102
-0
lines changed

.dockerignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
*.lo
2+
*.o
3+
.deps
4+
.libs
5+
Dockerfile.tmp
6+
Makefile
7+
Makefile.fragments
8+
Makefile.global
9+
Makefile.objects
10+
acinclude.m4
11+
aclocal.m4
12+
autom4te.cache/*
13+
build/*
14+
config.guess
15+
config.h
16+
config.h.in
17+
*.log
18+
config.nice
19+
config.status
20+
config.sub
21+
configure
22+
configure.in
23+
configure.ac
24+
*~
25+
install-sh
26+
libtool
27+
ltmain.sh
28+
missing
29+
mkinstalldirs
30+
modules/*
31+
v8js.la
32+
v8js-*.tgz
33+
run-tests.php
34+
.*.sw[poq]
35+
36+
tests/*.diff
37+
tests/*.exp
38+
tests/*.out
39+
tests/*.php
40+
tests/*.sh
41+
tests/*.mem
42+
43+
.vagrant
44+
tmp-php.ini
45+
46+
coverage_report/**

Dockerfile.jenkins

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
ARG V8VER
2+
FROM stesie/libv8-${V8VER}:latest
3+
4+
ARG PHPVER
5+
6+
ENV DEBIAN_FRONTEND=noninteractive
7+
ENV LC_ALL=C.UTF-8
8+
ENV NO_INTERACTION=1
9+
ENV REPORT_EXIT_STATUS=1
10+
11+
RUN apt-get update -q
12+
RUN apt-get install -y wget autoconf build-essential libxml2-dev libreadline-dev pkg-config
13+
14+
RUN wget https://www.php.net/distributions/php-${PHPVER}.tar.gz && \
15+
tar xzf php-${PHPVER}.tar.gz
16+
ADD . /php-${PHPVER}/ext/v8js
17+
WORKDIR /php-${PHPVER}
18+
19+
RUN ./buildconf --force
20+
RUN ./configure --disable-all --with-readline --enable-cli --enable-json --enable-dom --enable-maintainer-zts --with-libxml --with-v8js=/opt/libv8-$V8VER/ CFLAGS="-fsanitize=address -g -O0" CXXFLAGS="-fsanitize=address -g -O0"
21+
RUN sed -e "s/^EXTRA_LIBS.*/& -lv8_libplatform/" -i Makefile
22+
RUN make -j5

Jenkinsfile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
pipeline {
2+
agent none
3+
stages {
4+
stage('BuildAndTest') {
5+
matrix {
6+
agent any
7+
axes {
8+
axis {
9+
name 'PHPVER'
10+
values '7.3.16', '7.4.4'
11+
}
12+
axis {
13+
name 'V8VER'
14+
values '7.9'
15+
}
16+
}
17+
stages {
18+
stage('Build') {
19+
steps {
20+
echo "Building w/ V8 ${V8VER}, PHP ${PHPVER} as Docker image ${BUILD_TAG}-${V8VER}-${PHPVER}"
21+
sh "docker build -f Dockerfile.jenkins --build-arg V8VER=${V8VER} --build-arg PHPVER=${PHPVER} -t ${BUILD_TAG}-${V8VER}-${PHPVER} ."
22+
}
23+
}
24+
stage('Test') {
25+
steps {
26+
echo "Running test on ${BUILD_TAG}-${V8VER}-${PHPVER}"
27+
sh "docker run --rm -t ${BUILD_TAG}-${V8VER}-${PHPVER} make test TESTS='ext/v8js/tests/*.phpt'"
28+
}
29+
}
30+
}
31+
}
32+
}
33+
}
34+
}

0 commit comments

Comments
 (0)