@@ -12,7 +12,7 @@ permissions:
1212 contents : read
1313
1414jobs :
15- windows :
15+ windows-minimal-exts :
1616 name : x86 / minimal-exts / lowest-php
1717
1818 defaults :
2323
2424 env :
2525 COMPOSER_NO_INTERACTION : ' 1'
26- SYMFONY_DEPRECATIONS_HELPER : ' strict'
26+ ANSICON : ' 121x90 (121x90)'
27+ SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE : ' 1'
28+
29+ steps :
30+ - name : Setup Git
31+ run : |
32+ git config --global core.autocrlf false
33+ git config --global user.email ""
34+ git config --global user.name "Symfony"
35+
36+ - name : Checkout
37+ uses : actions/checkout@v4
38+ with :
39+ fetch-depth : 2
40+
41+ - name : Setup PHP
42+ run : |
43+ $env:Path = 'c:\php;' + $env:Path
44+ mkdir c:\php && cd c:\php
45+ iwr -outf php.zip https://github.com/symfony/binary-utils/releases/download/v0.1/php-8.2.0-Win32-vs16-x86.zip
46+ 7z x php.zip -y >nul
47+ Copy php.ini-development php.ini
48+ "memory_limit=-1" >> php.ini
49+ "serialize_precision=-1" >> php.ini
50+ "max_execution_time=1200" >> php.ini
51+ "post_max_size=2047M" >> php.ini
52+ "upload_max_filesize=2047M" >> php.ini
53+ "date.timezone=`"America/Los_Angeles`"" >> php.ini
54+ "extension_dir=ext" >> php.ini
55+ "extension=php_xsl.dll" >> php.ini
56+ "extension=php_mbstring.dll" >> php.ini
57+ "extension=php_openssl.dll" >> php.ini
58+ cd ${{ github.workspace }}
59+ iwr -outf composer.phar https://getcomposer.org/download/latest-stable/composer.phar
60+
61+ - name : Install dependencies
62+ id : setup
63+ run : |
64+ $env:Path = 'c:\php;' + $env:Path
65+ mkdir $env:APPDATA\Composer && Copy .github\composer-config.json $env:APPDATA\Composer\config.json
66+
67+ $env:SYMFONY_VERSION=(Select-String -CaseSensitive -Pattern " VERSION =" -SimpleMatch -Path src/Symfony/Component/HttpKernel/Kernel.php | Select Line | Select-String -Pattern "([0-9][0-9]*\.[0-9])").Matches.Value
68+ $env:COMPOSER_ROOT_VERSION=$env:SYMFONY_VERSION + ".x-dev"
69+
70+ php .github/build-packages.php HEAD^ $env:SYMFONY_VERSION src\Symfony\Bridge\PhpUnit
71+ php composer.phar update --no-progress --ansi
72+
73+ - name : Install PHPUnit
74+ run : |
75+ $env:Path = 'c:\php;' + $env:Path
76+
77+ php phpunit install
78+
79+ - name : Run tests
80+ run : |
81+ $env:Path = 'c:\php;' + $env:Path
82+ $x = 0
83+
84+ Remove-Item -Path src\Symfony\Bridge\PhpUnit -Recurse
85+ mv src\Symfony\Component\HttpClient\phpunit.xml.dist src\Symfony\Component\HttpClient\phpunit.xml
86+ php phpunit src\Symfony --exclude-group tty --exclude-group benchmark --exclude-group intl-data --exclude-group network --exclude-group transient-on-windows || ($x = 1)
87+ # HttpClient tests need to run separately, they block when run with other components' tests concurrently
88+ php phpunit src\Symfony\Component\HttpClient || ($x = 1)
89+
90+ exit $x
91+
92+ windows-all-extensions :
93+ name : x86 / all extensions / lowest-php
94+
95+ defaults :
96+ run :
97+ shell : pwsh
98+
99+ runs-on : windows-2022
100+
101+ env :
102+ COMPOSER_NO_INTERACTION : ' 1'
27103 ANSICON : ' 121x90 (121x90)'
28104 SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE : ' 1'
29105
@@ -53,30 +129,28 @@ jobs:
53129 iwr -outf php_redis.zip https://github.com/symfony/binary-utils/releases/download/v0.1/php_redis-6.2.0-8.2-ts-vs16-x86.zip
54130 7z x php_redis.zip -y >nul
55131 cd ..
56- Copy php.ini-development php.ini-min
57- "memory_limit=-1" >> php.ini-min
58- "serialize_precision=-1" >> php.ini-min
59- "max_execution_time=1200" >> php.ini-min
60- "post_max_size=2047M" >> php.ini-min
61- "upload_max_filesize=2047M" >> php.ini-min
62- "date.timezone=`"America/Los_Angeles`"" >> php.ini-min
63- "extension_dir=ext" >> php.ini-min
64- "extension=php_xsl.dll" >> php.ini-min
65- "extension=php_mbstring.dll" >> php.ini-min
66- Copy php.ini-min php.ini-max
67- "zend_extension=php_opcache.dll" >> php.ini-max
68- "opcache.enable_cli=1" >> php.ini-max
69- "extension=php_openssl.dll" >> php.ini-max
70- "extension=php_apcu.dll" >> php.ini-max
71- "extension=php_igbinary.dll" >> php.ini-max
72- "extension=php_redis.dll" >> php.ini-max
73- "apc.enable_cli=1" >> php.ini-max
74- "extension=php_intl.dll" >> php.ini-max
75- "extension=php_fileinfo.dll" >> php.ini-max
76- "extension=php_pdo_sqlite.dll" >> php.ini-max
77- "extension=php_curl.dll" >> php.ini-max
78- "extension=php_sodium.dll" >> php.ini-max
79- Copy php.ini-max php.ini
132+ Copy php.ini-development php.ini
133+ "memory_limit=-1" >> php.ini
134+ "serialize_precision=-1" >> php.ini
135+ "max_execution_time=1200" >> php.ini
136+ "post_max_size=2047M" >> php.ini
137+ "upload_max_filesize=2047M" >> php.ini
138+ "date.timezone=`"America/Los_Angeles`"" >> php.ini
139+ "extension_dir=ext" >> php.ini
140+ "extension=php_xsl.dll" >> php.ini
141+ "extension=php_mbstring.dll" >> php.ini
142+ "zend_extension=php_opcache.dll" >> php.ini
143+ "opcache.enable_cli=1" >> php.ini
144+ "extension=php_openssl.dll" >> php.ini
145+ "extension=php_apcu.dll" >> php.ini
146+ "extension=php_igbinary.dll" >> php.ini
147+ "extension=php_redis.dll" >> php.ini
148+ "apc.enable_cli=1" >> php.ini
149+ "extension=php_intl.dll" >> php.ini
150+ "extension=php_fileinfo.dll" >> php.ini
151+ "extension=php_pdo_sqlite.dll" >> php.ini
152+ "extension=php_curl.dll" >> php.ini
153+ "extension=php_sodium.dll" >> php.ini
80154 cd ${{ github.workspace }}
81155 iwr -outf composer.phar https://getcomposer.org/download/latest-stable/composer.phar
82156
@@ -102,32 +176,13 @@ jobs:
102176 run : |
103177 choco install --no-progress memurai-developer
104178
105- - name : Run tests (minimal extensions)
106- if : always() && steps.setup.outcome == 'success'
107- run : |
108- $env:Path = 'c:\php;' + $env:Path
109- $env:SYMFONY_PHPUNIT_SKIPPED_TESTS = 'phpunit.skipped'
110- $x = 0
111-
112- Copy c:\php\php.ini-min c:\php\php.ini
113- Remove-Item -Path src\Symfony\Bridge\PhpUnit -Recurse
114- mv src\Symfony\Component\HttpClient\phpunit.xml.dist src\Symfony\Component\HttpClient\phpunit.xml
115- php phpunit src\Symfony --exclude-group tty,benchmark,intl-data,network,transient-on-windows || ($x = 1)
116- # HttpClient tests need to run separately, they block when run with other components' tests concurrently
117- php phpunit src\Symfony\Component\HttpClient || ($x = 1)
118-
119- exit $x
120-
121179 - name : Run tests
122- if : always() && steps.setup.outcome == 'success'
123180 run : |
124181 $env:Path = 'c:\php;' + $env:Path
125- $env:SYMFONY_PHPUNIT_SKIPPED_TESTS = 'phpunit.skipped'
126182 $x = 0
127183
128- Copy c:\php\php.ini-max c:\php\php.ini
129- php phpunit src\Symfony --exclude-group tty,benchmark,intl-data,network,transient-on-windows || ($x = 1)
184+ php phpunit src\Symfony --exclude-group tty --exclude-group benchmark --exclude-group intl-data --exclude-group network --exclude-group transient-on-windows --requires-php-extension apcu --requires-php-extension curl --requires-php-extension fileinfo --requires-php-extension igbinary --requires-php-extension intl --requires-php-extension openssl --requires-php-extension pdo_sqlite --requires-php-extension redis --requires-php-extension sodium || ($x = 1)
130185 # HttpClient tests need to run separately, they block when run with other components' tests concurrently
131- php phpunit src\Symfony\Component\HttpClient || ($x = 1)
186+ php phpunit src\Symfony\Component\HttpClient --requires-php-extension curl --requires-php-extension openssl || ($x = 1)
132187
133188 exit $x
0 commit comments