forked from symfony/symfony
-
Notifications
You must be signed in to change notification settings - Fork 0
129 lines (107 loc) · 4.82 KB
/
windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: Windows
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
windows:
name: x86 / minimal-exts / lowest-php
defaults:
run:
shell: pwsh
runs-on: windows-2022
env:
COMPOSER_NO_INTERACTION: '1'
SYMFONY_DEPRECATIONS_HELPER: 'strict'
ANSICON: '121x90 (121x90)'
SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE: '1'
steps:
- name: Setup Git
run: |
git config --global core.autocrlf false
git config --global user.email ""
git config --global user.name "Symfony"
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup PHP
run: |
$env:Path = 'c:\php;' + $env:Path
mkdir c:\php && cd c:\php
iwr -outf php-8.2.0-Win32-vs16-x86.zip https://github.com/symfony/binary-utils/releases/download/v0.1/php-8.2.0-Win32-vs16-x86.zip
7z x php-8.2.0-Win32-vs16-x86.zip -y >nul
cd ext
iwr -outf php_apcu-5.1.22-8.2-ts-vs16-x86.zip https://github.com/symfony/binary-utils/releases/download/v0.1/php_apcu-5.1.22-8.2-ts-vs16-x86.zip
7z x php_apcu-5.1.22-8.2-ts-vs16-x86.zip -y >nul
iwr -outf php_redis-6.0.0-dev-8.2-ts-vs16-x86.zip https://github.com/symfony/binary-utils/releases/download/v0.1/php_redis-6.0.0-dev-8.2-ts-vs16-x86.zip
7z x php_redis-6.0.0-dev-8.2-ts-vs16-x86.zip -y >nul
cd ..
Copy php.ini-development php.ini-min
"memory_limit=-1" >> php.ini-min
"serialize_precision=-1" >> php.ini-min
"max_execution_time=1200" >> php.ini-min
"post_max_size=2047M" >> php.ini-min
"upload_max_filesize=2047M" >> php.ini-min
"date.timezone=`"America/Los_Angeles`"" >> php.ini-min
"extension_dir=ext" >> php.ini-min
"extension=php_xsl.dll" >> php.ini-min
"extension=php_mbstring.dll" >> php.ini-min
Copy php.ini-min php.ini-max
"zend_extension=php_opcache.dll" >> php.ini-max
"opcache.enable_cli=1" >> php.ini-max
"extension=php_openssl.dll" >> php.ini-max
"extension=php_apcu.dll" >> php.ini-max
"extension=php_igbinary.dll" >> php.ini-max
"extension=php_redis.dll" >> php.ini-max
"apc.enable_cli=1" >> php.ini-max
"extension=php_intl.dll" >> php.ini-max
"extension=php_fileinfo.dll" >> php.ini-max
"extension=php_pdo_sqlite.dll" >> php.ini-max
"extension=php_curl.dll" >> php.ini-max
"extension=php_sodium.dll" >> php.ini-max
Copy php.ini-max php.ini
cd ${{ github.workspace }}
iwr -outf composer.phar https://getcomposer.org/download/latest-stable/composer.phar
- name: Install dependencies
id: setup
run: |
$env:Path = 'c:\php;' + $env:Path
mkdir $env:APPDATA\Composer && Copy .github\composer-config.json $env:APPDATA\Composer\config.json
$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
$env:COMPOSER_ROOT_VERSION=$env:SYMFONY_VERSION + ".x-dev"
php .github/build-packages.php HEAD^ $env:SYMFONY_VERSION src\Symfony\Bridge\PhpUnit
php composer.phar update --no-progress --ansi
- name: Install PHPUnit
run: |
$env:Path = 'c:\php;' + $env:Path
php phpunit install
- name: Install memurai-developer
run: |
choco install --no-progress memurai-developer
- name: Run tests (minimal extensions)
if: always() && steps.setup.outcome == 'success'
run: |
$env:Path = 'c:\php;' + $env:Path
$env:SYMFONY_PHPUNIT_SKIPPED_TESTS = 'phpunit.skipped'
$x = 0
Copy c:\php\php.ini-min c:\php\php.ini
Remove-Item -Path src\Symfony\Bridge\PhpUnit -Recurse
mv src\Symfony\Component\HttpClient\phpunit.xml.dist src\Symfony\Component\HttpClient\phpunit.xml
php phpunit src\Symfony --exclude-group tty,benchmark,intl-data,network,transient-on-windows || ($x = 1)
php phpunit src\Symfony\Component\HttpClient || ($x = 1)
exit $x
- name: Run tests
if: always() && steps.setup.outcome == 'success'
run: |
$env:Path = 'c:\php;' + $env:Path
$env:SYMFONY_PHPUNIT_SKIPPED_TESTS = 'phpunit.skipped'
$x = 0
Copy c:\php\php.ini-max c:\php\php.ini
php phpunit src\Symfony --exclude-group tty,benchmark,intl-data,network,transient-on-windows || ($x = 1)
php phpunit src\Symfony\Component\HttpClient || ($x = 1)
exit $x