File tree Expand file tree Collapse file tree 5 files changed +71
-7
lines changed Expand file tree Collapse file tree 5 files changed +71
-7
lines changed Original file line number Diff line number Diff line change
1
+ name : ' Package'
2
+
3
+ on :
4
+ pull_request :
5
+
6
+ jobs :
7
+ package :
8
+ name : ' Package'
9
+ runs-on : ' ubuntu-20.04'
10
+ steps :
11
+ - name : ' Check out repository'
12
+ uses : ' actions/checkout@v2'
13
+ with :
14
+ path : ' php-rdkafka'
15
+
16
+ - name : ' Install dependencies'
17
+ run : ' sudo apt-get -y install php7.4-dev librdkafka-dev'
18
+
19
+ - name : ' Package and verify package'
20
+ run : ' ./php-rdkafka/.github/workflows/package/package.sh'
21
+
22
+ - name : ' Archive package'
23
+ uses : ' actions/upload-artifact@v2'
24
+ with :
25
+ path : ' php-rdkafka/rdkafka.tgz'
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ set -e
4
+
5
+ cd php-rdkafka
6
+
7
+ echo " Checking version consistency"
8
+
9
+ CODE_VERSION=" $( grep PHP_RDKAFKA_VERSION php_rdkafka.h| cut -d' "' -f2) "
10
+ PACKAGE_VERSION=" $( grep -m 1 ' <release>' package.xml| cut -d' >' -f2| cut -d' <' -f1) "
11
+
12
+ if ! [ " $CODE_VERSION " = " $PACKAGE_VERSION " ]; then
13
+ printf " Version in php_rdkafka.h does not match version in package.xml: '%s' vs '%s'" " $CODE_VERSION " " $PACKAGE_VERSION " >&2
14
+ exit 1
15
+ fi
16
+
17
+ echo " Packaging"
18
+
19
+ pecl package
20
+
21
+ echo " Installing package.xml"
22
+
23
+ mv " ./rdkafka-$PACKAGE_VERSION .tgz" rdkafka.tgz
24
+ sudo pecl install ./rdkafka.tgz
25
+
26
+ echo " Checking that all test files was included"
27
+
28
+ sudo pecl list-files rdkafka| grep ^test| sed ' s@.*/tests/@@' | sort > installed-test-files
29
+ find tests/ -type f| sed ' s@^tests/@@' | sort > repository-test-files
30
+
31
+ if ! diff -u repository-test-files installed-test-files; then
32
+ echo " Some test files are missing from package.xml (see diff above)" >&2
33
+ exit 1
34
+ fi
Original file line number Diff line number Diff line change 5
5
echo " Building php-rdkafka with PHP version:"
6
6
php --version
7
7
8
+ cd php-rdkafka
9
+
10
+ PACKAGE_VERSION=" $( grep -m 1 ' <release>' package.xml| cut -d' >' -f2| cut -d' <' -f1) "
11
+
12
+ pecl package
13
+
8
14
if [ $MEMORY_CHECK -eq 1 ]; then
9
15
PHP_RDKAFKA_CFLAGS=" -Wall -Werror -Wno-deprecated-declarations"
10
16
fi
11
17
12
- cd php-rdkafka
13
- phpize
14
- CFLAGS=" $PHP_RDKAFKA_CFLAGS " ./configure
15
- make
18
+ sudo CFLAGS=" $PHP_RDKAFKA_CFLAGS " pecl install " ./rdkafka-$PACKAGE_VERSION .tgz"
16
19
17
- echo " extension=$( pwd ) /modules/ rdkafka.so" | sudo tee /usr/local/etc/php/rdkafka.ini > /dev/null
20
+ echo " extension=rdkafka.so" | sudo tee /usr/local/etc/php/rdkafka.ini > /dev/null
Original file line number Diff line number Diff line change 4
4
5
5
cd php-rdkafka
6
6
7
- if [ $MEMORY_CHECK -eq 1 ]; then
7
+ if [ ${ MEMORY_CHECK:- 0} -eq 1 ]; then
8
8
echo " Enabling memory checking"
9
9
showmem=--show-mem
10
10
checkmem=-m
13
13
cp tests/test_env.php.sample tests/test_env.php
14
14
15
15
PHP=$( which php)
16
- REPORT_EXIT_STATUS=1 TEST_PHP_EXECUTABLE=" $PHP " " $PHP " run-tests.php -q $checkmem --show-diff $showmem
16
+ sudo REPORT_EXIT_STATUS=1 TEST_PHP_EXECUTABLE=" $PHP " " $PHP " /usr/local/lib/php/build/ run-tests.php -q $checkmem --show-diff $showmem
Original file line number Diff line number Diff line change 110
110
<file role =" test" name =" allow_null_payload.phpt" />
111
111
<file role =" test" name =" bug115.phpt" />
112
112
<file role =" test" name =" bug330.phpt" />
113
+ <file role =" test" name =" bug465.phpt" />
113
114
<file role =" test" name =" bug74.phpt" />
114
115
<file role =" test" name =" bug88.phpt" />
115
116
<file role =" test" name =" bugConfSetArgument.phpt" />
137
138
<file role =" test" name =" producev_opaque.phpt" />
138
139
<file role =" test" name =" rd_kafka_get_err_descs.phpt" />
139
140
<file role =" test" name =" test0.phpt" />
141
+ <file role =" test" name =" test_env.php.sample" />
140
142
<file role =" test" name =" topic_conf.phpt" />
141
143
<file role =" test" name =" topic_partition.phpt" />
142
144
</dir >
You can’t perform that action at this time.
0 commit comments