Skip to content

Commit 0c37884

Browse files
committed
Migrate CI to GitHub actions
1 parent 05023a2 commit 0c37884

File tree

11 files changed

+520
-0
lines changed

11 files changed

+520
-0
lines changed

.github/actions/apt/action.yml

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

.github/actions/configure/action.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Configure build
2+
inputs:
3+
configurationParameters:
4+
default: ''
5+
required: false
6+
runs:
7+
using: composite
8+
steps:
9+
- shell: bash
10+
run: echo "::group::Running ./configure"
11+
- shell: bash
12+
run: |
13+
./buildconf --force
14+
./configure \
15+
--enable-option-checking=fatal \
16+
--prefix=/usr \
17+
--enable-phpdbg \
18+
--enable-fpm \
19+
--with-pdo-mysql=mysqlnd \
20+
--with-mysqli=mysqlnd \
21+
--with-pgsql \
22+
--with-pdo-pgsql \
23+
--with-pdo-sqlite \
24+
--enable-intl \
25+
--without-pear \
26+
--enable-gd \
27+
--with-jpeg \
28+
--with-webp \
29+
--with-freetype \
30+
--with-xpm \
31+
--enable-exif \
32+
--with-zip \
33+
--with-zlib \
34+
--with-zlib-dir=/usr \
35+
--enable-soap \
36+
--enable-xmlreader \
37+
--with-xsl \
38+
--with-tidy \
39+
--enable-sysvsem \
40+
--enable-sysvshm \
41+
--enable-shmop \
42+
--enable-pcntl \
43+
--with-readline \
44+
--enable-mbstring \
45+
--with-curl \
46+
--with-gettext \
47+
--enable-sockets \
48+
--with-bz2 \
49+
--with-openssl \
50+
--with-gmp \
51+
--enable-bcmath \
52+
--enable-calendar \
53+
--enable-ftp \
54+
--with-pspell=/usr \
55+
--with-enchant=/usr \
56+
--with-kerberos \
57+
--enable-sysvmsg \
58+
--with-ffi \
59+
--enable-zend-test \
60+
--with-ldap \
61+
--with-ldap-sasl \
62+
--with-password-argon2 \
63+
--with-mhash \
64+
--with-sodium \
65+
--enable-dba \
66+
--with-cdb \
67+
--enable-flatfile \
68+
--enable-inifile \
69+
--with-tcadb \
70+
--with-lmdb \
71+
--with-qdbm \
72+
--with-snmp \
73+
--with-unixODBC \
74+
--with-imap \
75+
--with-kerberos \
76+
--with-imap-ssl \
77+
--with-pdo-odbc=unixODBC,/usr \
78+
--with-pdo-firebird \
79+
--with-pdo-dblib \
80+
--with-pdo-oci=shared,instantclient,/opt/oracle/instantclient \
81+
--with-oci8=shared,instantclient,/opt/oracle/instantclient \
82+
--enable-werror \
83+
--with-config-file-path=/etc \
84+
--with-config-file-scan-dir=/etc/php.d \
85+
${{ inputs.configurationParameters }}
86+
- shell: bash
87+
run: echo "::endgroup::"

.github/actions/install/action.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Install build
2+
runs:
3+
using: composite
4+
steps:
5+
- shell: bash
6+
run: |
7+
set -e
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/linux-x64/action.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Linux x64
2+
inputs:
3+
configurationParameters:
4+
required: true
5+
runs:
6+
using: composite
7+
steps:
8+
- name: mssql
9+
uses: ./.github/actions/mssql
10+
- name: APT
11+
uses: ./.github/actions/apt
12+
- name: Configure Build
13+
uses: ./.github/actions/configure
14+
with:
15+
configurationParameters: ${{ inputs.configurationParameters }}
16+
- name: Make build
17+
uses: ./.github/actions/make
18+
- name: Install build
19+
uses: ./.github/actions/install
20+
- name: Setup
21+
uses: ./.github/actions/setup
22+
- name: Tests
23+
uses: ./.github/actions/tests
24+
with:
25+
extended: false

.github/actions/make/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: Make build
2+
runs:
3+
using: composite
4+
steps:
5+
- shell: bash
6+
run: make -j$(/usr/bin/nproc) >/dev/null

.github/actions/mssql/action.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Starting mssql container
2+
runs:
3+
using: composite
4+
steps:
5+
- shell: bash
6+
run: echo "::group::Starting mssql container"
7+
- shell: bash
8+
run: docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=<YourStrong@Passw0rd>" -p 1433:1433 --name sql1 -h sql1 -d mcr.microsoft.com/mssql/server:2019-CU8-ubuntu-16.04
9+
- shell: bash
10+
run: echo "::endgroup::"

.github/actions/setup/action.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: apt
2+
runs:
3+
using: composite
4+
steps:
5+
- name: Setup
6+
shell: bash
7+
run: |
8+
set -e
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+
- name: Configure slapd
21+
shell: sh
22+
run: ${{github.action_path}}/setup-slapd.sh
23+
24+
- name: Configure snmpd
25+
shell: bash
26+
run: |
27+
set -e
28+
sudo cp ext/snmp/tests/snmpd.conf /etc/snmp
29+
sudo cp ext/snmp/tests/bigtest /etc/snmp
30+
sudo service snmpd restart
31+
32+
- name: Configure IMAP
33+
shell: bash
34+
run: |
35+
set -e
36+
sudo groupadd -g 5000 vmail
37+
sudo useradd -m -d /var/vmail -s /bin/false -u 5000 -g vmail vmail
38+
sudo cp ext/imap/tests/setup/dovecot.conf /etc/dovecot/dovecot.conf
39+
sudo cp ext/imap/tests/setup/dovecotpass /etc/dovecot/dovecotpass
40+
sudo service dovecot restart

0 commit comments

Comments
 (0)