2019-03-14 01:19:05 +03:00
|
|
|
# Add steps that build, run tests, deploy, and more:
|
|
|
|
# https://aka.ms/yaml
|
|
|
|
|
|
|
|
variables:
|
2019-04-09 17:28:26 +03:00
|
|
|
server: 'localhost,1433'
|
2019-03-14 01:19:05 +03:00
|
|
|
host: 'sql1'
|
|
|
|
sqlsrv_db: 'sqlsrv_testdb'
|
|
|
|
pdo_sqlsrv_db: 'pdo_sqlsrv_testdb'
|
|
|
|
uid: 'sa'
|
|
|
|
pwd: 'Password456!'
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
- dev
|
2022-09-28 16:25:52 +03:00
|
|
|
- fix/*
|
2019-03-14 01:19:05 +03:00
|
|
|
|
2020-10-08 22:30:04 +03:00
|
|
|
pr:
|
|
|
|
- dev
|
|
|
|
|
2019-03-14 01:19:05 +03:00
|
|
|
jobs:
|
|
|
|
- job: macOS
|
|
|
|
pool:
|
2023-02-28 02:01:36 +03:00
|
|
|
vmImage: 'macos-latest'
|
2019-03-14 01:19:05 +03:00
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
clean: true
|
|
|
|
fetchDepth: 1
|
|
|
|
|
|
|
|
- task: UsePythonVersion@0
|
|
|
|
inputs:
|
2022-01-14 04:20:36 +03:00
|
|
|
versionSpec: '3.x'
|
2019-03-14 01:19:05 +03:00
|
|
|
architecture: 'x64'
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
brew tap
|
|
|
|
brew tap homebrew/core
|
2020-10-08 22:30:04 +03:00
|
|
|
brew reinstall autoconf automake libtool
|
2019-03-14 01:19:05 +03:00
|
|
|
php -v
|
2022-01-14 04:20:36 +03:00
|
|
|
displayName: 'Install PHP prerequisites'
|
2019-03-14 01:19:05 +03:00
|
|
|
|
|
|
|
- script: |
|
|
|
|
echo ready to build extensions
|
|
|
|
cd $(Build.SourcesDirectory)/source
|
|
|
|
chmod a+x packagize.sh
|
|
|
|
./packagize.sh
|
|
|
|
|
|
|
|
cd $(Build.SourcesDirectory)/source/sqlsrv
|
|
|
|
ls -al
|
|
|
|
phpize && ./configure && make && sudo make install
|
|
|
|
cp run-tests.php $(Build.SourcesDirectory)/test/functional/sqlsrv
|
|
|
|
|
|
|
|
cd $(Build.SourcesDirectory)/source/pdo_sqlsrv
|
|
|
|
ls -al
|
|
|
|
phpize && ./configure && make && sudo make install
|
|
|
|
cp run-tests.php $(Build.SourcesDirectory)/test/functional/pdo_sqlsrv
|
|
|
|
|
|
|
|
echo extension=pdo_sqlsrv.so >> `php --ini | grep "Loaded Configuration File" | sed -e "s|.*:\s*||"`
|
|
|
|
echo extension=sqlsrv.so >> `php --ini | grep "Loaded Configuration File" | sed -e "s|.*:\s*||"`
|
|
|
|
|
|
|
|
php --ri sqlsrv
|
|
|
|
php --ri pdo_sqlsrv
|
|
|
|
displayName: 'Build and install drivers'
|
|
|
|
|
|
|
|
- job: Linux
|
2020-01-06 21:57:55 +03:00
|
|
|
variables:
|
2023-10-05 01:36:31 +03:00
|
|
|
phpver: 8.1
|
2019-03-14 01:19:05 +03:00
|
|
|
pool:
|
2022-01-14 04:20:36 +03:00
|
|
|
vmImage: 'ubuntu-20.04'
|
2019-03-14 01:19:05 +03:00
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
clean: true
|
|
|
|
fetchDepth: 1
|
|
|
|
|
|
|
|
- task: UsePythonVersion@0
|
|
|
|
inputs:
|
2022-01-14 04:20:36 +03:00
|
|
|
versionSpec: '3.x'
|
2019-03-14 01:19:05 +03:00
|
|
|
architecture: 'x64'
|
2019-12-18 03:25:57 +03:00
|
|
|
|
2019-03-14 01:19:05 +03:00
|
|
|
- script: |
|
2020-01-06 21:57:55 +03:00
|
|
|
sudo update-alternatives --set php /usr/bin/php$(phpver)
|
2020-01-22 19:01:59 +03:00
|
|
|
sudo update-alternatives --set phpize /usr/bin/phpize$(phpver)
|
2020-01-06 21:57:55 +03:00
|
|
|
sudo update-alternatives --set phar /usr/bin/phar$(phpver)
|
|
|
|
sudo update-alternatives --set phpdbg /usr/bin/phpdbg$(phpver)
|
|
|
|
sudo update-alternatives --set php-cgi /usr/bin/php-cgi$(phpver)
|
|
|
|
sudo update-alternatives --set phar.phar /usr/bin/phar.phar$(phpver)
|
2020-01-22 19:01:59 +03:00
|
|
|
sudo update-alternatives --set php-config /usr/bin/php-config$(phpver)
|
2020-12-24 06:23:06 +03:00
|
|
|
sudo phpdismod xdebug
|
2019-03-14 01:19:05 +03:00
|
|
|
php -version
|
2020-01-06 21:57:55 +03:00
|
|
|
displayName: 'Use PHP version $(phpver)'
|
2019-03-14 01:19:05 +03:00
|
|
|
|
|
|
|
- script: |
|
|
|
|
echo install ODBC and dependencies
|
|
|
|
sudo apt-get purge unixodbc
|
|
|
|
sudo apt autoremove
|
|
|
|
sudo curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
|
2022-01-14 04:20:36 +03:00
|
|
|
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list > mssql-release.list
|
2019-03-14 01:19:05 +03:00
|
|
|
sudo mv mssql-release.list /etc/apt/sources.list.d/
|
|
|
|
sudo apt-get update
|
|
|
|
sudo ACCEPT_EULA=Y apt-get install msodbcsql17 mssql-tools
|
|
|
|
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
|
|
|
|
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
|
|
|
|
source ~/.bashrc
|
|
|
|
sudo apt-get install unixodbc-dev
|
|
|
|
odbcinst --j
|
|
|
|
odbcinst -q -d -n "ODBC Driver 17 for SQL Server"
|
|
|
|
displayName: 'Install prerequisites'
|
|
|
|
|
|
|
|
- script: |
|
2020-10-10 03:29:59 +03:00
|
|
|
python -m pip install --upgrade pip
|
|
|
|
python -m pip install --upgrade requests
|
2020-10-14 04:14:57 +03:00
|
|
|
python -m pip install PyYAML
|
2020-10-10 03:29:59 +03:00
|
|
|
python -m pip install cpp-coveralls
|
|
|
|
displayName: 'Install coveralls (upgrade both pip and requests first)'
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
docker pull mcr.microsoft.com/mssql/server:2019-latest
|
|
|
|
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=$(pwd)' -p 1433:1433 -h $(host) --name=$(host) -d mcr.microsoft.com/mssql/server:2019-latest
|
2019-03-14 01:19:05 +03:00
|
|
|
docker ps -a
|
2020-03-25 19:53:18 +03:00
|
|
|
sleep 10
|
2019-05-17 21:36:51 +03:00
|
|
|
docker exec -t $(host) /opt/mssql-tools/bin/sqlcmd -S $(server) -U $(uid) -P $(pwd) -Q 'select @@Version'
|
2019-03-14 01:19:05 +03:00
|
|
|
displayName: 'Run SQL Server for Linux'
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
sudo sed -i 's/# en_US ISO-8859-1/en_US ISO-8859-1/g' /etc/locale.gen
|
2020-04-17 01:29:37 +03:00
|
|
|
sudo sed -i 's/# fr_FR@euro ISO-8859-15/fr_FR@euro ISO-8859-15/g' /etc/locale.gen
|
2019-12-19 22:03:25 +03:00
|
|
|
sudo sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g' /etc/locale.gen
|
|
|
|
sudo sed -i 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/g' /etc/locale.gen
|
2020-07-29 20:43:00 +03:00
|
|
|
sudo sed -i 's/# zh_CN GB2312/zh_CN GB2312/g' /etc/locale.gen
|
|
|
|
sudo sed -i 's/# zh_CN.GB18030 GB18030/zh_CN.GB18030 GB18030/g' /etc/locale.gen
|
2019-12-19 22:03:25 +03:00
|
|
|
sudo locale-gen
|
2019-12-18 03:25:57 +03:00
|
|
|
export LANG='en_US.UTF-8'
|
|
|
|
export LANGUAGE='en_US:en'
|
2019-03-14 01:19:05 +03:00
|
|
|
export LC_ALL='en_US.UTF-8'
|
|
|
|
displayName: 'Generate locales for testing'
|
|
|
|
|
|
|
|
- script: |
|
2019-12-18 03:25:57 +03:00
|
|
|
echo setting env variables
|
2019-03-14 01:19:05 +03:00
|
|
|
export TEST_PHP_SQL_SERVER='$(server)'
|
|
|
|
export TEST_PHP_SQL_UID='$(uid)'
|
|
|
|
export TEST_PHP_SQL_PWD='$(pwd)'
|
|
|
|
|
|
|
|
cd $(Build.SourcesDirectory)/test/functional/setup
|
|
|
|
python ./setup_dbs.py -dbname $(sqlsrv_db)
|
|
|
|
python ./setup_dbs.py -dbname $(pdo_sqlsrv_db)
|
|
|
|
displayName: 'Set up test databases'
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
echo ready to build extensions
|
2020-01-06 21:57:55 +03:00
|
|
|
sudo apt-get install -y php$(phpver)-intl
|
2019-03-14 01:19:05 +03:00
|
|
|
cd $(Build.SourcesDirectory)/source
|
|
|
|
chmod a+x packagize.sh
|
|
|
|
./packagize.sh
|
|
|
|
|
|
|
|
dest=`php --ini | grep "Scan for additional .ini files" | sudo sed -e "s|.*:\s*||"`/
|
2019-12-18 03:25:57 +03:00
|
|
|
|
2019-03-14 01:19:05 +03:00
|
|
|
cd $(Build.SourcesDirectory)/source/sqlsrv
|
|
|
|
ls -al
|
2020-10-10 03:29:59 +03:00
|
|
|
phpize && ./configure LDFLAGS="-lgcov" CXXFLAGS="-O0 --coverage" && make && sudo make install
|
2019-03-14 01:19:05 +03:00
|
|
|
cp run-tests.php $(Build.SourcesDirectory)/test/functional/sqlsrv
|
|
|
|
echo extension=sqlsrv.so >> 20-sqlsrv.ini
|
|
|
|
|
|
|
|
echo copying sqlsrv to $dest
|
|
|
|
sudo cp 20-sqlsrv.ini $dest
|
2019-12-18 03:25:57 +03:00
|
|
|
|
2019-03-14 01:19:05 +03:00
|
|
|
cd $(Build.SourcesDirectory)/source/pdo_sqlsrv
|
|
|
|
ls -al
|
2020-10-10 03:29:59 +03:00
|
|
|
phpize && ./configure LDFLAGS="-lgcov" CXXFLAGS="-O0 --coverage" && make && sudo make install
|
2019-03-14 01:19:05 +03:00
|
|
|
cp run-tests.php $(Build.SourcesDirectory)/test/functional/pdo_sqlsrv
|
|
|
|
echo extension=pdo_sqlsrv.so >> 30-pdo_sqlsrv.ini
|
|
|
|
|
|
|
|
echo copying pdo_sqlsrv to $dest
|
|
|
|
sudo cp 30-pdo_sqlsrv.ini $dest
|
|
|
|
|
2019-12-19 22:03:25 +03:00
|
|
|
sudo touch $dest/99-overrides.ini
|
|
|
|
sudo chmod 666 $dest/99-overrides.ini
|
|
|
|
|
2019-03-14 01:19:05 +03:00
|
|
|
php --ri sqlsrv
|
|
|
|
php --ri pdo_sqlsrv
|
|
|
|
displayName: 'Build and install drivers'
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
cd $(Build.SourcesDirectory)/test/functional/sqlsrv
|
|
|
|
sed -i -e 's/TARGET_SERVER/'"$(server)"'/g' MsSetup.inc
|
|
|
|
sed -i -e 's/TARGET_DATABASE/'"$(sqlsrv_db)"'/g' MsSetup.inc
|
|
|
|
sed -i -e 's/TARGET_USERNAME/'"$(uid)"'/g' MsSetup.inc
|
2019-12-18 03:25:57 +03:00
|
|
|
sed -i -e 's/TARGET_PASSWORD/'"$(pwd)"'/g' MsSetup.inc
|
2019-03-14 01:19:05 +03:00
|
|
|
|
2019-12-19 22:03:25 +03:00
|
|
|
export LC_ALL='en_US.UTF-8'
|
2023-10-05 01:36:31 +03:00
|
|
|
php run-tests.php -P ./*.phpt --no-color --show-diff 2>&1 | tee ../sqlsrv.log
|
2019-03-14 01:19:05 +03:00
|
|
|
displayName: 'Run sqlsrv functional tests'
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
cd $(Build.SourcesDirectory)/test/functional/pdo_sqlsrv
|
|
|
|
sed -i -e 's/TARGET_SERVER/'"$(server)"'/g' MsSetup.inc
|
|
|
|
sed -i -e 's/TARGET_DATABASE/'"$(pdo_sqlsrv_db)"'/g' MsSetup.inc
|
|
|
|
sed -i -e 's/TARGET_USERNAME/'"$(uid)"'/g' MsSetup.inc
|
2019-12-18 03:25:57 +03:00
|
|
|
sed -i -e 's/TARGET_PASSWORD/'"$(pwd)"'/g' MsSetup.inc
|
2019-03-14 01:19:05 +03:00
|
|
|
|
2019-12-19 22:03:25 +03:00
|
|
|
export LC_ALL='en_US.UTF-8'
|
2023-10-05 01:36:31 +03:00
|
|
|
php run-tests.php -P ./*.phpt --no-color --show-diff 2>&1 | tee ../pdo_sqlsrv.log
|
2019-03-14 01:19:05 +03:00
|
|
|
displayName: 'Run pdo_sqlsrv functional tests'
|
|
|
|
|
2020-10-10 03:29:59 +03:00
|
|
|
- script: |
|
|
|
|
cd $(Build.SourcesDirectory)
|
2020-10-14 04:14:57 +03:00
|
|
|
echo -e "service_name: Azure Pipelines\n" > .coveralls.yml
|
2020-10-10 03:29:59 +03:00
|
|
|
coveralls -i ./source/ -e ./source/shared/ -e ./test/ -e ./source/pdo_sqlsrv/shared/core_stream.cpp \
|
2020-10-14 04:14:57 +03:00
|
|
|
-E r'.*localization*' -E r'.*globalization*' --gcov-options '\-lp'
|
2020-10-10 03:29:59 +03:00
|
|
|
displayName: 'Invoke coveralls using repo token'
|
2021-09-22 19:40:57 +03:00
|
|
|
condition: false
|
2020-10-10 03:29:59 +03:00
|
|
|
env:
|
|
|
|
COVERALLS_REPO_TOKEN: $(repo_token)
|
2020-10-14 04:14:57 +03:00
|
|
|
TRAVIS_JOB_ID: $(Build.BuildId)
|
|
|
|
TRAVIS_BRANCH: $(Build.SourceBranchName)
|
2021-09-22 19:40:57 +03:00
|
|
|
PYTHONWARNINGS: ignore::yaml.YAMLLoadWarning
|
2020-10-14 04:14:57 +03:00
|
|
|
|
2019-03-14 01:19:05 +03:00
|
|
|
- script: |
|
2023-10-05 01:36:31 +03:00
|
|
|
docker logs -t $(host)
|
2019-03-14 01:19:05 +03:00
|
|
|
cd $(Build.SourcesDirectory)/test/functional/
|
|
|
|
for f in sqlsrv/*.diff; do ls $f 2>/dev/null; cat $f 2>/dev/null; echo ''; done || true
|
|
|
|
for f in pdo_sqlsrv/*.diff; do ls $f 2>/dev/null; cat $f 2>/dev/null; echo ''; done || true
|
|
|
|
python output.py
|
|
|
|
ls -l *.xml
|
|
|
|
displayName: 'Processing test results'
|
|
|
|
|
|
|
|
- task: PublishTestResults@2
|
|
|
|
inputs:
|
|
|
|
testResultsFormat: 'JUnit'
|
|
|
|
testResultsFiles: '*.xml'
|
|
|
|
failTaskOnFailedTests: true
|
|
|
|
searchFolder: '$(Build.SourcesDirectory)/test/functional/'
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
docker stop $(host)
|
|
|
|
docker rm $(host)
|
|
|
|
displayName: 'Stop SQL Server for Linux'
|
2019-12-18 03:25:57 +03:00
|
|
|
condition: always()
|
2019-03-14 01:19:05 +03:00
|
|
|
|
|
|
|
- job: Windows
|
2022-01-14 04:20:36 +03:00
|
|
|
variables:
|
|
|
|
phpVersion: 8.1
|
2019-03-14 01:19:05 +03:00
|
|
|
pool:
|
2022-01-14 04:20:36 +03:00
|
|
|
vmImage: 'windows-2019'
|
2019-03-14 01:19:05 +03:00
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
clean: true
|
|
|
|
fetchDepth: 1
|
|
|
|
|
|
|
|
- task: UsePythonVersion@0
|
|
|
|
inputs:
|
2022-01-14 04:20:36 +03:00
|
|
|
versionSpec: '3.x'
|
2019-03-14 01:19:05 +03:00
|
|
|
architecture: 'x64'
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
dir C:\tools\php\php*
|
|
|
|
dir C:\tools\php\ext\
|
|
|
|
echo extension_dir=C:\tools\php\ext >> C:\tools\php\php.ini
|
|
|
|
php --ini
|
|
|
|
php -v
|
|
|
|
displayName: 'Check PHP'
|
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
cd $(Build.SourcesDirectory)\test\functional\sqlsrv
|
|
|
|
(Get-Content .\MsSetup.inc) | ForEach-Object { $_ -replace "TARGET_SERVER", "$(host)" -replace "TARGET_DATABASE", "$(sqlsrv_db)" -replace "TARGET_USERNAME", "$(uid)" -replace "TARGET_PASSWORD", "$(pwd)" } | Set-Content .\MsSetup.inc
|
|
|
|
Select-String $(host) .\MsSetup.inc
|
|
|
|
Select-String $(sqlsrv_db) .\MsSetup.inc
|
|
|
|
cd $(Build.SourcesDirectory)\test\functional\pdo_sqlsrv
|
|
|
|
(Get-Content .\MsSetup.inc) | ForEach-Object { $_ -replace "TARGET_SERVER", "$(host)" -replace "TARGET_DATABASE", "$(pdo_sqlsrv_db)" -replace "TARGET_USERNAME", "$(uid)" -replace "TARGET_PASSWORD", "$(pwd)" } | Set-Content .\MsSetup.inc
|
|
|
|
Select-String $(host) .\MsSetup.inc
|
|
|
|
Select-String $(pdo_sqlsrv_db) .\MsSetup.inc
|
|
|
|
displayName: 'Update connection credentials'
|
|
|
|
condition: false
|
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
$client = New-Object Net.WebClient
|
2022-01-14 04:20:36 +03:00
|
|
|
$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/0/e/6/0e63d835-3513-45a0-9cf0-0bc75fb4269e/EN/x64/MsSqlCmdLnUtils.msi', 'MsSqlCmdLnUtils.msi')
|
2019-03-14 01:19:05 +03:00
|
|
|
dir *.msi
|
|
|
|
displayName: 'Download ODBC msi and sql tools msi'
|
|
|
|
condition: false
|
|
|
|
|
|
|
|
- script: |
|
2022-01-14 04:20:36 +03:00
|
|
|
msiexec /i "msodbcsql.msi" /q IACCEPTMSODBCSQLLICENSETERMS=YES ADDLOCAL=ALL
|
2019-03-14 01:19:05 +03:00
|
|
|
reg query "HKLM\SOFTWARE\ODBC\odbcinst.ini\ODBC Driver 17 for SQL Server"
|
|
|
|
dir %WINDIR%\System32\msodbcsql*.dll
|
|
|
|
displayName: 'Install ODBC driver'
|
|
|
|
condition: false
|
|
|
|
|
2019-12-18 03:25:57 +03:00
|
|
|
# FOR SOME REASON the set up did not set the PATH
|
2019-03-14 01:19:05 +03:00
|
|
|
- script: |
|
|
|
|
msiexec /i "MsSqlCmdLnUtils.msi" /qn IACCEPTMSSQLCMDLNUTILSLICENSETERMS=YES
|
|
|
|
displayName: 'Install SQL command line utilities version 15'
|
|
|
|
condition: false
|
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
$client = New-Object Net.WebClient
|
|
|
|
$client.Headers.Add("user-agent", "azure pipeline build")
|
2022-01-14 04:20:36 +03:00
|
|
|
$client.DownloadFile("http://windows.php.net/downloads/releases/releases.json", "releases.json");
|
|
|
|
$jsondata = Get-Content -Path .\releases.json | ConvertFrom-Json
|
|
|
|
$env:VERSION = $jsondata.{$(phpVersion)}.version
|
2019-12-18 03:25:57 +03:00
|
|
|
Write-Host "Latest PHP $(phpVersion) is ${env:VERSION}"
|
2022-01-14 04:20:36 +03:00
|
|
|
cd $(Build.SourcesDirectory)\buildscripts\
|
|
|
|
python builddrivers.py --PHPVER=${env:VERSION} --DRIVER=sqlsrv --ARCH=x64 --THREAD=nts --SOURCE=$(Build.SourcesDirectory)\source --TESTING --NO_RENAME
|
2019-03-18 18:23:31 +03:00
|
|
|
dir *sqlsrv*.dll
|
2022-01-14 04:20:36 +03:00
|
|
|
python builddrivers.py --PHPVER=${env:VERSION} --DRIVER=pdo_sqlsrv --ARCH=x64 --THREAD=nts --SOURCE=$(Build.SourcesDirectory)\source --TESTING --NO_RENAME
|
|
|
|
cp $(Build.SourcesDirectory)\buildscripts\php-sdk\phpdev\vs16\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\pdo_sqlsrv
|
2019-03-14 01:19:05 +03:00
|
|
|
dir *sqlsrv*.dll
|
|
|
|
cp *sqlsrv*.dll C:\tools\php\ext\
|
2019-03-18 18:23:31 +03:00
|
|
|
displayName: 'Build drivers (separately) for the latest version of PHP $(phpVersion)'
|
2019-12-18 03:25:57 +03:00
|
|
|
|
2019-03-14 01:19:05 +03:00
|
|
|
- script: |
|
|
|
|
echo extension=php_sqlsrv.dll >> C:\tools\php\php.ini
|
|
|
|
echo extension=php_pdo_sqlsrv.dll >> C:\tools\php\php.ini
|
|
|
|
php --ri sqlsrv
|
|
|
|
php --ri pdo_sqlsrv
|
|
|
|
displayName: 'Load drivers'
|
2021-01-15 21:02:35 +03:00
|
|
|
condition: false
|
2019-03-14 01:19:05 +03:00
|
|
|
|
|
|
|
- script: |
|
|
|
|
docker pull microsoft/mssql-server-windows-developer
|
|
|
|
docker run -d --name sqlcontainer -h $(host) -p 1433:1433 -e sa_password=$(pwd) -e ACCEPT_EULA=Y microsoft/mssql-server-windows-developer
|
|
|
|
docker ps -a
|
|
|
|
displayName: 'Run SQL Server for Windows Server'
|
|
|
|
condition: false
|
|
|
|
|
2019-12-18 03:25:57 +03:00
|
|
|
- script: |
|
2019-03-14 01:19:05 +03:00
|
|
|
set path=C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;%path%
|
|
|
|
sqlcmd -S $(host) -U $(uid) -P $(pwd) -Q "SELECT @@Version"
|
|
|
|
set TEST_PHP_SQL_SERVER=$(host)
|
|
|
|
set TEST_PHP_SQL_UID=$(uid)
|
|
|
|
set TEST_PHP_SQL_PWD=$(pwd)
|
|
|
|
cd $(Build.SourcesDirectory)\test\functional\setup
|
|
|
|
python setup_dbs.py -dbname $(sqlsrv_db)
|
|
|
|
python setup_dbs.py -dbname $(pdo_sqlsrv_db)
|
|
|
|
displayName: 'Set up test databases'
|
|
|
|
condition: false
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
cd $(Build.SourcesDirectory)\test\functional\sqlsrv
|
|
|
|
php run-tests.php -P sqlsrv_client_info.phpt
|
|
|
|
cd $(Build.SourcesDirectory)\test\functional\pdo_sqlsrv
|
|
|
|
php run-tests.php -P pdo_getAttribute_clientInfo.phpt
|
|
|
|
displayName: 'Smoke testing'
|
|
|
|
condition: false
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
docker stop sqlcontainer
|
|
|
|
docker rm sqlcontainer
|
|
|
|
displayName: 'Stop SQL Server for Windows Server'
|
2019-12-18 03:25:57 +03:00
|
|
|
condition: false
|