Use Custom build for 5.3 and 5.3 on windows
This commit is contained in:
parent
3a473c9a22
commit
95be7a9cfc
@ -292,7 +292,7 @@ steps:
|
|||||||
|
|
||||||
- `NTS` versions are setup by default.
|
- `NTS` versions are setup by default.
|
||||||
- On `ubuntu` and `macOS` only NTS versions are supported.
|
- On `ubuntu` and `macOS` only NTS versions are supported.
|
||||||
- On `windows` both `TS` and `NTS` versions are supported.
|
- On `windows` both `TS` and `NTS` versions are supported for PHP 5.5 and above.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
@ -177,6 +177,7 @@ if((Test-Path env:PHPTS) -and $env:PHPTS -eq 'ts') {
|
|||||||
$ts = $true
|
$ts = $true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Remove-Item $php_dir\* -Recurse
|
||||||
Step-Log "Setup PhpManager"
|
Step-Log "Setup PhpManager"
|
||||||
Install-Module -Name PhpManager -Force -Scope CurrentUser
|
Install-Module -Name PhpManager -Force -Scope CurrentUser
|
||||||
Add-Log $tick "PhpManager" "Installed"
|
Add-Log $tick "PhpManager" "Installed"
|
||||||
@ -192,15 +193,20 @@ if (Test-Path -LiteralPath $php_dir -PathType Container) {
|
|||||||
Step-Log "Setup PHP"
|
Step-Log "Setup PHP"
|
||||||
$status = "Installed"
|
$status = "Installed"
|
||||||
if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version -replace '^(\d+(\.\d+)*).*', '$1.'))) -or $ts -ne $installed.ThreadSafe) {
|
if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version -replace '^(\d+(\.\d+)*).*', '$1.'))) -or $ts -ne $installed.ThreadSafe) {
|
||||||
if ($version -lt '7.0') {
|
if ($version -lt "5.5"){
|
||||||
Install-Module -Name VcRedist -Force
|
$bintray = "https://dl.bintray.com/shivammathur/php"
|
||||||
$arch='x86'
|
Invoke-WebRequest -UseBasicParsing -Uri $bintray/php$version.7z -OutFile C:\tools\php$version.7z > $null 2>&1
|
||||||
|
7z x C:\tools\php$version.7z -oC:\tools\ > $null 2>&1
|
||||||
|
} else {
|
||||||
|
if ($version -lt '7.0') {
|
||||||
|
Install-Module -Name VcRedist -Force
|
||||||
|
$arch='x86'
|
||||||
|
}
|
||||||
|
if ($version -eq $master_version) { $version = 'master' }
|
||||||
|
Install-Php -Version $version -Architecture $arch -ThreadSafe $ts -InstallVC -Path $php_dir -TimeZone UTC -InitialPhpIni Production -Force > $null 2>&1
|
||||||
|
Set-PhpIniKey -Key 'date.timezone' -Value 'UTC' -Path $php_dir
|
||||||
|
Enable-PhpExtension -Extension openssl, curl, opcache -Path $php_dir
|
||||||
}
|
}
|
||||||
if ($version -eq $master_version) {
|
|
||||||
$version = 'master'
|
|
||||||
}
|
|
||||||
|
|
||||||
Install-Php -Version $version -Architecture $arch -ThreadSafe $ts -InstallVC -Path $php_dir -TimeZone UTC -InitialPhpIni Production -Force >$null 2>&1
|
|
||||||
} else {
|
} else {
|
||||||
if((Test-Path env:update) -and $env:update -eq 'true') {
|
if((Test-Path env:update) -and $env:update -eq 'true') {
|
||||||
Update-Php $php_dir > $null 2>&1
|
Update-Php $php_dir > $null 2>&1
|
||||||
@ -211,13 +217,6 @@ if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version
|
|||||||
}
|
}
|
||||||
|
|
||||||
$installed = Get-Php -Path $php_dir
|
$installed = Get-Php -Path $php_dir
|
||||||
Set-PhpIniKey -Key 'date.timezone' -Value 'UTC' -Path $php_dir
|
|
||||||
if($version -lt "5.5") {
|
|
||||||
Add-Extension openssl >$null 2>&1
|
|
||||||
Add-Extension curl >$null 2>&1
|
|
||||||
} else {
|
|
||||||
Enable-PhpExtension -Extension openssl, curl, opcache -Path $php_dir
|
|
||||||
}
|
|
||||||
Update-PhpCAInfo -Path $php_dir -Source CurrentUser
|
Update-PhpCAInfo -Path $php_dir -Source CurrentUser
|
||||||
if ($version -eq 'master') {
|
if ($version -eq 'master') {
|
||||||
if($installed.ThreadSafe) {
|
if($installed.ThreadSafe) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user