Skip to content

Commit 91ed5b0

Browse files
committed
Publish coverage on codecov
1 parent d95cab0 commit 91ed5b0

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

azure-pipelines.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ jobs:
7474
displayName: PHP 8.0 ZTS
7575
phpVersion: '8.0'
7676
zts: true
77+
publishCoverage: true
7778

7879
- template: azure-template.yml
7980
parameters:

test_funcs.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,17 @@ function prefix {
1919
}
2020

2121
function build_ext {
22-
local readonly version=$1 zts=$2 coverage=$2
22+
local readonly version=$1 zts=$2 coverage=$3
2323
local readonly prefix=$(prefix $1 $2)
24+
local cflags= cxxflags= ldflags=
2425
"$prefix"/bin/phpize
25-
./configure --with-php-config="$prefix/bin/php-config"
26+
if [[ $coverage == true ]]; then
27+
cflags=--coverage
28+
cxxflags=--coverage
29+
ldflags=--coverage
30+
fi
31+
CFLAGS="$cflags" CXXFLAGS="$cxxflags" LDFLAGS="$ldflags" \
32+
./configure --with-php-config="$prefix/bin/php-config"
2633
make -j $JOBS
2734
}
2835

0 commit comments

Comments
 (0)