mirror of
https://github.com/php/php-src.git
synced 2024-11-27 11:53:33 +08:00
Switch to Ubuntu 22.04 for GitHub actions jobs
Closes GH-10814
This commit is contained in:
parent
08e7366d0a
commit
d98963a071
5
.github/actions/setup-x64/action.yml
vendored
5
.github/actions/setup-x64/action.yml
vendored
@ -7,17 +7,14 @@ runs:
|
||||
set -x
|
||||
|
||||
sudo service mysql start
|
||||
sudo service postgresql start
|
||||
sudo service slapd start
|
||||
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
|
||||
# Ensure local_infile tests can run.
|
||||
mysql -uroot -proot -e "SET GLOBAL local_infile = true"
|
||||
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
|
||||
sudo -u postgres psql -c "CREATE DATABASE test;"
|
||||
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;"
|
||||
sudo locale-gen de_DE
|
||||
|
||||
./.github/scripts/setup-slapd.sh &>/dev/null
|
||||
./.github/scripts/setup-slapd.sh
|
||||
|
||||
sudo cp ext/snmp/tests/snmpd.conf /etc/snmp
|
||||
sudo cp ext/snmp/tests/bigtest /etc/snmp
|
||||
|
2
.github/actions/test-linux/action.yml
vendored
2
.github/actions/test-linux/action.yml
vendored
@ -28,6 +28,8 @@ runs:
|
||||
export PDO_OCI_TEST_USER="system"
|
||||
export PDO_OCI_TEST_PASS="pass"
|
||||
export PDO_OCI_TEST_DSN="oci:dbname=localhost/XEPDB1;charset=AL32UTF8"
|
||||
export PGSQL_TEST_CONNSTR="host=postgres dbname=test port=5432 user=postgres password=postgres"
|
||||
export PDO_PGSQL_TEST_DSN="host=postgres dbname=test port=5432 user=postgres password=postgres"
|
||||
export SKIP_IO_CAPTURE_TESTS=1
|
||||
export TEST_PHP_JUNIT=junit.out.xml
|
||||
export STACK_LIMIT_DEFAULTS_CHECK=1
|
||||
|
4
.github/scripts/setup-slapd.sh
vendored
4
.github/scripts/setup-slapd.sh
vendored
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
set -ex
|
||||
set -e
|
||||
|
||||
# Create TLS certificate
|
||||
sudo mkdir -p /etc/ldap/ssl
|
||||
@ -42,8 +42,6 @@ sudo sed -e 's|^\s*SLAPD_SERVICES\s*=.*$|SLAPD_SERVICES="ldap:/// ldaps:/// ldap
|
||||
# Configure LDAP database.
|
||||
DBDN=`sudo ldapsearch -Q -LLL -Y EXTERNAL -H ldapi:/// -b cn=config '(&(olcRootDN=*)(olcSuffix=*))' dn | grep -i '^dn:' | sed -e 's/^dn:\s*//'`;
|
||||
|
||||
sudo ldapadd -Q -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/ppolicy.ldif
|
||||
|
||||
sudo service slapd restart
|
||||
|
||||
sudo ldapmodify -Q -Y EXTERNAL -H ldapi:/// << EOF
|
||||
|
35
.github/workflows/nightly.yml
vendored
35
.github/workflows/nightly.yml
vendored
@ -35,6 +35,13 @@ jobs:
|
||||
LINUX_X64:
|
||||
needs: GENERATE_MATRIX
|
||||
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
|
||||
services:
|
||||
postgres:
|
||||
image: postgres
|
||||
env:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: test
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@ -47,7 +54,7 @@ jobs:
|
||||
zts: [true, false]
|
||||
include: ${{ fromJson(needs.GENERATE_MATRIX.outputs.matrix-include) }}
|
||||
name: "${{ matrix.branch.name }}_LINUX_X64${{ matrix.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: git checkout
|
||||
uses: actions/checkout@v3
|
||||
@ -122,7 +129,7 @@ jobs:
|
||||
name: "${{ matrix.branch.name }}_LINUX_X32_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ubuntu:20.04
|
||||
image: ubuntu:22.04
|
||||
env:
|
||||
MYSQL_TEST_HOST: mysql
|
||||
PDO_MYSQL_TEST_DSN: mysql:host=mysql;dbname=test
|
||||
@ -246,7 +253,14 @@ jobs:
|
||||
uses: ./.github/actions/verify-generated-files
|
||||
COVERAGE_DEBUG_NTS:
|
||||
if: github.repository_owner == 'php' || github.event_name == 'workflow_dispatch'
|
||||
runs-on: ubuntu-20.04
|
||||
services:
|
||||
postgres:
|
||||
image: postgres
|
||||
env:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: test
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: git checkout
|
||||
uses: actions/checkout@v3
|
||||
@ -286,7 +300,7 @@ jobs:
|
||||
matrix:
|
||||
branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
|
||||
name: "${{ matrix.branch.name }}_COMMUNITY"
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
UBSAN_OPTIONS: print_stacktrace=1
|
||||
USE_ZEND_ALLOC: 0
|
||||
@ -396,12 +410,19 @@ jobs:
|
||||
OPCACHE_VARIATION:
|
||||
needs: GENERATE_MATRIX
|
||||
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
|
||||
services:
|
||||
postgres:
|
||||
image: postgres
|
||||
env:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: test
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
|
||||
name: "${{ matrix.branch.name }}_OPCACHE_VARIATION"
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: git checkout
|
||||
uses: actions/checkout@v3
|
||||
@ -567,7 +588,7 @@ jobs:
|
||||
exclude:
|
||||
- branch: { name: 'PHP-80', ref: 'PHP-8.0' }
|
||||
name: "${{ matrix.branch.name }}_LIBMYSQLCLIENT"
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: git checkout
|
||||
uses: actions/checkout@v3
|
||||
@ -614,7 +635,7 @@ jobs:
|
||||
uses: ./.github/actions/verify-generated-files
|
||||
PECL:
|
||||
if: github.repository_owner == 'php' || github.event_name == 'workflow_dispatch'
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
CC: ccache gcc
|
||||
CXX: ccache g++
|
||||
|
11
.github/workflows/push.yml
vendored
11
.github/workflows/push.yml
vendored
@ -28,6 +28,13 @@ env:
|
||||
CXX: ccache g++
|
||||
jobs:
|
||||
LINUX_X64:
|
||||
services:
|
||||
postgres:
|
||||
image: postgres
|
||||
env:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: test
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@ -37,7 +44,7 @@ jobs:
|
||||
- debug: false
|
||||
zts: true
|
||||
name: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: git checkout
|
||||
uses: actions/checkout@v3
|
||||
@ -85,7 +92,7 @@ jobs:
|
||||
name: LINUX_X32_DEBUG_ZTS
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ubuntu:20.04
|
||||
image: ubuntu:22.04
|
||||
env:
|
||||
MYSQL_TEST_HOST: mysql
|
||||
PDO_MYSQL_TEST_DSN: mysql:host=mysql;dbname=test
|
||||
|
@ -737,4 +737,17 @@ extern "C++" {
|
||||
# define ZEND_INDIRECT_RETURN
|
||||
#endif
|
||||
|
||||
#if __GNUC__ && !defined(__clang__)
|
||||
# define __DO_PRAGMA(x) _Pragma(#x)
|
||||
# define _DO_PRAGMA(x) __DO_PRAGMA(x)
|
||||
# define ZEND_CGG_DIAGNOSTIC_IGNORED_START(warning) \
|
||||
_Pragma("GCC diagnostic push") \
|
||||
_DO_PRAGMA(GCC diagnostic ignored warning)
|
||||
# define ZEND_CGG_DIAGNOSTIC_IGNORED_END \
|
||||
_Pragma("GCC diagnostic pop")
|
||||
#else
|
||||
# define ZEND_CGG_DIAGNOSTIC_IGNORED_START(warning)
|
||||
# define ZEND_CGG_DIAGNOSTIC_IGNORED_END
|
||||
#endif
|
||||
|
||||
#endif /* ZEND_PORTABILITY_H */
|
||||
|
@ -525,11 +525,9 @@ PHP_RINIT_FUNCTION(imap)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ PHP_RSHUTDOWN_FUNCTION */
|
||||
PHP_RSHUTDOWN_FUNCTION(imap)
|
||||
static void free_errorlist(void)
|
||||
{
|
||||
ERRORLIST *ecur = NIL;
|
||||
STRINGLIST *acur = NIL;
|
||||
|
||||
if (IMAPG(imap_errorstack) != NIL) {
|
||||
/* output any remaining errors at their original error level */
|
||||
@ -545,6 +543,11 @@ PHP_RSHUTDOWN_FUNCTION(imap)
|
||||
mail_free_errorlist(&IMAPG(imap_errorstack));
|
||||
IMAPG(imap_errorstack) = NIL;
|
||||
}
|
||||
}
|
||||
|
||||
static void free_stringlist(void)
|
||||
{
|
||||
STRINGLIST *acur = NIL;
|
||||
|
||||
if (IMAPG(imap_alertstack) != NIL) {
|
||||
/* output any remaining alerts at E_NOTICE level */
|
||||
@ -560,6 +563,13 @@ PHP_RSHUTDOWN_FUNCTION(imap)
|
||||
mail_free_stringlist(&IMAPG(imap_alertstack));
|
||||
IMAPG(imap_alertstack) = NIL;
|
||||
}
|
||||
}
|
||||
|
||||
/* {{{ PHP_RSHUTDOWN_FUNCTION */
|
||||
PHP_RSHUTDOWN_FUNCTION(imap)
|
||||
{
|
||||
free_errorlist();
|
||||
free_stringlist();
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
@ -47,7 +47,9 @@
|
||||
# endif
|
||||
|
||||
/* these are used for quota support */
|
||||
ZEND_CGG_DIAGNOSTIC_IGNORED_START("-Wstrict-prototypes")
|
||||
# include "c-client.h" /* includes mail.h and rfc822.h */
|
||||
ZEND_CGG_DIAGNOSTIC_IGNORED_END
|
||||
# include "imap4r1.h" /* location of c-client quota functions */
|
||||
#else
|
||||
# include "mail.h"
|
||||
|
@ -53,7 +53,9 @@
|
||||
/* }}} */
|
||||
|
||||
#include "ext/standard/php_string.h"
|
||||
ZEND_CGG_DIAGNOSTIC_IGNORED_START("-Wstrict-prototypes")
|
||||
#include <oci.h>
|
||||
ZEND_CGG_DIAGNOSTIC_IGNORED_END
|
||||
|
||||
#if !defined(OCI_MAJOR_VERSION) || OCI_MAJOR_VERSION < 11 || ((OCI_MAJOR_VERSION == 11) && (OCI_MINOR_VERSION < 2))
|
||||
#error This version of PHP OCI8 requires Oracle Client libraries from 11.2 or later.
|
||||
|
@ -14,7 +14,14 @@
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef PHP_PDO_OCI_INT_H
|
||||
#define PHP_PDO_OCI_INT_H
|
||||
|
||||
#include "zend_portability.h"
|
||||
|
||||
ZEND_CGG_DIAGNOSTIC_IGNORED_START("-Wstrict-prototypes")
|
||||
#include <oci.h>
|
||||
ZEND_CGG_DIAGNOSTIC_IGNORED_END
|
||||
|
||||
typedef struct {
|
||||
const char *file;
|
||||
@ -105,3 +112,5 @@ enum {
|
||||
PDO_OCI_ATTR_MODULE,
|
||||
PDO_OCI_ATTR_CALL_TIMEOUT
|
||||
};
|
||||
|
||||
#endif /* PHP_PDO_OCI_INT_H */
|
||||
|
@ -2386,7 +2386,14 @@ iterator_done:
|
||||
if (style == SOAP_ENCODED) {
|
||||
if (soap_version == SOAP_1_1) {
|
||||
smart_str_0(&array_type);
|
||||
if (strcmp(ZSTR_VAL(array_type.s),"xsd:anyType") == 0) {
|
||||
#if defined(__GNUC__) && __GNUC__ >= 11
|
||||
ZEND_CGG_DIAGNOSTIC_IGNORED_START("-Wstringop-overread")
|
||||
#endif
|
||||
bool is_xsd_any_type = strcmp(ZSTR_VAL(array_type.s),"xsd:anyType") == 0;
|
||||
#if defined(__GNUC__) && __GNUC__ >= 11
|
||||
ZEND_CGG_DIAGNOSTIC_IGNORED_END
|
||||
#endif
|
||||
if (is_xsd_any_type) {
|
||||
smart_str_free(&array_type);
|
||||
smart_str_appendl(&array_type,"xsd:ur-type",sizeof("xsd:ur-type")-1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user