Skip to content

Commit 711721b

Browse files
committed
Add php-src-8.3.dockerfile for testing with php-src on GitHub Actions environment
1 parent c30b249 commit 711721b

3 files changed

Lines changed: 109 additions & 1 deletion

File tree

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
FROM --platform=linux/amd64 ubuntu:22.04
2+
RUN export DEBIAN_FRONTEND=noninteractive \
3+
&& apt update && apt install -y --no-install-recommends \
4+
software-properties-common \
5+
ca-certificates \
6+
wget \
7+
tar \
8+
git \
9+
pkg-config build-essential \
10+
libssl-dev \
11+
autoconf \
12+
gcc \
13+
make \
14+
curl \
15+
unzip \
16+
bison \
17+
re2c \
18+
locales \
19+
ldap-utils \
20+
openssl \
21+
slapd \
22+
language-pack-de \
23+
libgmp-dev \
24+
libicu-dev \
25+
libtidy-dev \
26+
libenchant-2-dev \
27+
libbz2-dev \
28+
libsasl2-dev \
29+
libxpm-dev \
30+
libzip-dev \
31+
libsqlite3-dev \
32+
libwebp-dev \
33+
libonig-dev \
34+
libkrb5-dev \
35+
libgssapi-krb5-2 \
36+
libcurl4-openssl-dev \
37+
libxml2-dev \
38+
libxslt1-dev \
39+
libpq-dev \
40+
libreadline-dev \
41+
libldap2-dev \
42+
libsodium-dev \
43+
libargon2-dev \
44+
libmm-dev \
45+
libsnmp-dev \
46+
postgresql \
47+
postgresql-contrib \
48+
snmpd \
49+
snmp-mibs-downloader \
50+
freetds-dev \
51+
unixodbc-dev \
52+
llvm \
53+
clang \
54+
dovecot-core \
55+
dovecot-pop3d \
56+
dovecot-imapd \
57+
sendmail \
58+
firebird-dev \
59+
liblmdb-dev \
60+
libtokyocabinet-dev \
61+
libdb-dev \
62+
libqdbm-dev \
63+
libjpeg-dev \
64+
libpng-dev \
65+
libfreetype6-dev \
66+
&& apt -y clean \
67+
&& rm -rf /var/lib/apt/lists/*
68+
RUN git clone --depth 1 --branch PHP-8.3 https://github.com/php/php-src.git
69+
RUN cd php-src; export CC=clang; export CXX=clang++; export CFLAGS="-DZEND_TRACK_ARENA_ALLOC"; ./buildconf --force; ./configure --enable-debug --enable-mbstring --with-openssl --with-curl; make -j$(/usr/bin/nproc); make TEST_PHP_ARGS=-j$(/usr/bin/nproc) test; make install
70+
COPY composer.json /composer.json
71+
COPY composer.lock /composer.lock
72+
COPY src /src
73+
COPY test /test
74+
RUN curl -sS https://getcomposer.org/installer | php; mv composer.phar /usr/local/bin/composer; chmod +x /usr/local/bin/composer
75+
RUN cd / && composer update
76+
#RUN composer test
77+
CMD [ "/sbin/init" ]

.github/workflows/php-src.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Test with php-src
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
schedule:
8+
- cron: '0 9 7,14,21,28 * *'
9+
10+
jobs:
11+
test:
12+
name: Test with php-src
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
php: [ '8.3' ]
17+
steps:
18+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
19+
- name: Run docker compose
20+
shell: bash
21+
run: |
22+
cp .github/workflows/php-src-${{ matrix.php }}.dockerfile Dockerfile
23+
docker compose up -d
24+
sleep 30
25+
26+
- name: Run testing
27+
shell: bash
28+
run: |
29+
sleep 30
30+
docker compose run web sh -c "cd / && composer test"

docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
version: '3.2'
22
services:
33
web:
4-
build: .
4+
build: .
5+
platform: linux/amd64

0 commit comments

Comments
 (0)