.appveyor.yml.backup 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. version: "{branch}.build.{build}"
  2. skip_tags: true
  3. branches:
  4. only:
  5. - master
  6. - dev
  7. clone_folder: c:\projects\xlswriter
  8. install:
  9. ps: |
  10. if (-not (Test-Path c:\build-cache)) {
  11. mkdir c:\build-cache
  12. }
  13. $bname = 'php-sdk-' + $env:BIN_SDK_VER + '.zip'
  14. if (-not (Test-Path c:\build-cache\$bname)) {
  15. Invoke-WebRequest "https://github.com/OSTC/php-sdk-binary-tools/archive/$bname" -OutFile "c:\build-cache\$bname"
  16. }
  17. $dname0 = 'php-sdk-binary-tools-php-sdk-' + $env:BIN_SDK_VER
  18. $dname1 = 'php-sdk-' + $env:BIN_SDK_VER
  19. if (-not (Test-Path c:\build-cache\$dname1)) {
  20. 7z x c:\build-cache\$bname -oc:\build-cache
  21. move c:\build-cache\$dname0 c:\build-cache\$dname1
  22. }
  23. $lname2 = 'zlib-1.2.11.tar.gz'
  24. $lname3 = 'zlib'
  25. if (-not (Test-Path c:\build-cache\$lname2)) {
  26. $zliurl = "http://zlib.net/" + $lname2
  27. Invoke-WebRequest $zliurl -OutFile "c:\build-cache\$lname2"
  28. }
  29. if (-not (Test-Path c:\build-cache\$lname3)) {
  30. & 7z x c:\build-cache\$lname2 -oc:\build-cache
  31. & 7z x c:\build-cache\zlib-1.2.11.tar -oc:\build-cache\$lname3
  32. }
  33. if (-not (Test-Path c:\build-cache\$lname3\Release)) {
  34. cd c:\build-cache\$lname3\zlib-1.2.11
  35. $cmakegen = 'Visual Studio 15 2017'
  36. if ($env:VC -Match "vc14") {
  37. $cmakegen = "Visual Studio 14 2015"
  38. }
  39. & cmake -G $cmakegen -DCMAKE_BUILD_TYPE="Release" -DCMAKE_C_FLAGS_RELEASE="/MT"
  40. & cmake --build . --config "Release"
  41. }
  42. cache:
  43. c:\build-cache -> .appveyor.yml
  44. environment:
  45. BIN_SDK_VER: 2.1.2
  46. LIBXLSXWRITER_VER: 0.7.7
  47. matrix:
  48. - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
  49. ARCH: x64
  50. VC: vc14
  51. PHP_VER: 7.0.28
  52. TS: 0
  53. - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
  54. ARCH: x64
  55. VC: vc14
  56. PHP_VER: 7.0.28
  57. TS: 1
  58. - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
  59. ARCH: x86
  60. VC: vc14
  61. PHP_VER: 7.0.28
  62. TS: 0
  63. - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
  64. ARCH: x86
  65. VC: vc14
  66. PHP_VER: 7.0.28
  67. TS: 1
  68. - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
  69. ARCH: x64
  70. VC: vc14
  71. PHP_VER: 7.1.15
  72. TS: 0
  73. - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
  74. ARCH: x64
  75. VC: vc14
  76. PHP_VER: 7.1.15
  77. TS: 1
  78. - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
  79. ARCH: x86
  80. VC: vc14
  81. PHP_VER: 7.1.15
  82. TS: 0
  83. - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
  84. ARCH: x86
  85. VC: vc14
  86. PHP_VER: 7.1.15
  87. TS: 1
  88. - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
  89. ARCH: x64
  90. VC: vc15
  91. PHP_VER: 7.2.3
  92. TS: 0
  93. - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
  94. ARCH: x64
  95. VC: vc15
  96. PHP_VER: 7.2.3
  97. TS: 1
  98. - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
  99. ARCH: x86
  100. VC: vc15
  101. PHP_VER: 7.2.3
  102. TS: 0
  103. - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
  104. ARCH: x86
  105. VC: vc15
  106. PHP_VER: 7.2.3
  107. TS: 1
  108. build_script:
  109. ps: |
  110. $ts_part = ''
  111. if ('0' -eq $env:TS) { $ts_part = '-nts' }
  112. $bname = 'php-devel-pack-' + $env:PHP_VER + $ts_part + '-Win32-' + $env:VC.toUpper() + '-' + $env:ARCH + '.zip'
  113. if (-not (Test-Path c:\build-cache\$bname)) {
  114. Invoke-WebRequest "http://windows.php.net/downloads/releases/archives/$bname" -OutFile "c:\build-cache\$bname"
  115. if (-not (Test-Path c:\build-cache\$bname)) {
  116. Invoke-WebRequest "http://windows.php.net/downloads/releases/$bname" -OutFile "c:\build-cache\$bname"
  117. }
  118. }
  119. $dname0 = 'php-' + $env:PHP_VER + '-devel-' + $env:VC.toUpper() + '-' + $env:ARCH
  120. $dname1 = 'php-' + $env:PHP_VER + $ts_part + '-devel-' + $env:VC.toUpper() + '-' + $env:ARCH
  121. if (-not (Test-Path c:\build-cache\$dname1)) {
  122. 7z x c:\build-cache\$bname -oc:\build-cache
  123. move c:\build-cache\$dname0 c:\build-cache\$dname1
  124. }
  125. cd c:\projects\xlswriter
  126. $env:PATH = 'c:\build-cache\' + $dname1 + ';' + $env:PATH
  127. #echo "@echo off" | Out-File -Encoding "ASCII" task.bat
  128. #echo "" | Out-File -Encoding "ASCII" -Append task.bat
  129. echo "" | Out-File -Encoding "ASCII" task.bat
  130. echo "call git submodule update --init 2>&1" | Out-File -Encoding "ASCII" -Append task.bat
  131. echo "call phpize 2>&1" | Out-File -Encoding "ASCII" -Append task.bat
  132. $conf_cmd = 'call configure --with-xlswriter --with-extra-libs=c:\build-cache\zlib\zlib-1.2.11\Release --with-extra-includes=c:\build-cache\zlib\zlib-1.2.11 --enable-debug-pack 2>&1'
  133. echo $conf_cmd | Out-File -Encoding "ASCII" -Append task.bat
  134. echo "nmake /nologo 2>&1" | Out-File -Encoding "ASCII" -Append task.bat
  135. echo "exit %errorlevel%" | Out-File -Encoding "ASCII" -Append task.bat
  136. $here = (Get-Item -Path "." -Verbose).FullName
  137. $runner = 'c:\build-cache\php-sdk-' + $env:BIN_SDK_VER + '\phpsdk' + '-' + $env:VC + '-' + $env:ARCH + '.bat'
  138. $task = $here + '\task.bat'
  139. & $runner -t $task
  140. after_build:
  141. ps: |
  142. $ts_part = 'ts'
  143. if ('0' -eq $env:TS) { $ts_part = 'nts' }
  144. $zip_bname = 'php_xlswriter-' + $env:APPVEYOR_REPO_COMMIT.substring(0, 8) + '-' + $env:PHP_VER.substring(0, 3) + '-' + $ts_part + '-' + $env:VC + '-' + $env:ARCH + '.zip'
  145. $dir = 'c:\projects\xlswriter\';
  146. if ('x64' -eq $env:ARCH) { $dir = $dir + 'x64\' }
  147. $dir = $dir + 'Release'
  148. if ('1' -eq $env:TS) { $dir = $dir + '_TS' }
  149. & 7z a c:\$zip_bname $dir\php_xlswriter.dll c:\projects\xlswriter\LICENSE
  150. Push-AppveyorArtifact c:\$zip_bname
  151. test_script:
  152. ps: |
  153. $ts_part = ''
  154. if ('0' -eq $env:TS) { $ts_part = '-nts' }
  155. $bname = 'php-' + $env:PHP_VER + $ts_part + '-Win32-' + $env:VC.toUpper() + '-' + $env:ARCH + '.zip'
  156. if (-not (Test-Path c:\build-cache\$bname)) {
  157. Invoke-WebRequest "http://windows.php.net/downloads/releases/archives/$bname" -OutFile "c:\build-cache\$bname"
  158. if (-not (Test-Path c:\build-cache\$bname)) {
  159. Invoke-WebRequest "http://windows.php.net/downloads/releases/$bname" -OutFile "c:\build-cache\$bname"
  160. }
  161. }
  162. $dname = 'php-' + $env:PHP_VER + $ts_part + '-' + $env:VC.toUpper() + '-' + $env:ARCH
  163. if (-not (Test-Path c:\build-cache\$dname)) {
  164. 7z x c:\build-cache\$bname -oc:\build-cache\$dname
  165. }
  166. cd c:\projects\xlswriter
  167. echo "" | Out-File -Encoding "ASCII" task.bat
  168. echo "set REPORT_EXIT_STATUS=1" | Out-File -Encoding "ASCII" -Append task.bat
  169. $cmd = 'call configure --with-xlswriter --with-xlswriter --with-extra-libs=c:\build-cache\zlib\zlib-1.2.11\Release --with-extra-includes=c:\build-cache\zlib\zlib-1.2.11 --with-prefix=c:\build-cache\' + $dname + ' 2>&1'
  170. echo $cmd | Out-File -Encoding "ASCII" -Append task.bat
  171. echo 'nmake /nologo test TESTS="-q --show-diff --set-timeout 120" 2>&1' | Out-File -Encoding "ASCII" -Append task.bat
  172. echo "exit %errorlevel%" | Out-File -Encoding "ASCII" -Append task.bat
  173. $here = (Get-Item -Path "." -Verbose).FullName
  174. $runner = 'c:\build-cache\php-sdk-' + $env:BIN_SDK_VER + '\phpsdk' + '-' + $env:VC + '-' + $env:ARCH + '.bat'
  175. $task = $here + '\task.bat'
  176. & $runner -t $task