From ad6390910a8b8c6cca0364f753f2c29ed3f5e677 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 27 Sep 2024 22:45:28 +0200 Subject: [PATCH 01/10] Prepare for Windows only CI --- .circleci/config.yml | 188 ------------------------ .cirrus.yml | 31 ---- .github/workflows/push.yml | 292 ------------------------------------- 3 files changed, 511 deletions(-) delete mode 100644 .circleci/config.yml delete mode 100644 .cirrus.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 78520332dfc7e..0000000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,188 +0,0 @@ -version: 2.1 - -jobs: - arm: - resource_class: arm.medium - docker: - - image: cimg/base:current-22.04 - - image: mysql:8.3 - environment: - MYSQL_ALLOW_EMPTY_PASSWORD: true - MYSQL_ROOT_PASSWORD: '' - MYSQL_DATABASE: test - - image: postgres:16 - environment: - POSTGRES_PASSWORD: postgres - POSTGRES_DB: test - environment: - LANGUAGE: '' - LANG: en_US.UTF-8 - MYSQL_TEST_HOST: '127.0.0.1' - MYSQL_TEST_PASSWD: '' - MYSQL_TEST_USER: root - PDO_MYSQL_TEST_DSN: 'mysql:host=127.0.0.1;dbname=test' - PDO_MYSQL_TEST_PASS: '' - PDO_MYSQL_TEST_USER: root - PDO_PGSQL_TEST_DSN: 'pgsql:host=127.0.0.1 port=5432 dbname=test user=postgres password=postgres' - steps: - - checkout - - run: - name: apt - command: | - export DEBIAN_FRONTEND=noninteractive - sudo apt-get update -y - sudo apt-get install -y \ - gcc \ - g++ \ - autoconf \ - bison \ - re2c \ - locales \ - locales-all \ - ldap-utils \ - openssl \ - slapd \ - libgmp-dev \ - libicu-dev \ - libtidy-dev \ - libenchant-2-dev \ - libsasl2-dev \ - libxpm-dev \ - libzip-dev \ - libbz2-dev \ - libsqlite3-dev \ - libwebp-dev \ - libonig-dev \ - libcurl4-openssl-dev \ - libxml2-dev \ - libxslt1-dev \ - libpq-dev \ - libreadline-dev \ - libldap2-dev \ - libsodium-dev \ - libargon2-0-dev \ - libmm-dev \ - libsnmp-dev \ - snmpd \ - `#snmp-mibs-downloader` \ - freetds-dev \ - `#unixodbc-dev` \ - dovecot-core \ - dovecot-pop3d \ - dovecot-imapd \ - sendmail \ - firebird-dev \ - liblmdb-dev \ - libtokyocabinet-dev \ - libdb-dev \ - libqdbm-dev \ - libjpeg-dev \ - libpng-dev \ - libfreetype6-dev - - run: - name: ./configure - command: | - ./buildconf -f - ./configure \ - --enable-debug \ - --enable-zts \ - --enable-option-checking=fatal \ - --prefix=/usr \ - --enable-phpdbg \ - --enable-fpm \ - --enable-opcache \ - --with-pdo-mysql=mysqlnd \ - --with-mysqli=mysqlnd \ - --with-pgsql \ - --with-pdo-pgsql \ - --with-pdo-sqlite \ - --enable-intl \ - --without-pear \ - --enable-gd \ - --with-jpeg \ - --with-webp \ - --with-freetype \ - --with-xpm \ - --enable-exif \ - --with-zip \ - --with-zlib \ - --enable-soap \ - --enable-xmlreader \ - --with-xsl \ - --with-tidy \ - --enable-sysvsem \ - --enable-sysvshm \ - --enable-shmop \ - --enable-pcntl \ - --with-readline \ - --enable-mbstring \ - --with-curl \ - --with-gettext \ - --enable-sockets \ - --with-bz2 \ - --with-openssl \ - --with-gmp \ - --enable-bcmath \ - --enable-calendar \ - --enable-ftp \ - --with-enchant=/usr \ - --enable-sysvmsg \ - --with-ffi \ - --enable-zend-test \ - --enable-dl-test=shared \ - --with-ldap \ - --with-ldap-sasl \ - --with-password-argon2 \ - --with-mhash \ - --with-sodium \ - --enable-dba \ - --with-cdb \ - --enable-flatfile \ - --enable-inifile \ - --with-tcadb \ - --with-lmdb \ - --with-qdbm \ - --with-snmp \ - `#--with-unixODBC` \ - `#--with-pdo-odbc=unixODBC,/usr` \ - --with-config-file-path=/etc \ - --with-config-file-scan-dir=/etc/php.d \ - --with-pdo-firebird \ - `#--with-pdo-dblib` \ - --disable-phpdbg \ - `#--enable-werror` - - run: - name: make - command: make -j2 > /dev/null - - run: - name: make install - command: | - sudo make install - sudo mkdir -p /etc/php.d - sudo chmod 777 /etc/php.d - echo opcache.enable_cli=1 > /etc/php.d/opcache.ini - echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini - - run: - name: Test - no_output_timeout: 30m - command: | - sapi/cli/php run-tests.php \ - -d zend_extension=opcache.so \ - -d opcache.enable_cli=1 \ - -d opcache.jit_buffer_size=64M \ - -d opcache.jit=tracing \ - -d zend_test.observer.enabled=1 \ - -d zend_test.observer.show_output=0 \ - -P -q -x -j2 \ - -g FAIL,BORK,LEAK,XLEAK \ - --no-progress \ - --offline \ - --show-diff \ - --show-slow 1000 \ - --set-timeout 120 \ - --repeat 2 - -workflows: - push-workflow: - jobs: - - arm diff --git a/.cirrus.yml b/.cirrus.yml deleted file mode 100644 index bcaef85b35f0a..0000000000000 --- a/.cirrus.yml +++ /dev/null @@ -1,31 +0,0 @@ -env: - CIRRUS_CLONE_DEPTH: 1 - -freebsd_task: - name: FREEBSD_DEBUG_NTS - timeout_in: 50m - freebsd_instance: - image_family: freebsd-13-3 - skip: "changesIncludeOnly('docs/**', 'NEWS', 'UPGRADING', 'UPGRADING.INTERNALS', '**/README.*', 'CONTRIBUTING.md', 'CODING_STANDARDS.md', '.circleci/**')" - env: - ARCH: amd64 - install_script: - #- sed -i -e 's/quarterly/latest/g' /etc/pkg/FreeBSD.conf - #- pkg upgrade -y - - kldload accf_http - - pkg install -y autoconf bison gmake re2c icu libiconv png freetype2 enchant2 bzip2 t1lib gmp tidyp libsodium libzip libxml2 libxslt openssl oniguruma pkgconf webp libavif - script: - - ./buildconf -f - - ./configure --prefix=/usr/local --enable-debug --enable-option-checking=fatal --enable-fpm --with-pdo-sqlite --without-pear --with-bz2 --with-avif --with-jpeg --with-webp --with-freetype --enable-gd --enable-exif --with-zip --with-zlib --enable-soap --enable-xmlreader --with-xsl --with-libxml --enable-shmop --enable-pcntl --enable-mbstring --with-curl --enable-sockets --with-openssl --with-iconv=/usr/local --enable-bcmath --enable-calendar --enable-ftp --with-ffi --enable-zend-test --enable-dl-test=shared --enable-intl --with-mhash --with-sodium --enable-werror --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d - - gmake -j2 - - mkdir /etc/php.d - - gmake install - - echo opcache.enable_cli=1 > /etc/php.d/opcache.ini - - echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini - # Specify opcache.preload_user as we're running as root. - - echo opcache.preload_user=root >> /etc/php.d/opcache.ini - tests_script: - - export SKIP_IO_CAPTURE_TESTS=1 - - export CI_NO_IPV6=1 - - export STACK_LIMIT_DEFAULTS_CHECK=1 - - sapi/cli/php run-tests.php -P -q -j2 -g FAIL,BORK,LEAK,XLEAK --no-progress --offline --show-diff --show-slow 1000 --set-timeout 120 -d zend_extension=opcache.so diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index d014047d150c7..0abcc67a9b014 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -39,191 +39,6 @@ env: CC: ccache gcc CXX: ccache g++ jobs: - LINUX_X64: - if: github.repository == 'php/php-src' || github.event_name == 'pull_request' - services: - mysql: - image: mysql:8.3 - ports: - - 3306:3306 - env: - MYSQL_DATABASE: test - MYSQL_ROOT_PASSWORD: root - postgres: - image: postgres - ports: - - 5432:5432 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: test - firebird: - image: jacobalberty/firebird - ports: - - 3050:3050 - env: - ISC_PASSWORD: test - FIREBIRD_DATABASE: test.fdb - FIREBIRD_USER: test - FIREBIRD_PASSWORD: test - strategy: - fail-fast: false - matrix: - include: - - debug: false - zts: false - asan: false - - debug: true - zts: true - asan: true - name: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || '' }}" - runs-on: ubuntu-${{ !matrix.asan && '22' || '24' }}.04 - timeout-minutes: 50 - steps: - - name: git checkout - uses: actions/checkout@v4 - - name: apt - uses: ./.github/actions/apt-x64 - - name: System info - run: | - echo "::group::Show host CPU info" - lscpu - echo "::endgroup::" - echo "::group::Show installed package versions" - dpkg -l - echo "::endgroup::" - - name: Create MSSQL container - if: ${{ !matrix.asan }} - uses: ./.github/actions/setup-mssql - - name: Setup Caddy server - uses: ./.github/actions/setup-caddy - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - # This duplicates the "job.name" expression above because - # GitHub has no way to query the job name (github.job is the - # job id, not the job name) - key: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || '' }}-${{hashFiles('main/php_version.h')}}" - append-timestamp: false - save: ${{ github.event_name != 'pull_request' }} - - name: ./configure - uses: ./.github/actions/configure-x64 - with: - configurationParameters: >- - --${{ matrix.debug && 'enable' || 'disable' }}-debug - --${{ matrix.zts && 'enable' || 'disable' }}-zts - ${{ matrix.asan && 'CFLAGS="-fsanitize=undefined,address -fno-sanitize=function -DZEND_TRACK_ARENA_ALLOC" LDFLAGS="-fsanitize=undefined,address -fno-sanitize=function" CC=clang CXX=clang++' || '' }} - skipSlow: ${{ matrix.asan }} - - name: make - run: make -j$(/usr/bin/nproc) >/dev/null - - name: make install - uses: ./.github/actions/install-linux - - name: Setup - if: ${{ !matrix.asan }} - uses: ./.github/actions/setup-x64 - - name: Test - if: matrix.asan == false - uses: ./.github/actions/test-linux - - name: Test Tracing JIT - uses: ./.github/actions/test-linux - with: - jitType: tracing - runTestsParameters: >- - -d zend_extension=opcache.so - -d opcache.enable_cli=1 - ${{ matrix.asan && '--asan -x' || '' }} - - name: Verify generated files are up to date - if: ${{ !matrix.asan }} - uses: ./.github/actions/verify-generated-files - LINUX_X32: - if: github.repository == 'php/php-src' || github.event_name == 'pull_request' - name: LINUX_X32_DEBUG_ZTS - runs-on: ubuntu-latest - timeout-minutes: 50 - container: - image: ubuntu:20.04 - env: - MYSQL_TEST_HOST: mysql - PDO_MYSQL_TEST_DSN: mysql:host=mysql;dbname=test - PDO_MYSQL_TEST_HOST: mysql - services: - mysql: - image: mysql:8.3 - ports: - - 3306:3306 - env: - MYSQL_DATABASE: test - MYSQL_ROOT_PASSWORD: root - steps: - - name: git checkout - uses: actions/checkout@v4 - - name: apt - uses: ./.github/actions/apt-x32 - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: "${{github.job}}-${{hashFiles('main/php_version.h')}}" - append-timestamp: false - - name: ./configure - uses: ./.github/actions/configure-x32 - with: - configurationParameters: >- - --enable-debug - --enable-zts - - name: make - run: make -j$(/usr/bin/nproc) >/dev/null - - name: make install - uses: ./.github/actions/install-linux-x32 - - name: Test Tracing JIT - uses: ./.github/actions/test-linux - with: - jitType: tracing - runTestsParameters: >- - -d zend_extension=opcache.so - -d opcache.enable_cli=1 - MACOS_DEBUG_NTS: - if: github.repository == 'php/php-src' || github.event_name == 'pull_request' - strategy: - fail-fast: false - matrix: - include: - - os: 13 - arch: X64 - - os: 14 - arch: ARM64 - name: MACOS_${{ matrix.arch }}_DEBUG_NTS - runs-on: macos-${{ matrix.os }} - timeout-minutes: 50 - steps: - - name: git checkout - uses: actions/checkout@v4 - - name: brew - uses: ./.github/actions/brew - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: "${{github.job}}-${{matrix.os}}-${{hashFiles('main/php_version.h')}}" - append-timestamp: false - save: ${{ github.event_name != 'pull_request' }} - - name: ./configure - uses: ./.github/actions/configure-macos - with: - configurationParameters: --enable-debug --disable-zts - - name: make - run: |- - export PATH="$(brew --prefix)/opt/bison/bin:$PATH" - make -j$(sysctl -n hw.logicalcpu) >/dev/null - - name: make install - run: sudo make install - - name: Test Tracing JIT - uses: ./.github/actions/test-macos - with: - jitType: tracing - runTestsParameters: >- - -d zend_extension=opcache.so - -d opcache.enable_cli=1 - - name: Verify generated files are up to date - uses: ./.github/actions/verify-generated-files WINDOWS: if: github.repository == 'php/php-src' || github.event_name == 'pull_request' name: WINDOWS_X64_ZTS @@ -251,110 +66,3 @@ jobs: run: .github/scripts/windows/build.bat - name: Test run: .github/scripts/windows/test.bat - BENCHMARKING: - name: BENCHMARKING - if: github.repository == 'php/php-src' || github.event_name == 'pull_request' - runs-on: ubuntu-22.04 - timeout-minutes: 50 - steps: - - name: git checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - # ASLR can cause a lot of noise due to missed sse opportunities for memcpy - # and other operations, so we disable it during benchmarking. - - name: Disable ASLR - run: echo 0 | sudo tee /proc/sys/kernel/randomize_va_space - - name: apt - run: | - set -x - sudo apt-get update - sudo apt-get install \ - bison \ - libgmp-dev \ - libonig-dev \ - libsqlite3-dev \ - openssl \ - re2c \ - valgrind - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: "${{github.job}}-${{hashFiles('main/php_version.h')}}" - append-timestamp: false - save: ${{ github.event_name != 'pull_request' }} - - name: ./configure - run: | - set -x - ./buildconf --force - ./configure \ - --disable-debug \ - --enable-mbstring \ - --enable-opcache \ - --enable-option-checking=fatal \ - --enable-sockets \ - --enable-werror \ - --prefix=/usr \ - --with-config-file-scan-dir=/etc/php.d \ - --with-gmp \ - --with-mysqli=mysqlnd \ - --with-openssl \ - --with-pdo-sqlite \ - --with-valgrind - - name: make - run: make -j$(/usr/bin/nproc) >/dev/null - - name: make install - run: | - set -x - sudo make install - sudo mkdir -p /etc/php.d - sudo chmod 777 /etc/php.d - echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini - echo zend_extension=opcache.so >> /etc/php.d/opcache.ini - echo opcache.enable=1 >> /etc/php.d/opcache.ini - echo opcache.enable_cli=1 >> /etc/php.d/opcache.ini - - name: Setup - run: | - git config --global user.name "Benchmark" - git config --global user.email "benchmark@php.net" - sudo service mysql start - mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS wordpress" - mysql -uroot -proot -e "CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'wordpress'; FLUSH PRIVILEGES;" - mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON *.* TO 'wordpress'@'localhost' WITH GRANT OPTION;" - - name: git checkout benchmarking-data - uses: actions/checkout@v4 - with: - repository: php/benchmarking-data - ssh-key: ${{ secrets.BENCHMARKING_DATA_DEPLOY_KEY }} - path: benchmark/repos/data - - name: Benchmark - run: php benchmark/benchmark.php true - - name: Store result - if: github.event_name == 'push' - run: | - set -x - cd benchmark/repos/data - git pull --autostash - if [ -e ".git/MERGE_HEAD" ]; then - echo "Merging, can't proceed" - exit 1 - fi - git add . - if git diff --cached --quiet; then - exit 0 - fi - git commit -m "Add result for ${{ github.repository }}@${{ github.sha }}" - git push - - name: Show diff - if: github.event_name == 'pull_request' - run: |- - set -x - php benchmark/generate_diff.php \ - ${{ github.sha }} \ - $(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.sha }}) \ - > $GITHUB_STEP_SUMMARY - - uses: actions/upload-artifact@v4 - with: - name: profiles - path: ${{ github.workspace }}/benchmark/profiles - retention-days: 30 From 6b5cbb65d86974aa87ce65239279582699f249d2 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 27 Sep 2024 22:59:25 +0200 Subject: [PATCH 02/10] Build extension static if possible --- .github/scripts/windows/build_task.bat | 38 +++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/.github/scripts/windows/build_task.bat b/.github/scripts/windows/build_task.bat index e8d84b8c0bfd6..fd8500cde6d56 100644 --- a/.github/scripts/windows/build_task.bat +++ b/.github/scripts/windows/build_task.bat @@ -41,7 +41,43 @@ if "%PLATFORM%" == "x86" ( cmd /c configure.bat ^ --enable-snapshot-build ^ --disable-debug-pack ^ - --enable-com-dotnet=shared ^ + --with-bz2 ^ + --enable-com-dotnet ^ + --with-curl ^ + --with-dba ^ + --with-qdbm ^ + --with-lmdb ^ + --enable-dl-test ^ + --with-ffi ^ + --enable-ftp ^ + --with-gettext ^ + --with-gmp ^ + --with-mhash ^ + --with-ldap ^ + --with-openssl ^ + --with-openssl-argon2 ^ + --enable-shmop ^ + --enable-sockets ^ + --with-sodium ^ + --with-sqlite3 ^ + --with-password-argon2 ^ + --enable-sysvshm ^ + --with-tidy ^ + --enable-zend-test ^ + --enable-mbstring ^ + --enable-mbregex ^ + --enable-exif ^ + --enable-fileinfo ^ + --enable-intl ^ + --with-mysqli ^ + --enable-pdo ^ + --with-pdo-firebird ^ + --with-pdo-mysql ^ + --with-pdo-odbc ^ + --with-pdo-pgsql ^ + --with-pgsql ^ + --with-snmp ^ + --with-xsl ^ --without-analyzer ^ --enable-object-out-dir=%PHP_BUILD_OBJ_DIR% ^ --with-php-build=%DEPS_DIR% ^ From fe25fdd298a2eb2deec2d194c4646f55d1cfc083 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 27 Sep 2024 23:02:37 +0200 Subject: [PATCH 03/10] ldap is static --- .github/scripts/windows/test_task.bat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/scripts/windows/test_task.bat b/.github/scripts/windows/test_task.bat index b719d288e6688..1af4534a730a3 100644 --- a/.github/scripts/windows/test_task.bat +++ b/.github/scripts/windows/test_task.bat @@ -124,9 +124,9 @@ rem work-around for some spawned PHP processes requiring OpenSSL echo extension=php_openssl.dll >> %PHP_BUILD_DIR%\php.ini rem remove ext dlls for which tests are not supported -for %%i in (ldap) do ( - del %PHP_BUILD_DIR%\php_%%i.dll -) +@REM for %%i in (ldap) do ( +@REM del %PHP_BUILD_DIR%\php_%%i.dll +@REM ) set TEST_PHPDBG_EXECUTABLE=%PHP_BUILD_DIR%\phpdbg.exe From 466792b3a0996c1af9daca057eecc7c8e58df3e4 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 27 Sep 2024 23:38:19 +0200 Subject: [PATCH 04/10] Build ldap shared Symbols are clashing with Wldap32.Lib which is used by ext/curl. --- .github/scripts/windows/build_task.bat | 2 +- .github/scripts/windows/test_task.bat | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/scripts/windows/build_task.bat b/.github/scripts/windows/build_task.bat index fd8500cde6d56..5ff6501725e48 100644 --- a/.github/scripts/windows/build_task.bat +++ b/.github/scripts/windows/build_task.bat @@ -53,7 +53,7 @@ cmd /c configure.bat ^ --with-gettext ^ --with-gmp ^ --with-mhash ^ - --with-ldap ^ + --with-ldap=shared ^ --with-openssl ^ --with-openssl-argon2 ^ --enable-shmop ^ diff --git a/.github/scripts/windows/test_task.bat b/.github/scripts/windows/test_task.bat index 1af4534a730a3..b719d288e6688 100644 --- a/.github/scripts/windows/test_task.bat +++ b/.github/scripts/windows/test_task.bat @@ -124,9 +124,9 @@ rem work-around for some spawned PHP processes requiring OpenSSL echo extension=php_openssl.dll >> %PHP_BUILD_DIR%\php.ini rem remove ext dlls for which tests are not supported -@REM for %%i in (ldap) do ( -@REM del %PHP_BUILD_DIR%\php_%%i.dll -@REM ) +for %%i in (ldap) do ( + del %PHP_BUILD_DIR%\php_%%i.dll +) set TEST_PHPDBG_EXECUTABLE=%PHP_BUILD_DIR%\phpdbg.exe From 146d5944a349abff866b7e74d2680b6adfd74ccb Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 27 Sep 2024 23:39:02 +0200 Subject: [PATCH 05/10] Don't error on warnings --- .github/scripts/windows/build_task.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/windows/build_task.bat b/.github/scripts/windows/build_task.bat index 5ff6501725e48..69033725e8804 100644 --- a/.github/scripts/windows/build_task.bat +++ b/.github/scripts/windows/build_task.bat @@ -35,7 +35,7 @@ rem Some undefined behavior is reported on 32-bit, this should be fixed if "%PLATFORM%" == "x86" ( set CFLAGS=/W1 ) else ( - set CFLAGS=/W1 /WX + set CFLAGS=/W1 ) cmd /c configure.bat ^ From d48a4953ce8d8d72c824ff038c541241f55bfddb Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 28 Sep 2024 00:37:58 +0200 Subject: [PATCH 06/10] Don't load mysqli which is statically built in --- .github/scripts/windows/test_task.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/windows/test_task.bat b/.github/scripts/windows/test_task.bat index b719d288e6688..d94b43106a2f2 100644 --- a/.github/scripts/windows/test_task.bat +++ b/.github/scripts/windows/test_task.bat @@ -85,7 +85,7 @@ rem set SSLEAY_CONF= rem prepare for OPcache if "%OPCACHE%" equ "1" set OPCACHE_OPTS=-d opcache.enable=1 -d opcache.enable_cli=1 -d opcache.protect_memory=1 -d opcache.jit_buffer_size=64M -d opcache.jit=tracing rem work-around for failing to dl(mysqli) with OPcache (https://github.com/php/php-src/issues/8508) -if "%OPCACHE%" equ "1" set OPCACHE_OPTS=%OPCACHE_OPTS% -d extension=mysqli +@REM if "%OPCACHE%" equ "1" set OPCACHE_OPTS=%OPCACHE_OPTS% -d extension=mysqli rem prepare for enchant mkdir %~d0\usr\local\lib\enchant-2 From 578dbd97bc0b174878bdb5d2d555137e5daa5f40 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 28 Sep 2024 00:39:15 +0200 Subject: [PATCH 07/10] Build ext/snmp shared To avoid the excessive error reporting happening there (this should probably be properly fixed). --- .github/scripts/windows/build_task.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/windows/build_task.bat b/.github/scripts/windows/build_task.bat index 69033725e8804..8f719faa22fc8 100644 --- a/.github/scripts/windows/build_task.bat +++ b/.github/scripts/windows/build_task.bat @@ -76,7 +76,7 @@ cmd /c configure.bat ^ --with-pdo-odbc ^ --with-pdo-pgsql ^ --with-pgsql ^ - --with-snmp ^ + --with-snmp=shared ^ --with-xsl ^ --without-analyzer ^ --enable-object-out-dir=%PHP_BUILD_OBJ_DIR% ^ From 2e3341bf0cd99e61365641c294a755eccb8efbf3 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 28 Sep 2024 11:25:45 +0200 Subject: [PATCH 08/10] Revert "Build ext/snmp shared" This reverts commit 3e43490068a1c81947d7194687c0b2492a5116d2. Revert "Don't load mysqli which is statically built in" This reverts commit b15e4e3b16462e53be9dad9fcb8e3d9f98d98b9e. Revert "Don't error on warnings" This reverts commit 6917a6e9fbe2e8c2584330e0c1b8d89eaeaa077f. Revert "Build ldap shared" This reverts commit 4607589e46edf5ac1de9ba02d43f6f7708a31816. Revert "ldap is static" This reverts commit 06719334f818aef979e516ac4a1ed573b167e10d. Revert "Build extension static if possible" This reverts commit c30b7c77844369642bb0b768c8a7e278ee6a8980. --- .github/scripts/windows/build_task.bat | 40 ++------------------------ .github/scripts/windows/test_task.bat | 2 +- 2 files changed, 3 insertions(+), 39 deletions(-) diff --git a/.github/scripts/windows/build_task.bat b/.github/scripts/windows/build_task.bat index 8f719faa22fc8..e8d84b8c0bfd6 100644 --- a/.github/scripts/windows/build_task.bat +++ b/.github/scripts/windows/build_task.bat @@ -35,49 +35,13 @@ rem Some undefined behavior is reported on 32-bit, this should be fixed if "%PLATFORM%" == "x86" ( set CFLAGS=/W1 ) else ( - set CFLAGS=/W1 + set CFLAGS=/W1 /WX ) cmd /c configure.bat ^ --enable-snapshot-build ^ --disable-debug-pack ^ - --with-bz2 ^ - --enable-com-dotnet ^ - --with-curl ^ - --with-dba ^ - --with-qdbm ^ - --with-lmdb ^ - --enable-dl-test ^ - --with-ffi ^ - --enable-ftp ^ - --with-gettext ^ - --with-gmp ^ - --with-mhash ^ - --with-ldap=shared ^ - --with-openssl ^ - --with-openssl-argon2 ^ - --enable-shmop ^ - --enable-sockets ^ - --with-sodium ^ - --with-sqlite3 ^ - --with-password-argon2 ^ - --enable-sysvshm ^ - --with-tidy ^ - --enable-zend-test ^ - --enable-mbstring ^ - --enable-mbregex ^ - --enable-exif ^ - --enable-fileinfo ^ - --enable-intl ^ - --with-mysqli ^ - --enable-pdo ^ - --with-pdo-firebird ^ - --with-pdo-mysql ^ - --with-pdo-odbc ^ - --with-pdo-pgsql ^ - --with-pgsql ^ - --with-snmp=shared ^ - --with-xsl ^ + --enable-com-dotnet=shared ^ --without-analyzer ^ --enable-object-out-dir=%PHP_BUILD_OBJ_DIR% ^ --with-php-build=%DEPS_DIR% ^ diff --git a/.github/scripts/windows/test_task.bat b/.github/scripts/windows/test_task.bat index d94b43106a2f2..b719d288e6688 100644 --- a/.github/scripts/windows/test_task.bat +++ b/.github/scripts/windows/test_task.bat @@ -85,7 +85,7 @@ rem set SSLEAY_CONF= rem prepare for OPcache if "%OPCACHE%" equ "1" set OPCACHE_OPTS=-d opcache.enable=1 -d opcache.enable_cli=1 -d opcache.protect_memory=1 -d opcache.jit_buffer_size=64M -d opcache.jit=tracing rem work-around for failing to dl(mysqli) with OPcache (https://github.com/php/php-src/issues/8508) -@REM if "%OPCACHE%" equ "1" set OPCACHE_OPTS=%OPCACHE_OPTS% -d extension=mysqli +if "%OPCACHE%" equ "1" set OPCACHE_OPTS=%OPCACHE_OPTS% -d extension=mysqli rem prepare for enchant mkdir %~d0\usr\local\lib\enchant-2 From c50f53bf608c90b4077d12d9a8b8eed1efb9c44d Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 28 Sep 2024 11:26:24 +0200 Subject: [PATCH 09/10] Enable test ini --- .github/scripts/windows/build_task.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/windows/build_task.bat b/.github/scripts/windows/build_task.bat index e8d84b8c0bfd6..b7175e1ece9af 100644 --- a/.github/scripts/windows/build_task.bat +++ b/.github/scripts/windows/build_task.bat @@ -46,7 +46,7 @@ cmd /c configure.bat ^ --enable-object-out-dir=%PHP_BUILD_OBJ_DIR% ^ --with-php-build=%DEPS_DIR% ^ %ADD_CONF% ^ - --disable-test-ini + --enable-test-ini if %errorlevel% neq 0 exit /b 3 nmake /NOLOGO From 258c282338952d4cd87c1e9e310eae264c31b105 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 28 Sep 2024 12:26:29 +0200 Subject: [PATCH 10/10] fix --- .github/scripts/windows/test_task.bat | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/scripts/windows/test_task.bat b/.github/scripts/windows/test_task.bat index b719d288e6688..927a4602360ed 100644 --- a/.github/scripts/windows/test_task.bat +++ b/.github/scripts/windows/test_task.bat @@ -85,7 +85,7 @@ rem set SSLEAY_CONF= rem prepare for OPcache if "%OPCACHE%" equ "1" set OPCACHE_OPTS=-d opcache.enable=1 -d opcache.enable_cli=1 -d opcache.protect_memory=1 -d opcache.jit_buffer_size=64M -d opcache.jit=tracing rem work-around for failing to dl(mysqli) with OPcache (https://github.com/php/php-src/issues/8508) -if "%OPCACHE%" equ "1" set OPCACHE_OPTS=%OPCACHE_OPTS% -d extension=mysqli +@REM if "%OPCACHE%" equ "1" set OPCACHE_OPTS=%OPCACHE_OPTS% -d extension=mysqli rem prepare for enchant mkdir %~d0\usr\local\lib\enchant-2 @@ -124,9 +124,9 @@ rem work-around for some spawned PHP processes requiring OpenSSL echo extension=php_openssl.dll >> %PHP_BUILD_DIR%\php.ini rem remove ext dlls for which tests are not supported -for %%i in (ldap) do ( - del %PHP_BUILD_DIR%\php_%%i.dll -) +@REM for %%i in (ldap) do ( +@REM del %PHP_BUILD_DIR%\php_%%i.dll +@REM ) set TEST_PHPDBG_EXECUTABLE=%PHP_BUILD_DIR%\phpdbg.exe