Skip to content

Commit 41461cf

Browse files
committed
Migrate CI to GitHub actions
1 parent ef80dcb commit 41461cf

File tree

12 files changed

+631
-16
lines changed

12 files changed

+631
-16
lines changed

.github/actions/apt-x64/action.yml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: apt
2+
runs:
3+
using: composite
4+
steps:
5+
- shell: bash
6+
run: |
7+
set -x
8+
sudo apt-get update
9+
sudo apt-get install \
10+
bison \
11+
re2c \
12+
locales \
13+
ldap-utils \
14+
openssl \
15+
slapd \
16+
language-pack-de \
17+
libgmp-dev \
18+
libicu-dev \
19+
libtidy-dev \
20+
libenchant-dev \
21+
libaspell-dev \
22+
libpspell-dev \
23+
libsasl2-dev \
24+
libxpm-dev \
25+
libzip-dev \
26+
libsqlite3-dev \
27+
libwebp-dev \
28+
libonig-dev \
29+
libkrb5-dev \
30+
libgssapi-krb5-2 \
31+
libcurl4-openssl-dev \
32+
libxml2-dev \
33+
libxslt1-dev \
34+
libpq-dev \
35+
libreadline-dev \
36+
libldap2-dev \
37+
libsodium-dev \
38+
libargon2-0-dev \
39+
libmm-dev \
40+
libsnmp-dev \
41+
postgresql \
42+
postgresql-contrib \
43+
snmpd \
44+
snmp-mibs-downloader \
45+
freetds-dev \
46+
unixodbc-dev \
47+
llvm \
48+
libc-client-dev \
49+
dovecot-core \
50+
dovecot-pop3d \
51+
dovecot-imapd \
52+
sendmail \
53+
firebird-dev \
54+
liblmdb-dev \
55+
libtokyocabinet-dev \
56+
libdb-dev \
57+
libqdbm-dev \
58+
libjpeg-dev \
59+
libpng-dev \
60+
libfreetype6-dev
61+
mkdir /opt/oracle
62+
wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip
63+
unzip instantclient-basiclite-linuxx64.zip
64+
wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-sdk-linuxx64.zip
65+
unzip instantclient-sdk-linuxx64.zip
66+
mv instantclient_*_* /opt/oracle/instantclient
67+
# Interferes with libldap2 headers.
68+
rm /opt/oracle/instantclient/sdk/include/ldap.h

.github/actions/brew/action.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: brew
2+
runs:
3+
using: composite
4+
steps:
5+
- shell: bash
6+
run: |
7+
set -x
8+
brew install \
9+
pkg-config \
10+
autoconf \
11+
bison \
12+
re2c
13+
brew install \
14+
openssl@1.1 \
15+
krb5 \
16+
bzip2 \
17+
enchant \
18+
libffi \
19+
libpng \
20+
webp \
21+
freetype \
22+
intltool \
23+
icu4c \
24+
libiconv \
25+
zlib \
26+
t1lib \
27+
gd \
28+
libzip \
29+
gmp \
30+
tidyp \
31+
libxml2 \
32+
libxslt \
33+
postgresql
34+
brew link icu4c gettext --force
+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: ./configure
2+
inputs:
3+
configurationParameters:
4+
default: ''
5+
required: false
6+
runs:
7+
using: composite
8+
steps:
9+
- shell: bash
10+
run: |
11+
set -x
12+
export PATH="/usr/local/opt/bison/bin:$PATH"
13+
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl@1.1/lib/pkgconfig"
14+
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/krb5/lib/pkgconfig"
15+
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libffi/lib/pkgconfig"
16+
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libxml2/lib/pkgconfig"
17+
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libxslt/lib/pkgconfig"
18+
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/zlib/lib/pkgconfig"
19+
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/icu4c/lib/pkgconfig"
20+
./buildconf --force
21+
./configure \
22+
--enable-option-checking=fatal \
23+
--prefix=/usr/local \
24+
--enable-fpm \
25+
--with-pdo-mysql=mysqlnd \
26+
--with-mysqli=mysqlnd \
27+
--with-pgsql=/usr/local/opt/libpq \
28+
--with-pdo-pgsql=/usr/local/opt/libpq \
29+
--with-pdo-sqlite \
30+
--without-pear \
31+
--enable-gd \
32+
--with-jpeg \
33+
--with-webp \
34+
--with-freetype \
35+
--enable-exif \
36+
--with-zip \
37+
--with-zlib \
38+
--enable-soap \
39+
--enable-xmlreader \
40+
--with-xsl \
41+
--with-tidy=/usr/local/opt/tidyp \
42+
--with-libxml \
43+
--enable-sysvsem \
44+
--enable-sysvshm \
45+
--enable-shmop \
46+
--enable-pcntl \
47+
--with-readline=/usr/local/opt/readline \
48+
--enable-mbstring \
49+
--with-curl \
50+
--with-gettext=/usr/local/opt/gettext \
51+
--enable-sockets \
52+
--with-bz2=/usr/local/opt/bzip2 \
53+
--with-openssl \
54+
--with-gmp=/usr/local/opt/gmp \
55+
--with-iconv=/usr/local/opt/libiconv \
56+
--enable-bcmath \
57+
--enable-calendar \
58+
--enable-ftp \
59+
--with-pspell=/usr/local/opt/aspell \
60+
--with-kerberos \
61+
--enable-sysvmsg \
62+
--with-ffi \
63+
--enable-zend-test \
64+
--enable-intl \
65+
--with-mhash \
66+
--with-sodium \
67+
--enable-dba \
68+
--enable-werror \
69+
--with-config-file-path=/etc \
70+
--with-config-file-scan-dir=/etc/php.d \
71+
${{ inputs.configurationParameters }}
+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: ./configure
2+
inputs:
3+
configurationParameters:
4+
default: ''
5+
required: false
6+
runs:
7+
using: composite
8+
steps:
9+
- shell: bash
10+
run: |
11+
set -x
12+
./buildconf --force
13+
./configure \
14+
--enable-option-checking=fatal \
15+
--prefix=/usr \
16+
--enable-phpdbg \
17+
--enable-fpm \
18+
--with-pdo-mysql=mysqlnd \
19+
--with-mysqli=mysqlnd \
20+
--with-pgsql \
21+
--with-pdo-pgsql \
22+
--with-pdo-sqlite \
23+
--enable-intl \
24+
--without-pear \
25+
--enable-gd \
26+
--with-jpeg \
27+
--with-webp \
28+
--with-freetype \
29+
--with-xpm \
30+
--enable-exif \
31+
--with-zip \
32+
--with-zlib \
33+
--with-zlib-dir=/usr \
34+
--enable-soap \
35+
--enable-xmlreader \
36+
--with-xsl \
37+
--with-tidy \
38+
--enable-sysvsem \
39+
--enable-sysvshm \
40+
--enable-shmop \
41+
--enable-pcntl \
42+
--with-readline \
43+
--enable-mbstring \
44+
--with-curl \
45+
--with-gettext \
46+
--enable-sockets \
47+
--with-bz2 \
48+
--with-openssl \
49+
--with-gmp \
50+
--enable-bcmath \
51+
--enable-calendar \
52+
--enable-ftp \
53+
--with-pspell=/usr \
54+
--with-enchant=/usr \
55+
--with-kerberos \
56+
--enable-sysvmsg \
57+
--with-ffi \
58+
--enable-zend-test \
59+
--with-ldap \
60+
--with-ldap-sasl \
61+
--with-password-argon2 \
62+
--with-mhash \
63+
--with-sodium \
64+
--enable-dba \
65+
--with-cdb \
66+
--enable-flatfile \
67+
--enable-inifile \
68+
--with-tcadb \
69+
--with-lmdb \
70+
--with-qdbm \
71+
--with-snmp \
72+
--with-unixODBC \
73+
--with-imap \
74+
--with-kerberos \
75+
--with-imap-ssl \
76+
--with-pdo-odbc=unixODBC,/usr \
77+
--with-pdo-oci=shared,instantclient,/opt/oracle/instantclient \
78+
--with-oci8=shared,instantclient,/opt/oracle/instantclient \
79+
--with-config-file-path=/etc \
80+
--with-config-file-scan-dir=/etc/php.d \
81+
${{ inputs.configurationParameters }}
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Install
2+
runs:
3+
using: composite
4+
steps:
5+
- shell: bash
6+
run: |
7+
set -x
8+
sudo make install
9+
sudo mkdir /etc/php.d
10+
sudo chmod 777 /etc/php.d
11+
echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini
12+
echo pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/pdo_mysql.ini
13+
echo opcache.enable_cli=1 >> /etc/php.d/opcache.ini
14+
echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini

.github/actions/mssql/action.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Create mssql container
2+
runs:
3+
using: composite
4+
steps:
5+
- shell: bash
6+
run: |
7+
set -x
8+
docker run \
9+
-e "ACCEPT_EULA=Y" \
10+
-e "SA_PASSWORD=<YourStrong@Passw0rd>" \
11+
-p 1433:1433 \
12+
--name sql1 \
13+
-h sql1 \
14+
-d mcr.microsoft.com/mssql/server:2019-CU8-ubuntu-16.04

.github/actions/setup-x64/action.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Setup
2+
runs:
3+
using: composite
4+
steps:
5+
- shell: bash
6+
run: |
7+
set -x
8+
9+
sudo service mysql start
10+
sudo service postgresql start
11+
sudo service slapd start
12+
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
13+
# Ensure local_infile tests can run.
14+
mysql -uroot -proot -e "SET GLOBAL local_infile = true"
15+
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
16+
sudo -u postgres psql -c "CREATE DATABASE test;"
17+
docker exec sql1 /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U SA -P "<YourStrong@Passw0rd>" -Q "create login pdo_test with password='password', check_policy=off; create user pdo_test for login pdo_test; grant alter, control to pdo_test;"
18+
sudo locale-gen de_DE
19+
20+
./.github/scripts/setup-slapd.sh
21+
22+
sudo cp ext/snmp/tests/snmpd.conf /etc/snmp
23+
sudo cp ext/snmp/tests/bigtest /etc/snmp
24+
sudo service snmpd restart
25+
26+
sudo groupadd -g 5000 vmail
27+
sudo useradd -m -d /var/vmail -s /bin/false -u 5000 -g vmail vmail
28+
sudo cp ext/imap/tests/setup/dovecot.conf /etc/dovecot/dovecot.conf
29+
sudo cp ext/imap/tests/setup/dovecotpass /etc/dovecot/dovecotpass
30+
sudo service dovecot restart

.github/actions/test-linux/action.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Test
2+
inputs:
3+
runTestsParameters:
4+
default: ''
5+
required: false
6+
runs:
7+
using: composite
8+
steps:
9+
- shell: bash
10+
run: |
11+
set -x
12+
export MYSQL_TEST_USER=root
13+
export MYSQL_TEST_PASSWD=root
14+
export PDO_MYSQL_TEST_DSN="mysql:host=localhost;dbname=test"
15+
export PDO_MYSQL_TEST_USER=root
16+
export PDO_MYSQL_TEST_PASS=root
17+
export PDO_DBLIB_TEST_DSN="dblib:host=127.0.0.1;dbname=master;version=7.0"
18+
export PDO_DBLIB_TEST_USER="pdo_test"
19+
export PDO_DBLIB_TEST_PASS="password"
20+
export SKIP_IO_CAPTURE_TESTS=1
21+
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
22+
-j$(/usr/bin/nproc) \
23+
-g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP \
24+
--offline \
25+
--show-diff \
26+
--show-slow 1000 \
27+
--set-timeout 120

.github/actions/test-macos/action.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Test
2+
inputs:
3+
runTestsParameters:
4+
default: ''
5+
required: false
6+
runs:
7+
using: composite
8+
steps:
9+
- shell: bash
10+
run: |
11+
set -x
12+
export SKIP_IO_CAPTURE_TESTS=1
13+
export CI_NO_IPV6=1
14+
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
15+
-j$(sysctl -n hw.ncpu) \
16+
-g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP \
17+
--offline \
18+
--show-diff \
19+
--show-slow 1000 \
20+
--set-timeout 120

0 commit comments

Comments
 (0)