1ffe3c632Sopenharmony_ciFROM debian:jessie
2ffe3c632Sopenharmony_ci
3ffe3c632Sopenharmony_ci# Install dependencies.  We start with the basic ones require to build protoc
4ffe3c632Sopenharmony_ci# and the C++ build
5ffe3c632Sopenharmony_ciRUN apt-get update && apt-get install -y \
6ffe3c632Sopenharmony_ci  autoconf \
7ffe3c632Sopenharmony_ci  autotools-dev \
8ffe3c632Sopenharmony_ci  build-essential \
9ffe3c632Sopenharmony_ci  bzip2 \
10ffe3c632Sopenharmony_ci  ccache \
11ffe3c632Sopenharmony_ci  curl \
12ffe3c632Sopenharmony_ci  gcc \
13ffe3c632Sopenharmony_ci  git \
14ffe3c632Sopenharmony_ci  libc6 \
15ffe3c632Sopenharmony_ci  libc6-dbg \
16ffe3c632Sopenharmony_ci  libc6-dev \
17ffe3c632Sopenharmony_ci  libgtest-dev \
18ffe3c632Sopenharmony_ci  libtool \
19ffe3c632Sopenharmony_ci  make \
20ffe3c632Sopenharmony_ci  parallel \
21ffe3c632Sopenharmony_ci  time \
22ffe3c632Sopenharmony_ci  wget \
23ffe3c632Sopenharmony_ci  re2c \
24ffe3c632Sopenharmony_ci  sqlite3 \
25ffe3c632Sopenharmony_ci  libsqlite3-dev \
26ffe3c632Sopenharmony_ci  && apt-get clean
27ffe3c632Sopenharmony_ci
28ffe3c632Sopenharmony_ci# Install php dependencies
29ffe3c632Sopenharmony_ciRUN apt-get clean && apt-get update && apt-get install -y --force-yes \
30ffe3c632Sopenharmony_ci  php5 \
31ffe3c632Sopenharmony_ci  libcurl4-openssl-dev \
32ffe3c632Sopenharmony_ci  libgmp-dev \
33ffe3c632Sopenharmony_ci  libgmp3-dev \
34ffe3c632Sopenharmony_ci  libssl-dev \
35ffe3c632Sopenharmony_ci  libxml2-dev \
36ffe3c632Sopenharmony_ci  unzip \
37ffe3c632Sopenharmony_ci  zlib1g-dev \
38ffe3c632Sopenharmony_ci  pkg-config \
39ffe3c632Sopenharmony_ci  && apt-get clean
40ffe3c632Sopenharmony_ci
41ffe3c632Sopenharmony_ci# Install other dependencies
42ffe3c632Sopenharmony_ciRUN ln -sf /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h
43ffe3c632Sopenharmony_ciRUN wget http://ftp.gnu.org/gnu/bison/bison-2.6.4.tar.gz -O /var/local/bison-2.6.4.tar.gz
44ffe3c632Sopenharmony_ciRUN cd /var/local \
45ffe3c632Sopenharmony_ci  && tar -zxvf bison-2.6.4.tar.gz \
46ffe3c632Sopenharmony_ci  && cd /var/local/bison-2.6.4 \
47ffe3c632Sopenharmony_ci  && ./configure \
48ffe3c632Sopenharmony_ci  && make \
49ffe3c632Sopenharmony_ci  && make install
50ffe3c632Sopenharmony_ci
51ffe3c632Sopenharmony_ci# Install composer
52ffe3c632Sopenharmony_ciRUN curl -sS https://getcomposer.org/installer | php
53ffe3c632Sopenharmony_ciRUN mv composer.phar /usr/local/bin/composer
54ffe3c632Sopenharmony_ci
55ffe3c632Sopenharmony_ci# Download php source code
56ffe3c632Sopenharmony_ciRUN git clone https://github.com/php/php-src
57ffe3c632Sopenharmony_ci
58ffe3c632Sopenharmony_ci# php 5.5
59ffe3c632Sopenharmony_ciRUN cd php-src \
60ffe3c632Sopenharmony_ci  && git checkout PHP-5.5.38 \
61ffe3c632Sopenharmony_ci  && ./buildconf --force
62ffe3c632Sopenharmony_ciRUN cd php-src \
63ffe3c632Sopenharmony_ci  && ./configure \
64ffe3c632Sopenharmony_ci  --enable-bcmath \
65ffe3c632Sopenharmony_ci  --with-gmp \
66ffe3c632Sopenharmony_ci  --with-openssl \
67ffe3c632Sopenharmony_ci  --with-zlib \
68ffe3c632Sopenharmony_ci  --prefix=/usr/local/php-5.5 \
69ffe3c632Sopenharmony_ci  && make \
70ffe3c632Sopenharmony_ci  && make install \
71ffe3c632Sopenharmony_ci  && make clean
72ffe3c632Sopenharmony_ciRUN cd php-src \
73ffe3c632Sopenharmony_ci  && ./configure \
74ffe3c632Sopenharmony_ci  --enable-maintainer-zts \
75ffe3c632Sopenharmony_ci  --with-gmp \
76ffe3c632Sopenharmony_ci  --with-openssl \
77ffe3c632Sopenharmony_ci  --with-zlib \
78ffe3c632Sopenharmony_ci  --prefix=/usr/local/php-5.5-zts \
79ffe3c632Sopenharmony_ci  && make \
80ffe3c632Sopenharmony_ci  && make install \
81ffe3c632Sopenharmony_ci  && make clean
82ffe3c632Sopenharmony_ci
83ffe3c632Sopenharmony_ciRUN wget -O phpunit https://phar.phpunit.de/phpunit-4.phar \
84ffe3c632Sopenharmony_ci  && chmod +x phpunit \
85ffe3c632Sopenharmony_ci  && cp phpunit /usr/local/php-5.5/bin \
86ffe3c632Sopenharmony_ci  && mv phpunit /usr/local/php-5.5-zts/bin
87ffe3c632Sopenharmony_ci
88ffe3c632Sopenharmony_ci# php 5.6
89ffe3c632Sopenharmony_ciRUN cd php-src \
90ffe3c632Sopenharmony_ci  && git checkout PHP-5.6.39 \
91ffe3c632Sopenharmony_ci  && ./buildconf --force
92ffe3c632Sopenharmony_ciRUN cd php-src \
93ffe3c632Sopenharmony_ci  && ./configure \
94ffe3c632Sopenharmony_ci  --enable-bcmath \
95ffe3c632Sopenharmony_ci  --with-gmp \
96ffe3c632Sopenharmony_ci  --with-openssl \
97ffe3c632Sopenharmony_ci  --with-zlib \
98ffe3c632Sopenharmony_ci  --prefix=/usr/local/php-5.6 \
99ffe3c632Sopenharmony_ci  && make \
100ffe3c632Sopenharmony_ci  && make install \
101ffe3c632Sopenharmony_ci  && make clean
102ffe3c632Sopenharmony_ciRUN cd php-src \
103ffe3c632Sopenharmony_ci  && ./configure \
104ffe3c632Sopenharmony_ci  --enable-maintainer-zts \
105ffe3c632Sopenharmony_ci  --with-gmp \
106ffe3c632Sopenharmony_ci  --with-openssl \
107ffe3c632Sopenharmony_ci  --with-zlib \
108ffe3c632Sopenharmony_ci  --prefix=/usr/local/php-5.6-zts \
109ffe3c632Sopenharmony_ci  && make \
110ffe3c632Sopenharmony_ci  && make install \
111ffe3c632Sopenharmony_ci  && make clean
112ffe3c632Sopenharmony_ci
113ffe3c632Sopenharmony_ciRUN wget -O phpunit https://phar.phpunit.de/phpunit-5.phar \
114ffe3c632Sopenharmony_ci  && chmod +x phpunit \
115ffe3c632Sopenharmony_ci  && cp phpunit /usr/local/php-5.6/bin \
116ffe3c632Sopenharmony_ci  && mv phpunit /usr/local/php-5.6-zts/bin
117ffe3c632Sopenharmony_ci
118ffe3c632Sopenharmony_ci# php 7.0
119ffe3c632Sopenharmony_ciRUN cd php-src \
120ffe3c632Sopenharmony_ci  && git checkout PHP-7.0.33 \
121ffe3c632Sopenharmony_ci  && ./buildconf --force
122ffe3c632Sopenharmony_ciRUN cd php-src \
123ffe3c632Sopenharmony_ci  && ./configure \
124ffe3c632Sopenharmony_ci  --enable-bcmath \
125ffe3c632Sopenharmony_ci  --with-gmp \
126ffe3c632Sopenharmony_ci  --with-openssl \
127ffe3c632Sopenharmony_ci  --with-zlib \
128ffe3c632Sopenharmony_ci  --prefix=/usr/local/php-7.0 \
129ffe3c632Sopenharmony_ci  && make \
130ffe3c632Sopenharmony_ci  && make install \
131ffe3c632Sopenharmony_ci  && make clean
132ffe3c632Sopenharmony_ciRUN cd php-src \
133ffe3c632Sopenharmony_ci  && ./configure \
134ffe3c632Sopenharmony_ci  --enable-maintainer-zts \
135ffe3c632Sopenharmony_ci  --with-gmp \
136ffe3c632Sopenharmony_ci  --with-openssl \
137ffe3c632Sopenharmony_ci  --with-zlib \
138ffe3c632Sopenharmony_ci  --prefix=/usr/local/php-7.0-zts \
139ffe3c632Sopenharmony_ci  && make \
140ffe3c632Sopenharmony_ci  && make install \
141ffe3c632Sopenharmony_ci  && make clean
142ffe3c632Sopenharmony_ci
143ffe3c632Sopenharmony_ciRUN wget -O phpunit https://phar.phpunit.de/phpunit-6.phar \
144ffe3c632Sopenharmony_ci  && chmod +x phpunit \
145ffe3c632Sopenharmony_ci  && cp phpunit /usr/local/php-7.0/bin \
146ffe3c632Sopenharmony_ci  && mv phpunit /usr/local/php-7.0-zts/bin
147ffe3c632Sopenharmony_ci
148ffe3c632Sopenharmony_ci# php 7.1
149ffe3c632Sopenharmony_ciRUN cd php-src \
150ffe3c632Sopenharmony_ci  && git checkout PHP-7.1.25 \
151ffe3c632Sopenharmony_ci  && ./buildconf --force
152ffe3c632Sopenharmony_ciRUN cd php-src \
153ffe3c632Sopenharmony_ci  && ./configure \
154ffe3c632Sopenharmony_ci  --enable-bcmath \
155ffe3c632Sopenharmony_ci  --with-gmp \
156ffe3c632Sopenharmony_ci  --with-openssl \
157ffe3c632Sopenharmony_ci  --with-zlib \
158ffe3c632Sopenharmony_ci  --prefix=/usr/local/php-7.1 \
159ffe3c632Sopenharmony_ci  && make \
160ffe3c632Sopenharmony_ci  && make install \
161ffe3c632Sopenharmony_ci  && make clean
162ffe3c632Sopenharmony_ciRUN cd php-src \
163ffe3c632Sopenharmony_ci  && ./configure \
164ffe3c632Sopenharmony_ci  --enable-maintainer-zts \
165ffe3c632Sopenharmony_ci  --with-gmp \
166ffe3c632Sopenharmony_ci  --with-openssl \
167ffe3c632Sopenharmony_ci  --with-zlib \
168ffe3c632Sopenharmony_ci  --prefix=/usr/local/php-7.1-zts \
169ffe3c632Sopenharmony_ci  && make \
170ffe3c632Sopenharmony_ci  && make install \
171ffe3c632Sopenharmony_ci  && make clean
172ffe3c632Sopenharmony_ci
173ffe3c632Sopenharmony_ciRUN wget -O phpunit https://phar.phpunit.de/phpunit-7.phar \
174ffe3c632Sopenharmony_ci  && chmod +x phpunit \
175ffe3c632Sopenharmony_ci  && cp phpunit /usr/local/php-7.1/bin \
176ffe3c632Sopenharmony_ci  && mv phpunit /usr/local/php-7.1-zts/bin
177ffe3c632Sopenharmony_ci
178ffe3c632Sopenharmony_ci# php 7.2
179ffe3c632Sopenharmony_ciRUN cd php-src \
180ffe3c632Sopenharmony_ci  && git checkout PHP-7.2.13 \
181ffe3c632Sopenharmony_ci  && ./buildconf --force
182ffe3c632Sopenharmony_ciRUN cd php-src \
183ffe3c632Sopenharmony_ci  && ./configure \
184ffe3c632Sopenharmony_ci  --enable-bcmath \
185ffe3c632Sopenharmony_ci  --with-gmp \
186ffe3c632Sopenharmony_ci  --with-openssl \
187ffe3c632Sopenharmony_ci  --with-zlib \
188ffe3c632Sopenharmony_ci  --prefix=/usr/local/php-7.2 \
189ffe3c632Sopenharmony_ci  && make \
190ffe3c632Sopenharmony_ci  && make install \
191ffe3c632Sopenharmony_ci  && make clean
192ffe3c632Sopenharmony_ciRUN cd php-src \
193ffe3c632Sopenharmony_ci  && ./configure \
194ffe3c632Sopenharmony_ci  --enable-maintainer-zts \
195ffe3c632Sopenharmony_ci  --with-gmp \
196ffe3c632Sopenharmony_ci  --with-openssl \
197ffe3c632Sopenharmony_ci  --with-zlib \
198ffe3c632Sopenharmony_ci  --prefix=/usr/local/php-7.2-zts \
199ffe3c632Sopenharmony_ci  && make \
200ffe3c632Sopenharmony_ci  && make install \
201ffe3c632Sopenharmony_ci  && make clean
202ffe3c632Sopenharmony_ci
203ffe3c632Sopenharmony_ciRUN wget -O phpunit https://phar.phpunit.de/phpunit-7.phar \
204ffe3c632Sopenharmony_ci  && chmod +x phpunit \
205ffe3c632Sopenharmony_ci  && cp phpunit /usr/local/php-7.2/bin \
206ffe3c632Sopenharmony_ci  && mv phpunit /usr/local/php-7.2-zts/bin
207ffe3c632Sopenharmony_ci
208ffe3c632Sopenharmony_ci# php 7.3
209ffe3c632Sopenharmony_ciRUN cd php-src \
210ffe3c632Sopenharmony_ci  && git checkout PHP-7.3.0 \
211ffe3c632Sopenharmony_ci  && ./buildconf --force
212ffe3c632Sopenharmony_ciRUN cd php-src \
213ffe3c632Sopenharmony_ci  && ./configure \
214ffe3c632Sopenharmony_ci  --enable-bcmath \
215ffe3c632Sopenharmony_ci  --with-gmp \
216ffe3c632Sopenharmony_ci  --with-openssl \
217ffe3c632Sopenharmony_ci  --with-zlib \
218ffe3c632Sopenharmony_ci  --prefix=/usr/local/php-7.3 \
219ffe3c632Sopenharmony_ci  && make \
220ffe3c632Sopenharmony_ci  && make install \
221ffe3c632Sopenharmony_ci  && make clean
222ffe3c632Sopenharmony_ciRUN cd php-src \
223ffe3c632Sopenharmony_ci  && ./configure \
224ffe3c632Sopenharmony_ci  --enable-maintainer-zts \
225ffe3c632Sopenharmony_ci  --with-gmp \
226ffe3c632Sopenharmony_ci  --with-openssl \
227ffe3c632Sopenharmony_ci  --with-zlib \
228ffe3c632Sopenharmony_ci  --prefix=/usr/local/php-7.3-zts \
229ffe3c632Sopenharmony_ci  && make \
230ffe3c632Sopenharmony_ci  && make install \
231ffe3c632Sopenharmony_ci  && make clean
232ffe3c632Sopenharmony_ci
233ffe3c632Sopenharmony_ciRUN wget -O phpunit https://phar.phpunit.de/phpunit-7.phar \
234ffe3c632Sopenharmony_ci  && chmod +x phpunit \
235ffe3c632Sopenharmony_ci  && cp phpunit /usr/local/php-7.3/bin \
236ffe3c632Sopenharmony_ci  && mv phpunit /usr/local/php-7.3-zts/bin
237ffe3c632Sopenharmony_ci
238ffe3c632Sopenharmony_ci# php 7.4
239ffe3c632Sopenharmony_ciRUN wget https://ftp.gnu.org/gnu/bison/bison-3.0.1.tar.gz -O /var/local/bison-3.0.1.tar.gz
240ffe3c632Sopenharmony_ciRUN cd /var/local \
241ffe3c632Sopenharmony_ci  && tar -zxvf bison-3.0.1.tar.gz \
242ffe3c632Sopenharmony_ci  && cd /var/local/bison-3.0.1 \
243ffe3c632Sopenharmony_ci  && ./configure \
244ffe3c632Sopenharmony_ci  && make \
245ffe3c632Sopenharmony_ci  && make install
246ffe3c632Sopenharmony_ci
247ffe3c632Sopenharmony_ciRUN wget https://github.com/php/php-src/archive/php-7.4.0.tar.gz -O /var/local/php-7.4.0.tar.gz
248ffe3c632Sopenharmony_ci
249ffe3c632Sopenharmony_ciRUN cd /var/local \
250ffe3c632Sopenharmony_ci  && tar -zxvf php-7.4.0.tar.gz
251ffe3c632Sopenharmony_ci
252ffe3c632Sopenharmony_ciRUN cd /var/local/php-src-php-7.4.0 \
253ffe3c632Sopenharmony_ci  && ./buildconf --force \
254ffe3c632Sopenharmony_ci  && ./configure \
255ffe3c632Sopenharmony_ci  --enable-bcmath \
256ffe3c632Sopenharmony_ci  --with-gmp \
257ffe3c632Sopenharmony_ci  --with-openssl \
258ffe3c632Sopenharmony_ci  --with-zlib \
259ffe3c632Sopenharmony_ci  --prefix=/usr/local/php-7.4 \
260ffe3c632Sopenharmony_ci  && make \
261ffe3c632Sopenharmony_ci  && make install \
262ffe3c632Sopenharmony_ci  && make clean
263ffe3c632Sopenharmony_ciRUN cd /var/local/php-src-php-7.4.0 \
264ffe3c632Sopenharmony_ci  && ./buildconf --force \
265ffe3c632Sopenharmony_ci  && ./configure \
266ffe3c632Sopenharmony_ci  --enable-maintainer-zts \
267ffe3c632Sopenharmony_ci  --with-gmp \
268ffe3c632Sopenharmony_ci  --with-openssl \
269ffe3c632Sopenharmony_ci  --with-zlib \
270ffe3c632Sopenharmony_ci  --prefix=/usr/local/php-7.4-zts \
271ffe3c632Sopenharmony_ci  && make \
272ffe3c632Sopenharmony_ci  && make install \
273ffe3c632Sopenharmony_ci  && make clean
274ffe3c632Sopenharmony_ci
275ffe3c632Sopenharmony_ciRUN wget -O phpunit https://phar.phpunit.de/phpunit-8.phar \
276ffe3c632Sopenharmony_ci  && chmod +x phpunit \
277ffe3c632Sopenharmony_ci  && cp phpunit /usr/local/php-7.4/bin \
278ffe3c632Sopenharmony_ci  && mv phpunit /usr/local/php-7.4-zts/bin
279ffe3c632Sopenharmony_ci
280ffe3c632Sopenharmony_ci# Install php dependencies
281ffe3c632Sopenharmony_ciRUN apt-get clean && apt-get update && apt-get install -y --force-yes \
282ffe3c632Sopenharmony_ci  valgrind \
283ffe3c632Sopenharmony_ci  && apt-get clean
284