Skip to content

Commit eb02f1d

Browse files
committed
Merge branch 'ci_test_oracle' into fix-60994-oracle
2 parents e1ef164 + bf4add4 commit eb02f1d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+2429
-1448
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@ runs:
5959
libpng-dev \
6060
libfreetype6-dev
6161
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
62+
wget -nv https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip
63+
unzip instantclient-basiclite-linuxx64.zip && rm instantclient-basiclite-linuxx64.zip
64+
wget -nv https://download.oracle.com/otn_software/linux/instantclient/instantclient-sdk-linuxx64.zip
65+
unzip instantclient-sdk-linuxx64.zip && rm instantclient-sdk-linuxx64.zip
6666
mv instantclient_*_* /opt/oracle/instantclient
6767
# Interferes with libldap2 headers.
6868
rm /opt/oracle/instantclient/sdk/include/ldap.h
69+
sudo sh -c 'echo /opt/oracle/instantclient >/etc/ld.so.conf.d/oracle-instantclient.conf && ldconfig'

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ runs:
1010
sudo chmod 777 /etc/php.d
1111
echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini
1212
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
13+
echo extension=oci8.so > /etc/php.d/oci8.ini
14+
echo extension=pdo_oci.so > /etc/php.d/pdo_oci.ini

.github/actions/mssql/action.yml renamed to .github/actions/setup-mssql/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Create mssql container
1+
name: Create MSSQL container
22
runs:
33
using: composite
44
steps:
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Create Oracle container
2+
runs:
3+
using: composite
4+
steps:
5+
- shell: bash
6+
run: |
7+
set -x
8+
docker run \
9+
-e "ORACLE_PASSWORD=pass" \
10+
-p 1521:1521 \
11+
--name oracle \
12+
-h oracle \
13+
-d gvenzl/oracle-xe:slim

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ runs:
1717
export PDO_DBLIB_TEST_DSN="dblib:host=127.0.0.1;dbname=master;version=7.0"
1818
export PDO_DBLIB_TEST_USER="pdo_test"
1919
export PDO_DBLIB_TEST_PASS="password"
20+
export PHP_OCI8_TEST_USER="system"
21+
export PHP_OCI8_TEST_PASS="pass"
22+
export PHP_OCI8_TEST_DB="localhost/XEPDB1"
23+
export PDO_OCI_TEST_USER="system"
24+
export PDO_OCI_TEST_PASS="pass"
25+
export PDO_OCI_TEST_DSN="oci:dbname=localhost/XEPDB1;charset=AL32UTF8"
2026
export SKIP_IO_CAPTURE_TESTS=1
2127
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
2228
-j$(/usr/bin/nproc) \

.github/nightly_matrix.php

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<?php
2+
3+
const BRANCHES = ['master', 'PHP-8.1', 'PHP-8.0'];
4+
5+
function get_branch_commit_cache_file_path(): string {
6+
return dirname(__DIR__) . '/branch-commit-cache.json';
7+
}
8+
9+
function get_branch_matrix(array $branches) {
10+
$result = array_map(function ($branch) {
11+
$branch_key = strtoupper(str_replace('.', '', $branch));
12+
return [
13+
'name' => $branch_key,
14+
'ref' => $branch,
15+
];
16+
}, $branches);
17+
18+
return $result;
19+
}
20+
21+
function get_branches() {
22+
$branch_commit_cache_file = get_branch_commit_cache_file_path();
23+
$branch_commit_map = [];
24+
if (file_exists($branch_commit_cache_file)) {
25+
$branch_commit_map = json_decode(file_get_contents($branch_commit_cache_file), JSON_THROW_ON_ERROR);
26+
}
27+
28+
$changed_branches = [];
29+
foreach (BRANCHES as $branch) {
30+
$previous_commit_hash = $branch_commit_map[$branch] ?? null;
31+
$current_commit_hash = trim(shell_exec('git rev-parse origin/' . $branch));
32+
33+
if ($previous_commit_hash !== $current_commit_hash) {
34+
$changed_branches[] = $branch;
35+
}
36+
37+
$branch_commit_map[$branch] = $current_commit_hash;
38+
}
39+
40+
file_put_contents($branch_commit_cache_file, json_encode($branch_commit_map));
41+
42+
return get_branch_matrix($changed_branches);
43+
}
44+
45+
function get_asan_matrix(array $branches) {
46+
$jobs = [];
47+
foreach ($branches as $branch) {
48+
$jobs[] = [
49+
'name' => '_ASAN_UBSAN',
50+
'branch' => $branch,
51+
'debug' => true,
52+
'zts' => true,
53+
'configuration_parameters' => "CFLAGS='-fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC' LDFLAGS='-fsanitize=undefined,address'",
54+
'run_tests_parameters' => '--asan',
55+
];
56+
}
57+
return $jobs;
58+
}
59+
60+
$trigger = $argv[1] ?? 'schedule';
61+
$attempt = (int) ($argv[2] ?? 1);
62+
$discard_cache = ($trigger === 'schedule' && $attempt !== 1) || $trigger === 'workflow_dispatch';
63+
if ($discard_cache) {
64+
@unlink(get_branch_commit_cache_file_path());
65+
}
66+
67+
$branches = get_branches();
68+
$asan_matrix = get_asan_matrix($branches);
69+
70+
echo '::set-output name=branches::' . json_encode($branches, JSON_UNESCAPED_SLASHES) . "\n";
71+
echo '::set-output name=asan-matrix::' . json_encode($asan_matrix, JSON_UNESCAPED_SLASHES) . "\n";

.github/workflows/nightly.yml

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
name: Nightly
2+
on:
3+
schedule:
4+
- cron: "0 1 * * *"
5+
workflow_dispatch: ~
6+
jobs:
7+
GENERATE_MATRIX:
8+
name: Generate Matrix
9+
if: github.repository_owner == 'php' || github.event_name == 'workflow_dispatch'
10+
runs-on: ubuntu-latest
11+
outputs:
12+
branches: ${{ steps.set-matrix.outputs.branches }}
13+
asan-matrix: ${{ steps.set-matrix.outputs.asan-matrix }}
14+
steps:
15+
- uses: actions/checkout@v2
16+
with:
17+
# Set fetch-depth to 0 to clone the full repository
18+
# including all branches. This is required to find
19+
# the correct commit hashes.
20+
fetch-depth: 0
21+
- name: Grab the commit mapping
22+
uses: actions/cache@v3
23+
with:
24+
path: branch-commit-cache.json
25+
# The cache key needs to change every time for the
26+
# cache to be updated after this job finishes.
27+
key: nightly-${{ github.run_id }}-${{ github.run_attempt }}
28+
restore-keys: |
29+
nightly-
30+
- name: Generate Matrix
31+
id: set-matrix
32+
run: php .github/nightly_matrix.php "${{ github.event_name }}" "${{ github.run_attempt }}"
33+
LINUX_X64:
34+
needs: GENERATE_MATRIX
35+
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
36+
strategy:
37+
fail-fast: false
38+
matrix:
39+
branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
40+
debug: [true, false]
41+
zts: [true, false]
42+
include: ${{ fromJson(needs.GENERATE_MATRIX.outputs.asan-matrix) }}
43+
name: "${{ matrix.branch.name }}_LINUX_X64${{ matrix.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
44+
runs-on: ubuntu-20.04
45+
steps:
46+
- name: git checkout
47+
uses: actions/checkout@v2
48+
with:
49+
ref: ${{ matrix.branch.ref }}
50+
- name: Create MSSQL container
51+
uses: ./.github/actions/setup-mssql
52+
- name: Create Oracle container
53+
uses: ./.github/actions/setup-oracle
54+
- name: apt
55+
uses: ./.github/actions/apt-x64
56+
- name: ./configure
57+
uses: ./.github/actions/configure-x64
58+
with:
59+
configurationParameters: >-
60+
${{ matrix.configuration_parameters }}
61+
--${{ matrix.debug && 'enable' || 'disable' }}-debug
62+
--${{ matrix.zts && 'enable' || 'disable' }}-zts
63+
- name: make
64+
run: make -j$(/usr/bin/nproc) >/dev/null
65+
- name: make install
66+
uses: ./.github/actions/install-linux
67+
- name: Setup
68+
uses: ./.github/actions/setup-x64
69+
- name: Test
70+
uses: ./.github/actions/test-linux
71+
with:
72+
runTestsParameters: >-
73+
${{ matrix.run_tests_parameters }}
74+
- name: Test Tracing JIT
75+
uses: ./.github/actions/test-linux
76+
with:
77+
runTestsParameters: >-
78+
${{ matrix.run_tests_parameters }}
79+
-d zend_extension=opcache.so
80+
-d opcache.enable_cli=1
81+
-d opcache.jit_buffer_size=16M
82+
- name: Test OpCache
83+
uses: ./.github/actions/test-linux
84+
with:
85+
runTestsParameters: >-
86+
${{ matrix.run_tests_parameters }}
87+
-d zend_extension=opcache.so
88+
-d opcache.enable_cli=1
89+
- name: Test Function JIT
90+
uses: ./.github/actions/test-linux
91+
with:
92+
runTestsParameters: >-
93+
${{ matrix.run_tests_parameters }}
94+
-d zend_extension=opcache.so
95+
-d opcache.enable_cli=1
96+
-d opcache.jit_buffer_size=16M
97+
-d opcache.jit=1205
98+
MACOS:
99+
needs: GENERATE_MATRIX
100+
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
101+
strategy:
102+
fail-fast: false
103+
matrix:
104+
branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
105+
debug: [true, false]
106+
zts: [true, false]
107+
name: "${{ matrix.branch.name }}_MACOS_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
108+
runs-on: macos-10.15
109+
steps:
110+
- name: git checkout
111+
uses: actions/checkout@v2
112+
with:
113+
ref: ${{ matrix.branch.ref }}
114+
- name: brew
115+
uses: ./.github/actions/brew
116+
- name: ./configure
117+
uses: ./.github/actions/configure-macos
118+
with:
119+
configurationParameters: >-
120+
--${{ matrix.debug && 'enable' || 'disable' }}-debug
121+
--${{ matrix.zts && 'enable' || 'disable' }}-zts
122+
- name: make
123+
run: |-
124+
export PATH="/usr/local/opt/bison/bin:$PATH"
125+
make -j$(sysctl -n hw.logicalcpu) >/dev/null
126+
- name: make install
127+
run: sudo make install
128+
- name: Test
129+
uses: ./.github/actions/test-macos
130+
- name: Test Tracing JIT
131+
uses: ./.github/actions/test-macos
132+
with:
133+
runTestsParameters: >-
134+
-d zend_extension=opcache.so
135+
-d opcache.enable_cli=1
136+
-d opcache.protect_memory=1
137+
-d opcache.jit_buffer_size=16M
138+
- name: Test OpCache
139+
uses: ./.github/actions/test-macos
140+
with:
141+
runTestsParameters: >-
142+
-d zend_extension=opcache.so
143+
-d opcache.enable_cli=1
144+
-d opcache.protect_memory=1
145+
- name: Test Function JIT
146+
uses: ./.github/actions/test-macos
147+
with:
148+
runTestsParameters: >-
149+
-d zend_extension=opcache.so
150+
-d opcache.enable_cli=1
151+
-d opcache.protect_memory=1
152+
-d opcache.jit_buffer_size=16M
153+
-d opcache.jit=1205

.github/workflows/push.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ jobs:
3232
steps:
3333
- name: git checkout
3434
uses: actions/checkout@v2
35-
- name: Create mssql container
36-
uses: ./.github/actions/mssql
35+
- name: Create MSSQL container
36+
uses: ./.github/actions/setup-mssql
37+
- name: Create Oracle container
38+
uses: ./.github/actions/setup-oracle
3739
- name: apt
3840
uses: ./.github/actions/apt-x64
3941
- name: ./configure
@@ -53,7 +55,10 @@ jobs:
5355
- name: Test Tracing JIT
5456
uses: ./.github/actions/test-linux
5557
with:
56-
runTestsParameters: -d zend_extension=opcache.so -d opcache.jit_buffer_size=16M
58+
runTestsParameters: >-
59+
-d zend_extension=opcache.so
60+
-d opcache.enable_cli=1
61+
-d opcache.jit_buffer_size=16M
5762
MACOS_DEBUG_NTS:
5863
runs-on: macos-10.15
5964
steps:
@@ -78,5 +83,6 @@ jobs:
7883
with:
7984
runTestsParameters: >-
8085
-d zend_extension=opcache.so
86+
-d opcache.enable_cli=1
8187
-d opcache.protect_memory=1
8288
-d opcache.jit_buffer_size=16M

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,11 @@ tmp-php.ini
274274
/Zend/zend_dtrace_gen.h
275275
/Zend/zend_dtrace_gen.h.bak
276276

277+
# ------------------------------------------------------------------------------
278+
# GitHub actions cache
279+
# ------------------------------------------------------------------------------
280+
/branch-commit-cache.json
281+
277282
# ------------------------------------------------------------------------------
278283
# Special cases to invert previous ignore patterns
279284
# ------------------------------------------------------------------------------

NEWS

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,45 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3-
?? ??? 2022, PHP 8.0.18
3+
?? ??? 2022, PHP 8.0.19
4+
5+
- Core:
6+
. Fixed bug GH-8289 (Exceptions thrown within a yielded from iterator are
7+
not rethrown into the generator). (Bob)
8+
9+
- Date:
10+
. Fixed bug GH-7979 (DatePeriod iterator advances when checking if valid).
11+
(Derick, Cody Mann)
12+
13+
- FPM:
14+
. Fixed bug #76003 (FPM /status reports wrong number of active processe).
15+
(Jakub Zelenka)
16+
17+
- MySQLi:
18+
. Fixed bug GH-8267 (MySQLi uses unsupported format specifier on Windows).
19+
(cmb)
20+
21+
- SPL:
22+
. Fixed bug GH-8366 (ArrayIterator may leak when calling __construct()).
23+
(cmb)
24+
25+
- Streams:
26+
. Fixed php://temp does not preserve file-position when switched to temporary
27+
file. (Bernd Holzmüller)
28+
29+
14 Apr 2022, PHP 8.0.18
430

531
- Core:
632
. Fixed freeing of internal attribute arguments. (Bob)
733
. Fixed bug GH-8070 (memory leak of internal function attribute hash).
834
(Tim Düsterhus)
935
. Fixed bug GH-8160 (ZTS support on Alpine is broken). (Michael Voříšek)
36+
. Fixed potential race condition during resource ID allocation. (ryancaicse)
37+
38+
- Filter:
39+
. Fixed signedness confusion in php_filter_validate_domain(). (cmb)
40+
41+
- Hash:
42+
. Fixed bug #81714 (segfault when serializing finalized HashContext). (cmb)
1043

1144
- Intl:
1245
. Fixed bug GH-8142 (Compilation error on cygwin). (David Carlier)
@@ -22,6 +55,10 @@ PHP NEWS
2255
- Pcntl:
2356
. Fixed bug GH-8142 (Compilation error on cygwin). (David Carlier)
2457

58+
- PgSQL:
59+
. Fixed result_type related stack corruption on LLP64 architectures. (cmb)
60+
. Fixed bug GH-8253 (pg_insert() fails for references). (cmb)
61+
2562
- Sockets:
2663
. Fixed Solaris builds. (David Carlier)
2764

@@ -36,8 +73,6 @@ PHP NEWS
3673

3774
- Core:
3875
. Fixed Haiku ZTS build. (David Carlier)
39-
. Fixed bug GH-8082 (op_arrays with temporary run_time_cache leak memory
40-
when observed). (Bob)
4176

4277
- GD:
4378
. Fixed libpng warning when loading interlaced images. (Brett)

0 commit comments

Comments
 (0)