Update yml for azure pipelines (#1354)
This commit is contained in:
parent
0c10bb956b
commit
cde5223367
|
@ -2,7 +2,6 @@
|
||||||
# https://aka.ms/yaml
|
# https://aka.ms/yaml
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
phpVersion: 7.4
|
|
||||||
server: 'localhost,1433'
|
server: 'localhost,1433'
|
||||||
host: 'sql1'
|
host: 'sql1'
|
||||||
sqlsrv_db: 'sqlsrv_testdb'
|
sqlsrv_db: 'sqlsrv_testdb'
|
||||||
|
@ -19,7 +18,7 @@ pr:
|
||||||
jobs:
|
jobs:
|
||||||
- job: macOS
|
- job: macOS
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'macOS-10.14'
|
vmImage: 'macOS-10.15'
|
||||||
steps:
|
steps:
|
||||||
- checkout: self
|
- checkout: self
|
||||||
clean: true
|
clean: true
|
||||||
|
@ -27,16 +26,15 @@ jobs:
|
||||||
|
|
||||||
- task: UsePythonVersion@0
|
- task: UsePythonVersion@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: '3.6'
|
versionSpec: '3.x'
|
||||||
architecture: 'x64'
|
architecture: 'x64'
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
brew tap
|
brew tap
|
||||||
brew tap homebrew/core
|
brew tap homebrew/core
|
||||||
brew reinstall autoconf automake libtool
|
brew reinstall autoconf automake libtool
|
||||||
brew reinstall php@$(phpVersion)
|
|
||||||
php -v
|
php -v
|
||||||
displayName: 'Install PHP'
|
displayName: 'Install PHP prerequisites'
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
echo ready to build extensions
|
echo ready to build extensions
|
||||||
|
@ -63,9 +61,9 @@ jobs:
|
||||||
|
|
||||||
- job: Linux
|
- job: Linux
|
||||||
variables:
|
variables:
|
||||||
phpver: 7.4
|
phpver: 8.0
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-18.04'
|
vmImage: 'ubuntu-20.04'
|
||||||
steps:
|
steps:
|
||||||
- checkout: self
|
- checkout: self
|
||||||
clean: true
|
clean: true
|
||||||
|
@ -73,7 +71,7 @@ jobs:
|
||||||
|
|
||||||
- task: UsePythonVersion@0
|
- task: UsePythonVersion@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: '3.6'
|
versionSpec: '3.x'
|
||||||
architecture: 'x64'
|
architecture: 'x64'
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
|
@ -93,7 +91,7 @@ jobs:
|
||||||
sudo apt-get purge unixodbc
|
sudo apt-get purge unixodbc
|
||||||
sudo apt autoremove
|
sudo apt autoremove
|
||||||
sudo curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
|
sudo curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
|
||||||
curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list > mssql-release.list
|
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list > mssql-release.list
|
||||||
sudo mv mssql-release.list /etc/apt/sources.list.d/
|
sudo mv mssql-release.list /etc/apt/sources.list.d/
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo ACCEPT_EULA=Y apt-get install msodbcsql17 mssql-tools
|
sudo ACCEPT_EULA=Y apt-get install msodbcsql17 mssql-tools
|
||||||
|
@ -186,7 +184,7 @@ jobs:
|
||||||
sed -i -e 's/TARGET_PASSWORD/'"$(pwd)"'/g' MsSetup.inc
|
sed -i -e 's/TARGET_PASSWORD/'"$(pwd)"'/g' MsSetup.inc
|
||||||
|
|
||||||
export LC_ALL='en_US.UTF-8'
|
export LC_ALL='en_US.UTF-8'
|
||||||
php run-tests.php -P ./*.phpt 2>&1 | tee ../sqlsrv.log
|
php run-tests.php -P ./*.phpt --no-color 2>&1 | tee ../sqlsrv.log
|
||||||
displayName: 'Run sqlsrv functional tests'
|
displayName: 'Run sqlsrv functional tests'
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
|
@ -197,7 +195,7 @@ jobs:
|
||||||
sed -i -e 's/TARGET_PASSWORD/'"$(pwd)"'/g' MsSetup.inc
|
sed -i -e 's/TARGET_PASSWORD/'"$(pwd)"'/g' MsSetup.inc
|
||||||
|
|
||||||
export LC_ALL='en_US.UTF-8'
|
export LC_ALL='en_US.UTF-8'
|
||||||
php run-tests.php -P ./*.phpt 2>&1 | tee ../pdo_sqlsrv.log
|
php run-tests.php -P ./*.phpt --no-color 2>&1 | tee ../pdo_sqlsrv.log
|
||||||
displayName: 'Run pdo_sqlsrv functional tests'
|
displayName: 'Run pdo_sqlsrv functional tests'
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
|
@ -235,8 +233,10 @@ jobs:
|
||||||
condition: always()
|
condition: always()
|
||||||
|
|
||||||
- job: Windows
|
- job: Windows
|
||||||
|
variables:
|
||||||
|
phpVersion: 8.1
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'vs2017-win2016'
|
vmImage: 'windows-2019'
|
||||||
steps:
|
steps:
|
||||||
- checkout: self
|
- checkout: self
|
||||||
clean: true
|
clean: true
|
||||||
|
@ -244,7 +244,7 @@ jobs:
|
||||||
|
|
||||||
- task: UsePythonVersion@0
|
- task: UsePythonVersion@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: '3.6'
|
versionSpec: '3.x'
|
||||||
architecture: 'x64'
|
architecture: 'x64'
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
|
@ -269,24 +269,19 @@ jobs:
|
||||||
|
|
||||||
- powershell: |
|
- powershell: |
|
||||||
$client = New-Object Net.WebClient
|
$client = New-Object Net.WebClient
|
||||||
$client.DownloadFile('https://download.microsoft.com/download/E/6/B/E6BFDC7A-5BCD-4C51-9912-635646DA801E/en-US/msodbcsql_17.3.1.1_x64.msi', 'msodbcsql_17.3.1.1_x64.msi')
|
$client.DownloadFile('https://download.microsoft.com/download/a/e/b/aeb7d4ff-ca20-45db-86b8-8a8f774ce97b/en-US/17.8.1.1/x64/msodbcsql.msi', 'c:\projects\msodbcsql.msi')
|
||||||
$client.DownloadFile('https://download.microsoft.com/download/D/5/E/D5EEF288-A277-45C8-855B-8E2CB7E25B96/x64/msodbcsql.msi', 'msodbcsql_13.1.msi')
|
$client.DownloadFile('https://download.microsoft.com/download/0/e/6/0e63d835-3513-45a0-9cf0-0bc75fb4269e/EN/x64/MsSqlCmdLnUtils.msi', 'MsSqlCmdLnUtils.msi')
|
||||||
$client.DownloadFile('https://download.microsoft.com/download/4/C/C/4CC1A229-3C56-4A7F-A3BA-F903C73E5895/EN/x64/MsSqlCmdLnUtils.msi', 'MsSqlCmdLnUtils.msi')
|
|
||||||
dir *.msi
|
dir *.msi
|
||||||
displayName: 'Download ODBC msi and sql tools msi'
|
displayName: 'Download ODBC msi and sql tools msi'
|
||||||
condition: false
|
condition: false
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
msiexec /i "msodbcsql_17.3.1.1_x64.msi" /q IACCEPTMSODBCSQLLICENSETERMS=YES ADDLOCAL=ALL
|
msiexec /i "msodbcsql.msi" /q IACCEPTMSODBCSQLLICENSETERMS=YES ADDLOCAL=ALL
|
||||||
reg query "HKLM\SOFTWARE\ODBC\odbcinst.ini\ODBC Driver 17 for SQL Server"
|
reg query "HKLM\SOFTWARE\ODBC\odbcinst.ini\ODBC Driver 17 for SQL Server"
|
||||||
dir %WINDIR%\System32\msodbcsql*.dll
|
dir %WINDIR%\System32\msodbcsql*.dll
|
||||||
displayName: 'Install ODBC driver'
|
displayName: 'Install ODBC driver'
|
||||||
condition: false
|
condition: false
|
||||||
|
|
||||||
# TOFIX: Install ODBC 13.1 because of SQLCMD 15 installation bug -- this step should be removed later
|
|
||||||
- script: msiexec /i "msodbcsql_13.1.msi" /q IACCEPTMSODBCSQLLICENSETERMS=YES ADDLOCAL=ALL
|
|
||||||
condition: false
|
|
||||||
|
|
||||||
# FOR SOME REASON the set up did not set the PATH
|
# FOR SOME REASON the set up did not set the PATH
|
||||||
- script: |
|
- script: |
|
||||||
msiexec /i "MsSqlCmdLnUtils.msi" /qn IACCEPTMSSQLCMDLNUTILSLICENSETERMS=YES
|
msiexec /i "MsSqlCmdLnUtils.msi" /qn IACCEPTMSSQLCMDLNUTILSLICENSETERMS=YES
|
||||||
|
@ -296,15 +291,16 @@ jobs:
|
||||||
- powershell: |
|
- powershell: |
|
||||||
$client = New-Object Net.WebClient
|
$client = New-Object Net.WebClient
|
||||||
$client.Headers.Add("user-agent", "azure pipeline build")
|
$client.Headers.Add("user-agent", "azure pipeline build")
|
||||||
$client.DownloadFile("https://windows.php.net/downloads/releases/sha256sum.txt", "sha256sum.txt")
|
$client.DownloadFile("http://windows.php.net/downloads/releases/releases.json", "releases.json");
|
||||||
$env:VERSION=type sha256sum.txt | where { $_ -match "php-($(phpVersion)\.\d+)-src" } | foreach { $matches[1] }
|
$jsondata = Get-Content -Path .\releases.json | ConvertFrom-Json
|
||||||
|
$env:VERSION = $jsondata.{$(phpVersion)}.version
|
||||||
Write-Host "Latest PHP $(phpVersion) is ${env:VERSION}"
|
Write-Host "Latest PHP $(phpVersion) is ${env:VERSION}"
|
||||||
cd $(Build.SourcesDirectory)/buildscripts/
|
cd $(Build.SourcesDirectory)\buildscripts\
|
||||||
python builddrivers.py --PHPVER=${env:VERSION} --DRIVER=sqlsrv --ARCH=x64 --THREAD=nts --SOURCE=$(Build.SourcesDirectory)/source --TESTING --NO_RENAME
|
python builddrivers.py --PHPVER=${env:VERSION} --DRIVER=sqlsrv --ARCH=x64 --THREAD=nts --SOURCE=$(Build.SourcesDirectory)\source --TESTING --NO_RENAME
|
||||||
dir *sqlsrv*.dll
|
dir *sqlsrv*.dll
|
||||||
python builddrivers.py --PHPVER=${env:VERSION} --DRIVER=pdo_sqlsrv --ARCH=x64 --THREAD=nts --SOURCE=$(Build.SourcesDirectory)/source --TESTING --NO_RENAME
|
python builddrivers.py --PHPVER=${env:VERSION} --DRIVER=pdo_sqlsrv --ARCH=x64 --THREAD=nts --SOURCE=$(Build.SourcesDirectory)\source --TESTING --NO_RENAME
|
||||||
cp php-sdk\phpdev\vc15\x64\php-${env:VERSION}-src\run-tests.php $(Build.SourcesDirectory)\test\functional\sqlsrv
|
cp $(Build.SourcesDirectory)\buildscripts\php-sdk\phpdev\vs16\x64\php-${env:VERSION}-src\run-tests.php $(Build.SourcesDirectory)\test\functional\sqlsrv
|
||||||
cp php-sdk\phpdev\vc15\x64\php-${env:VERSION}-src\run-tests.php $(Build.SourcesDirectory)\test\functional\pdo_sqlsrv
|
cp $(Build.SourcesDirectory)\buildscripts\php-sdk\phpdev\vs16\x64\php-${env:VERSION}-src\run-tests.php $(Build.SourcesDirectory)\test\functional\pdo_sqlsrv
|
||||||
dir *sqlsrv*.dll
|
dir *sqlsrv*.dll
|
||||||
cp *sqlsrv*.dll C:\tools\php\ext\
|
cp *sqlsrv*.dll C:\tools\php\ext\
|
||||||
displayName: 'Build drivers (separately) for the latest version of PHP $(phpVersion)'
|
displayName: 'Build drivers (separately) for the latest version of PHP $(phpVersion)'
|
||||||
|
|
Loading…
Reference in a new issue