Skip to content

Commit 3449a6f

Browse files
committed
Run test on CI
1 parent d36109b commit 3449a6f

File tree

2 files changed

+3
-242
lines changed

2 files changed

+3
-242
lines changed

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

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,10 @@ runs:
1515
- shell: bash
1616
run: |
1717
set -x
18-
export MYSQL_TEST_USER=root
19-
export MYSQL_TEST_PASSWD=root
20-
if [[ -z "$PDO_MYSQL_TEST_DSN" ]]; then
21-
export PDO_MYSQL_TEST_DSN="mysql:host=localhost;dbname=test"
22-
fi
23-
export PDO_MYSQL_TEST_USER=root
24-
export PDO_MYSQL_TEST_PASS=root
25-
export PDO_DBLIB_TEST_DSN="dblib:host=127.0.0.1;dbname=master;version=7.0"
26-
export PDO_DBLIB_TEST_USER="pdo_test"
27-
export PDO_DBLIB_TEST_PASS="password"
28-
export PHP_OCI8_TEST_USER="system"
29-
export PHP_OCI8_TEST_PASS="pass"
30-
export PHP_OCI8_TEST_DB="localhost/XEPDB1"
31-
export PDO_OCI_TEST_USER="system"
32-
export PDO_OCI_TEST_PASS="pass"
33-
export PDO_OCI_TEST_DSN="oci:dbname=localhost/XEPDB1;charset=AL32UTF8"
3418
export PGSQL_TEST_CONNSTR="host=localhost dbname=test port=5432 user=postgres password=postgres"
3519
if [[ -z "$PDO_PGSQL_TEST_DSN" ]]; then
3620
export PDO_PGSQL_TEST_DSN="pgsql:host=localhost port=5432 dbname=test user=postgres password=postgres"
3721
fi
38-
export ODBC_TEST_USER="odbc_test"
39-
export ODBC_TEST_PASS="password"
40-
export ODBC_TEST_DSN="Driver={ODBC Driver 17 for SQL Server};Server=127.0.0.1;Database=odbc;uid=$ODBC_TEST_USER;pwd=$ODBC_TEST_PASS"
41-
export PDO_ODBC_TEST_DSN="odbc:Driver={ODBC Driver 17 for SQL Server};Server=127.0.0.1;Database=pdo_odbc;uid=$ODBC_TEST_USER;pwd=$ODBC_TEST_PASS"
4222
export SKIP_IO_CAPTURE_TESTS=1
4323
export STACK_LIMIT_DEFAULTS_CHECK=1
4424
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
@@ -50,4 +30,5 @@ runs:
5030
--offline \
5131
--show-diff \
5232
--show-slow 1000 \
53-
--set-timeout 120
33+
--set-timeout 120 \
34+
ext/pgsql/tests/pg_fetch_object_with_abstract_class.phpt

.github/workflows/push.yml

Lines changed: 1 addition & 221 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@ jobs:
4848
LINUX_X64:
4949
if: github.repository == 'php/php-src' || github.event_name == 'pull_request'
5050
services:
51-
mysql:
52-
image: mysql:8.3
53-
ports:
54-
- 3306:3306
55-
env:
56-
MYSQL_DATABASE: test
57-
MYSQL_ROOT_PASSWORD: root
5851
postgres:
5952
image: postgres
6053
ports:
@@ -133,217 +126,4 @@ jobs:
133126
${{ matrix.asan && '--asan -x' || '' }}
134127
- name: Verify generated files are up to date
135128
if: ${{ !matrix.asan }}
136-
uses: ./.github/actions/verify-generated-files
137-
LINUX_X32:
138-
if: github.repository == 'php/php-src' || github.event_name == 'pull_request'
139-
name: LINUX_X32_DEBUG_ZTS
140-
runs-on: ubuntu-latest
141-
container:
142-
image: ubuntu:22.04
143-
env:
144-
MYSQL_TEST_HOST: mysql
145-
PDO_MYSQL_TEST_DSN: mysql:host=mysql;dbname=test
146-
PDO_MYSQL_TEST_HOST: mysql
147-
services:
148-
mysql:
149-
image: mysql:8.3
150-
ports:
151-
- 3306:3306
152-
env:
153-
MYSQL_DATABASE: test
154-
MYSQL_ROOT_PASSWORD: root
155-
steps:
156-
- name: git checkout
157-
uses: actions/checkout@v5
158-
- name: apt
159-
uses: ./.github/actions/apt-x32
160-
- name: ccache
161-
uses: hendrikmuhs/ccache-action@v1.2
162-
with:
163-
key: "${{github.job}}-${{hashFiles('main/php_version.h')}}"
164-
append-timestamp: false
165-
save: ${{ github.event_name != 'pull_request' }}
166-
- name: ./configure
167-
uses: ./.github/actions/configure-x32
168-
with:
169-
configurationParameters: >-
170-
--enable-debug
171-
--enable-zts
172-
- name: make
173-
run: make -j$(/usr/bin/nproc) >/dev/null
174-
- name: make install
175-
uses: ./.github/actions/install-linux-x32
176-
- name: Test Tracing JIT
177-
uses: ./.github/actions/test-linux
178-
with:
179-
jitType: tracing
180-
runTestsParameters: >-
181-
-d zend_extension=opcache.so
182-
-d opcache.enable_cli=1
183-
MACOS_DEBUG_NTS:
184-
if: github.repository == 'php/php-src' || github.event_name == 'pull_request'
185-
runs-on: macos-14
186-
steps:
187-
- name: git checkout
188-
uses: actions/checkout@v5
189-
- name: brew
190-
uses: ./.github/actions/brew
191-
- name: ccache
192-
uses: hendrikmuhs/ccache-action@v1.2
193-
with:
194-
key: "${{github.job}}-${{hashFiles('main/php_version.h')}}"
195-
append-timestamp: false
196-
save: ${{ github.event_name != 'pull_request' }}
197-
- name: ./configure
198-
uses: ./.github/actions/configure-macos
199-
with:
200-
configurationParameters: --enable-debug --disable-zts
201-
- name: make
202-
run: |-
203-
export PATH="$(brew --prefix)/opt/bison/bin:$PATH"
204-
make -j$(sysctl -n hw.logicalcpu) >/dev/null
205-
- name: make install
206-
run: sudo make install
207-
- name: Test Tracing JIT
208-
uses: ./.github/actions/test-macos
209-
with:
210-
jitType: tracing
211-
runTestsParameters: >-
212-
-d zend_extension=opcache.so
213-
-d opcache.enable_cli=1
214-
-d opcache.protect_memory=1
215-
- name: Verify generated files are up to date
216-
uses: ./.github/actions/verify-generated-files
217-
WINDOWS:
218-
if: github.repository == 'php/php-src' || github.event_name == 'pull_request'
219-
name: WINDOWS_X64_ZTS
220-
runs-on: windows-2022
221-
env:
222-
PHP_BUILD_CACHE_BASE_DIR: C:\build-cache
223-
PHP_BUILD_OBJ_DIR: C:\obj
224-
PHP_BUILD_CACHE_SDK_DIR: C:\build-cache\sdk
225-
PHP_BUILD_SDK_BRANCH: php-sdk-2.3.0
226-
PHP_BUILD_CRT: vs16
227-
PLATFORM: x64
228-
THREAD_SAFE: "1"
229-
INTRINSICS: AVX2
230-
PARALLEL: -j2
231-
OPCACHE: "1"
232-
steps:
233-
- name: git config
234-
run: git config --global core.autocrlf false && git config --global core.eol lf
235-
- name: git checkout
236-
uses: actions/checkout@v5
237-
- name: Setup
238-
uses: ./.github/actions/setup-windows
239-
- name: Build
240-
run: .github/scripts/windows/build.bat
241-
- name: Test
242-
run: .github/scripts/windows/test.bat
243-
BENCHMARKING:
244-
name: BENCHMARKING
245-
if: github.repository == 'php/php-src' || github.event_name == 'pull_request'
246-
runs-on: ubuntu-22.04
247-
steps:
248-
- name: git checkout
249-
uses: actions/checkout@v5
250-
with:
251-
fetch-depth: 0
252-
- name: apt
253-
run: |
254-
set -x
255-
sudo apt-get update
256-
sudo apt-get install \
257-
bison \
258-
libgmp-dev \
259-
libonig-dev \
260-
libsqlite3-dev \
261-
openssl \
262-
re2c \
263-
valgrind
264-
- name: ccache
265-
uses: hendrikmuhs/ccache-action@v1.2
266-
with:
267-
key: "${{github.job}}-${{hashFiles('main/php_version.h')}}"
268-
append-timestamp: false
269-
save: ${{ github.event_name != 'pull_request' }}
270-
- name: ./configure
271-
run: |
272-
set -x
273-
./buildconf --force
274-
./configure \
275-
--disable-debug \
276-
--enable-mbstring \
277-
--enable-opcache \
278-
--enable-option-checking=fatal \
279-
--enable-sockets \
280-
--enable-werror \
281-
--prefix=/usr \
282-
--with-config-file-scan-dir=/etc/php.d \
283-
--with-gmp \
284-
--with-mysqli=mysqlnd \
285-
--with-openssl \
286-
--with-pdo-sqlite \
287-
--with-valgrind
288-
- name: make
289-
run: make -j$(/usr/bin/nproc) >/dev/null
290-
- name: make install
291-
run: |
292-
set -x
293-
sudo make install
294-
sudo mkdir -p /etc/php.d
295-
sudo chmod 777 /etc/php.d
296-
echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini
297-
echo zend_extension=opcache.so >> /etc/php.d/opcache.ini
298-
echo opcache.enable=1 >> /etc/php.d/opcache.ini
299-
echo opcache.enable_cli=1 >> /etc/php.d/opcache.ini
300-
- name: Setup
301-
run: |
302-
git config --global user.name "Benchmark"
303-
git config --global user.email "benchmark@php.net"
304-
sudo service mysql start
305-
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS wordpress"
306-
mysql -uroot -proot -e "CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'wordpress'; FLUSH PRIVILEGES;"
307-
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON *.* TO 'wordpress'@'localhost' WITH GRANT OPTION;"
308-
- name: git checkout benchmarking-data
309-
uses: actions/checkout@v5
310-
with:
311-
repository: php/benchmarking-data
312-
ssh-key: ${{ secrets.BENCHMARKING_DATA_DEPLOY_KEY }}
313-
path: benchmark/repos/data
314-
- name: Benchmark
315-
run: php benchmark/benchmark.php true
316-
- name: Store result
317-
if: github.event_name == 'push'
318-
run: |
319-
set -x
320-
cd benchmark/repos/data
321-
git pull --autostash
322-
if [ -e ".git/MERGE_HEAD" ]; then
323-
echo "Merging, can't proceed"
324-
exit 1
325-
fi
326-
git add .
327-
if git diff --cached --quiet; then
328-
exit 0
329-
fi
330-
git commit -m "Add result for ${{ github.repository }}@${{ github.sha }}"
331-
git push
332-
- name: Show diff
333-
if: github.event_name == 'pull_request'
334-
run: |-
335-
set -x
336-
php benchmark/generate_diff.php \
337-
${{ github.sha }} \
338-
$(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.sha }}) \
339-
> $GITHUB_STEP_SUMMARY
340-
FREEBSD:
341-
if: github.repository == 'php/php-src' || github.event_name == 'pull_request'
342-
name: FREEBSD
343-
runs-on: ubuntu-latest
344-
timeout-minutes: 50
345-
steps:
346-
- name: git checkout
347-
uses: actions/checkout@v5
348-
- name: FreeBSD
349-
uses: ./.github/actions/freebsd
129+
uses: ./.github/actions/verify-generated-files

0 commit comments

Comments
 (0)