1version: "{branch}.build.{build}" 2skip_tags: true 3 4branches: 5 only: 6 - master 7 8clone_folder: c:\projects\ast 9 10install: 11 ps: | 12 if (-not (Test-Path c:\build-cache)) { 13 mkdir c:\build-cache 14 } 15 $bname = 'php-sdk-' + $env:BIN_SDK_VER + '.zip' 16 if (-not (Test-Path c:\build-cache\$bname)) { 17 Invoke-WebRequest "https://github.com/OSTC/php-sdk-binary-tools/archive/$bname" -OutFile "c:\build-cache\$bname" 18 } 19 $dname0 = 'php-sdk-binary-tools-php-sdk-' + $env:BIN_SDK_VER 20 $dname1 = 'php-sdk-' + $env:BIN_SDK_VER 21 if (-not (Test-Path c:\build-cache\$dname1)) { 22 7z x c:\build-cache\$bname -oc:\build-cache 23 move c:\build-cache\$dname0 c:\build-cache\$dname1 24 } 25 26cache: 27 c:\build-cache -> .appveyor.yml 28 29environment: 30 BIN_SDK_VER: 2.2.0 31 matrix: 32 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 33 ARCH: x86 34 VC: vs16 35 PHP_VER: 8.1.0 36 TS: 1 37 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 38 ARCH: x64 39 VC: vs16 40 PHP_VER: 8.1.0 41 TS: 1 42 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 43 ARCH: x86 44 VC: vs16 45 PHP_VER: 8.1.0 46 TS: 0 47 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 48 ARCH: x64 49 VC: vs16 50 PHP_VER: 8.1.0 51 TS: 0 52 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 53 ARCH: x86 54 VC: vs16 55 PHP_VER: 8.0.13 56 TS: 1 57 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 58 ARCH: x64 59 VC: vs16 60 PHP_VER: 8.0.13 61 TS: 1 62 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 63 ARCH: x86 64 VC: vs16 65 PHP_VER: 8.0.13 66 TS: 0 67 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 68 ARCH: x64 69 VC: vs16 70 PHP_VER: 8.0.13 71 TS: 0 72 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 73 ARCH: x64 74 VC: vc15 75 PHP_VER: 7.2.34 76 TS: 0 77 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 78 ARCH: x64 79 VC: vc15 80 PHP_VER: 7.2.34 81 TS: 1 82 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 83 ARCH: x86 84 VC: vc15 85 PHP_VER: 7.2.34 86 TS: 0 87 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 88 ARCH: x86 89 VC: vc15 90 PHP_VER: 7.2.34 91 TS: 1 92 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 93 ARCH: x64 94 VC: vc15 95 PHP_VER: 7.3.33 96 TS: 0 97 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 98 ARCH: x64 99 VC: vc15 100 PHP_VER: 7.3.33 101 TS: 1 102 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 103 ARCH: x86 104 VC: vc15 105 PHP_VER: 7.3.33 106 TS: 0 107 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 108 ARCH: x86 109 VC: vc15 110 PHP_VER: 7.3.33 111 TS: 1 112 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 113 ARCH: x64 114 VC: vc15 115 PHP_VER: 7.4.26 116 TS: 0 117 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 118 ARCH: x64 119 VC: vc15 120 PHP_VER: 7.4.26 121 TS: 1 122 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 123 ARCH: x86 124 VC: vc15 125 PHP_VER: 7.4.26 126 TS: 0 127 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 128 ARCH: x86 129 VC: vc15 130 PHP_VER: 7.4.26 131 TS: 1 132 133build_script: 134 ps: | 135 $ts_part = '' 136 if ('0' -eq $env:TS) { $ts_part = '-nts' } 137 $bname = 'php-devel-pack-' + $env:PHP_VER + $ts_part + '-Win32-' + $env:VC.toUpper() + '-' + $env:ARCH + '.zip' 138 $urls = @( 139 "https://windows.php.net/downloads/releases/archives/$bname", 140 "https://windows.php.net/downloads/releases/$bname", 141 "https://windows.php.net/downloads/qa/$bname", 142 "https://windows.php.net/downloads/qa/archives/$bname" 143 ) 144 foreach ($url in $urls) { 145 Invoke-WebRequest $url -OutFile "c:\build-cache\$bname" 146 if (Test-Path c:\build-cache\$bname) { 147 break; 148 } 149 } 150 $dname0 = 'php-' + $env:PHP_VER + '-devel-' + $env:VC.toUpper() + '-' + $env:ARCH 151 $dname1 = 'php-' + $env:PHP_VER + $ts_part + '-devel-' + $env:VC.toUpper() + '-' + $env:ARCH 152 if (-not (Test-Path c:\build-cache\$dname1)) { 153 7z x c:\build-cache\$bname -oc:\build-cache 154 if ($dname0 -ne $dname1) { 155 move c:\build-cache\$dname0 c:\build-cache\$dname1 156 } 157 } 158 cd c:\projects\ast 159 $env:PATH = 'c:\build-cache\' + $dname1 + ';' + $env:PATH 160 #echo "@echo off" | Out-File -Encoding "ASCII" task.bat 161 #echo "" | Out-File -Encoding "ASCII" -Append task.bat 162 echo "" | Out-File -Encoding "ASCII" task.bat 163 echo "call phpize 2>&1" | Out-File -Encoding "ASCII" -Append task.bat 164 echo "call configure --enable-ast --enable-debug-pack 2>&1" | Out-File -Encoding "ASCII" -Append task.bat 165 echo "nmake /nologo 2>&1" | Out-File -Encoding "ASCII" -Append task.bat 166 echo "exit %errorlevel%" | Out-File -Encoding "ASCII" -Append task.bat 167 $here = (Get-Item -Path "." -Verbose).FullName 168 $runner = 'c:\build-cache\php-sdk-' + $env:BIN_SDK_VER + '\phpsdk' + '-' + $env:VC + '-' + $env:ARCH + '.bat' 169 $task = $here + '\task.bat' 170 & $runner -t $task 171 172after_build: 173 ps: | 174 $ts_part = 'ts' 175 if ('0' -eq $env:TS) { $ts_part = 'nts' } 176 $zip_bname = 'php_ast-' + $env:APPVEYOR_REPO_COMMIT.substring(0, 8) + '-' + $env:PHP_VER.substring(0, 3) + '-' + $ts_part + '-' + $env:VC + '-' + $env:ARCH + '.zip' 177 $dir = 'c:\projects\ast\'; 178 if ('x64' -eq $env:ARCH) { $dir = $dir + 'x64\' } 179 $dir = $dir + 'Release' 180 if ('1' -eq $env:TS) { $dir = $dir + '_TS' } 181 & 7z a c:\$zip_bname $dir\php_ast.dll $dir\php_ast.pdb c:\projects\ast\LICENSE 182 Push-AppveyorArtifact c:\$zip_bname 183 184test_script: 185 ps: | 186 $ts_part = '' 187 if ('0' -eq $env:TS) { $ts_part = '-nts' } 188 $bname = 'php-' + $env:PHP_VER + $ts_part + '-Win32-' + $env:VC.toUpper() + '-' + $env:ARCH + '.zip' 189 $urls = @( 190 "https://windows.php.net/downloads/releases/archives/$bname", 191 "https://windows.php.net/downloads/releases/$bname", 192 "https://windows.php.net/downloads/qa/$bname", 193 "https://windows.php.net/downloads/qa/archives/$bname" 194 ) 195 foreach ($url in $urls) { 196 Invoke-WebRequest $url -OutFile "c:\build-cache\$bname" 197 if (Test-Path c:\build-cache\$bname) { 198 break; 199 } 200 } 201 $dname = 'php-' + $env:PHP_VER + $ts_part + '-' + $env:VC.toUpper() + '-' + $env:ARCH 202 if (-not (Test-Path c:\build-cache\$dname)) { 203 7z x c:\build-cache\$bname -oc:\build-cache\$dname 204 } 205 cd c:\projects\ast 206 echo "" | Out-File -Encoding "ASCII" task.bat 207 echo "set REPORT_EXIT_STATUS=1" | Out-File -Encoding "ASCII" -Append task.bat 208 $cmd = 'call configure --enable-ast --with-prefix=c:\build-cache\' + $dname + " 2>&1" 209 echo $cmd | Out-File -Encoding "ASCII" -Append task.bat 210 echo "nmake /nologo test TESTS=-q 2>&1" | Out-File -Encoding "ASCII" -Append task.bat 211 echo "exit %errorlevel%" | Out-File -Encoding "ASCII" -Append task.bat 212 $here = (Get-Item -Path "." -Verbose).FullName 213 $runner = 'c:\build-cache\php-sdk-' + $env:BIN_SDK_VER + '\phpsdk' + '-' + $env:VC + '-' + $env:ARCH + '.bat' 214 $task = $here + '\task.bat' 215 & $runner -t $task 216 217