0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-09-08 00:25:19 +00:00

run sanitize=address build on jenkins

This commit is contained in:
Stefan Siegl 2020-04-03 14:20:08 +02:00
parent e153ff1651
commit ac784c797a
No known key found for this signature in database
GPG Key ID: 73942AF5642F3DDA
3 changed files with 102 additions and 0 deletions

46
.dockerignore Normal file
View File

@ -0,0 +1,46 @@
*.lo
*.o
.deps
.libs
Dockerfile.tmp
Makefile
Makefile.fragments
Makefile.global
Makefile.objects
acinclude.m4
aclocal.m4
autom4te.cache/*
build/*
config.guess
config.h
config.h.in
*.log
config.nice
config.status
config.sub
configure
configure.in
configure.ac
*~
install-sh
libtool
ltmain.sh
missing
mkinstalldirs
modules/*
v8js.la
v8js-*.tgz
run-tests.php
.*.sw[poq]
tests/*.diff
tests/*.exp
tests/*.out
tests/*.php
tests/*.sh
tests/*.mem
.vagrant
tmp-php.ini
coverage_report/**

22
Dockerfile.jenkins Normal file
View File

@ -0,0 +1,22 @@
ARG V8VER
FROM stesie/libv8-${V8VER}:latest
ARG PHPVER
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 wget autoconf build-essential libxml2-dev libreadline-dev pkg-config
RUN wget https://www.php.net/distributions/php-${PHPVER}.tar.gz && \
tar xzf php-${PHPVER}.tar.gz
ADD . /php-${PHPVER}/ext/v8js
WORKDIR /php-${PHPVER}
RUN ./buildconf --force
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"
RUN sed -e "s/^EXTRA_LIBS.*/& -lv8_libplatform/" -i Makefile
RUN make -j5

34
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,34 @@
pipeline {
agent none
stages {
stage('BuildAndTest') {
matrix {
agent any
axes {
axis {
name 'PHPVER'
values '7.3.16', '7.4.4'
}
axis {
name 'V8VER'
values '7.9'
}
}
stages {
stage('Build') {
steps {
echo "Building w/ V8 ${V8VER}, PHP ${PHPVER} as Docker image ${BUILD_TAG}-${V8VER}-${PHPVER}"
sh "docker build -f Dockerfile.jenkins --build-arg V8VER=${V8VER} --build-arg PHPVER=${PHPVER} -t ${BUILD_TAG}-${V8VER}-${PHPVER} ."
}
}
stage('Test') {
steps {
echo "Running test on ${BUILD_TAG}-${V8VER}-${PHPVER}"
sh "docker run --rm -t ${BUILD_TAG}-${V8VER}-${PHPVER} make test TESTS='ext/v8js/tests/*.phpt'"
}
}
}
}
}
}
}