-
Notifications
You must be signed in to change notification settings - Fork 0
/
ci.sh
executable file
·38 lines (35 loc) · 995 Bytes
/
ci.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh -ex
if test "${TEST_EXTENSION}" != ""; then
cd "/ext"
phpize
./configure --with-php-config=$(which php-config)
make clean
make -j$(nproc)
TEST_PHP_ARGS="--show-diff -q" make test
fi
if test "${TEST_EXTENSION_VALGRIND}" != ""; then
if type "gcc-debug-php" > /dev/null 2>&1; then
cd "/ext"
gcc-debug-phpize
./configure --with-php-config=$(which gcc-debug-php-config)
make clean
make -j$(nproc)
TEST_PHP_ARGS="--show-diff -q -m" make test
else
echo "missing gcc-debug-php"
exit 1
fi
fi
if test "${TEST_EXTENSION_MSAN}" != ""; then
if type "clang-debug-php" > /dev/null 2>&1; then
cd "/ext"
clang-debug-phpize
CC=clang CXX=clang++ CFLAGS="-fsanitize=memory -DZEND_TRACK_ARENA_ALLOC" LDFLAGS="-fsanitize=memory" ./configure --with-php-config=$(which clang-debug-php-config)
make clean
make -j$(nproc)
TEST_PHP_ARGS="--show-diff -q --msan" make test
else
echo "missing clang-debug-php"
exit 1
fi
fi