123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274 |
- version: "{branch}.build.{build}"
- branches:
- only:
- - master
- - dev
- clone_folder: c:\projects\xlswriter
- install:
- ps: |
- if (-not (Test-Path c:\build-cache)) {
- mkdir c:\build-cache
- }
- $bname = 'php-sdk-' + $env:BIN_SDK_VER + '.zip'
- if (-not (Test-Path c:\build-cache\$bname)) {
- Invoke-WebRequest "https://github.com/OSTC/php-sdk-binary-tools/archive/$bname" -OutFile "c:\build-cache\$bname"
- }
- $dname0 = 'php-sdk-binary-tools-php-sdk-' + $env:BIN_SDK_VER
- $dname1 = 'php-sdk-' + $env:BIN_SDK_VER
- if (-not (Test-Path c:\build-cache\$dname1)) {
- 7z x c:\build-cache\$bname -oc:\build-cache
- move c:\build-cache\$dname0 c:\build-cache\$dname1
- }
- $lname0 = 'zlib-' + $env:ZLIB_VER + '-' + $env:VC.toLower() + '-' + $env:ARCH + '.zip'
- $lname1 = 'zlib'
- if (-not (Test-Path c:\build-cache\$lname0)) {
- $zliurl = "https://windows.php.net/downloads/php-sdk/deps/" + $env:VC.toLower() + "/" + $env:ARCH + "/" + $lname0
- Invoke-WebRequest $zliurl -OutFile "c:\build-cache\$lname0"
- }
- if (-not (Test-Path c:\build-cache\$lname1)) {
- 7z x c:\build-cache\$lname0 -oc:\build-cache\$lname1
- }
- cache:
- c:\build-cache -> .appveyor.yml
- environment:
- BIN_SDK_VER: 2.2.0
- matrix:
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- ARCH: x64
- VC: VC14
- PHP_VER: 7.0.28
- ZLIB_VER: 1.2.8
- TS: 0
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- ARCH: x64
- VC: VC14
- PHP_VER: 7.0.28
- ZLIB_VER: 1.2.8
- TS: 1
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- ARCH: x86
- VC: VC14
- PHP_VER: 7.0.28
- ZLIB_VER: 1.2.8
- TS: 0
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- ARCH: x86
- VC: VC14
- PHP_VER: 7.0.28
- ZLIB_VER: 1.2.8
- TS: 1
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- ARCH: x64
- VC: VC14
- PHP_VER: 7.1.15
- ZLIB_VER: 1.2.8
- TS: 0
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- ARCH: x64
- VC: VC14
- PHP_VER: 7.1.15
- ZLIB_VER: 1.2.8
- TS: 1
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- ARCH: x86
- VC: VC14
- PHP_VER: 7.1.15
- ZLIB_VER: 1.2.8
- TS: 0
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- ARCH: x86
- VC: VC14
- PHP_VER: 7.1.15
- ZLIB_VER: 1.2.8
- TS: 1
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- ARCH: x64
- VC: VC15
- PHP_VER: 7.2.3
- ZLIB_VER: 1.2.11
- TS: 0
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- ARCH: x64
- VC: VC15
- PHP_VER: 7.2.3
- ZLIB_VER: 1.2.11
- TS: 1
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- ARCH: x86
- VC: VC15
- PHP_VER: 7.2.3
- ZLIB_VER: 1.2.11
- TS: 0
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- ARCH: x86
- VC: VC15
- PHP_VER: 7.2.3
- ZLIB_VER: 1.2.11
- TS: 1
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- ARCH: x64
- VC: VC15
- PHP_VER: 7.3.0
- ZLIB_VER: 1.2.11
- TS: 0
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- ARCH: x64
- VC: VC15
- PHP_VER: 7.3.0
- ZLIB_VER: 1.2.11
- TS: 1
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- ARCH: x86
- VC: VC15
- PHP_VER: 7.3.0
- ZLIB_VER: 1.2.11
- TS: 0
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- ARCH: x86
- VC: VC15
- PHP_VER: 7.3.0
- ZLIB_VER: 1.2.11
- TS: 1
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- ARCH: x64
- VC: VC15
- PHP_VER: 7.4.0
- ZLIB_VER: 1.2.11
- TS: 0
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- ARCH: x64
- VC: VC15
- PHP_VER: 7.4.0
- ZLIB_VER: 1.2.11
- TS: 1
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- ARCH: x86
- VC: VC15
- PHP_VER: 7.4.0
- ZLIB_VER: 1.2.11
- TS: 0
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- ARCH: x86
- VC: VC15
- PHP_VER: 7.4.0
- ZLIB_VER: 1.2.11
- TS: 1
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- ARCH: x64
- VC: vs16
- PHP_VER: 8.0.0
- ZLIB_VER: 1.2.11
- TS: 0
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- ARCH: x64
- VC: vs16
- PHP_VER: 8.0.0
- ZLIB_VER: 1.2.11
- TS: 1
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- ARCH: x86
- VC: vs16
- PHP_VER: 8.0.0
- ZLIB_VER: 1.2.11
- TS: 0
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- ARCH: x86
- VC: vs16
- PHP_VER: 8.0.0
- ZLIB_VER: 1.2.11
- TS: 1
- build_script:
- ps: |
- $ts_part = ''
- if ('0' -eq $env:TS) { $ts_part = '-nts' }
- $bname = 'php-devel-pack-' + $env:PHP_VER + $ts_part + '-Win32-' + $env:VC + '-' + $env:ARCH + '.zip'
- if (-not (Test-Path c:\build-cache\$bname)) {
- try {
- Invoke-WebRequest "http://windows.php.net/downloads/releases/archives/$bname" -OutFile "c:\build-cache\$bname"
- } catch {
- if (-not (Test-Path c:\build-cache\$bname)) {
- Invoke-WebRequest "http://windows.php.net/downloads/releases/$bname" -OutFile "c:\build-cache\$bname"
- }
- }
- }
- $dname0 = 'php-' + $env:PHP_VER + '-devel-' + $env:VC + '-' + $env:ARCH
- $dname1 = 'php-' + $env:PHP_VER + $ts_part + '-devel-' + $env:VC + '-' + $env:ARCH
- if (-not (Test-Path c:\build-cache\$dname1)) {
- 7z x c:\build-cache\$bname -oc:\build-cache
- move c:\build-cache\$dname0 c:\build-cache\$dname1
- }
- cd c:\projects\xlswriter
- $env:PATH = 'c:\build-cache\' + $dname1 + ';' + $env:PATH
- #echo "@echo off" | Out-File -Encoding "ASCII" task.bat
- #echo "" | Out-File -Encoding "ASCII" -Append task.bat
- echo "" | Out-File -Encoding "ASCII" task.bat
- echo "call git submodule update --init 2>&1" | Out-File -Encoding "ASCII" -Append task.bat
- echo "call phpize 2>&1" | Out-File -Encoding "ASCII" -Append task.bat
- $conf_cmd = 'call configure --with-xlswriter --with-extra-libs=c:\build-cache\zlib\lib --with-extra-includes=c:\build-cache\zlib\include --enable-debug-pack 2>&1'
- echo $conf_cmd | Out-File -Encoding "ASCII" -Append task.bat
- echo "nmake /nologo 2>&1" | Out-File -Encoding "ASCII" -Append task.bat
- echo "exit %errorlevel%" | Out-File -Encoding "ASCII" -Append task.bat
- $here = (Get-Item -Path "." -Verbose).FullName
- $runner = 'c:\build-cache\php-sdk-' + $env:BIN_SDK_VER + '\phpsdk' + '-' + $env:VC + '-' + $env:ARCH + '.bat'
- $task = $here + '\task.bat'
- & $runner -t $task
- after_build:
- ps: |
- $ts_part = 'ts'
- if ('0' -eq $env:TS) { $ts_part = 'nts' }
- $zip_bname = 'php-windows-xlswriter-' + $env:APPVEYOR_REPO_COMMIT.substring(0, 8) + '-' + $env:PHP_VER.substring(0, 3) + '-' + $ts_part + '-' + $env:VC + '-' + $env:ARCH + '.zip'
- $dir = 'c:\projects\xlswriter\';
- if ('x64' -eq $env:ARCH) { $dir = $dir + 'x64\' }
- $dir = $dir + 'Release'
- if ('1' -eq $env:TS) { $dir = $dir + '_TS' }
- if (-not (Test-Path c:\build-cache\zlib\lib\zlib.pdb)) {
- 7z a c:\$zip_bname $dir\php_xlswriter.dll c:\projects\xlswriter\LICENSE c:\build-cache\zlib\lib\zlib_a.lib c:\build-cache\zlib\lib\zlib_a.pdb
- } else {
- 7z a c:\$zip_bname $dir\php_xlswriter.dll c:\projects\xlswriter\LICENSE c:\build-cache\zlib\lib\zlib_a.lib c:\build-cache\zlib\lib\zlib.pdb
- }
- Push-AppveyorArtifact c:\$zip_bname
- test_script:
- ps: |
- $ts_part = ''
- if ('0' -eq $env:TS) { $ts_part = '-nts' }
- $bname = 'php-' + $env:PHP_VER + $ts_part + '-Win32-' + $env:VC + '-' + $env:ARCH + '.zip'
- if (-not (Test-Path c:\build-cache\$bname)) {
- try {
- Invoke-WebRequest "http://windows.php.net/downloads/releases/archives/$bname" -OutFile "c:\build-cache\$bname"
- } catch {
- if (-not (Test-Path c:\build-cache\$bname)) {
- Invoke-WebRequest "http://windows.php.net/downloads/releases/$bname" -OutFile "c:\build-cache\$bname"
- }
- }
- }
- $dname = 'php-' + $env:PHP_VER + $ts_part + '-' + $env:VC + '-' + $env:ARCH
- if (-not (Test-Path c:\build-cache\$dname)) {
- 7z x c:\build-cache\$bname -oc:\build-cache\$dname
- }
- cd c:\projects\xlswriter
- echo "" | Out-File -Encoding "ASCII" task.bat
- echo "set REPORT_EXIT_STATUS=1" | Out-File -Encoding "ASCII" -Append task.bat
- $cmd = 'call configure --with-xlswriter --with-extra-libs=c:\build-cache\zlib\lib --with-extra-includes=c:\build-cache\zlib\include --with-prefix=c:\build-cache\' + $dname + ' 2>&1'
- echo $cmd | Out-File -Encoding "ASCII" -Append task.bat
- echo 'nmake /nologo test TESTS="-q --show-diff --set-timeout 120" 2>&1' | Out-File -Encoding "ASCII" -Append task.bat
- echo "exit %errorlevel%" | Out-File -Encoding "ASCII" -Append task.bat
- $here = (Get-Item -Path "." -Verbose).FullName
- $runner = 'c:\build-cache\php-sdk-' + $env:BIN_SDK_VER + '\phpsdk' + '-' + $env:VC + '-' + $env:ARCH + '.bat'
- $task = $here + '\task.bat'
- & $runner -t $task
- deploy:
- provider: GitHub
- auth_token: $(GITHUB_OAUTH_TOKEN)
- draft: false
- prerelease: false
- on:
- APPVEYOR_REPO_TAG: true
|