Try different PATH for testing only
[tor/appveyor.git] / appveyor.yml
blob2f05c2046d8deb25616b626916d9e340f4f356fd
1 version: 1.0.{build}\r
2 environment:\r
3   compiler: mingw\r
4 \r
5   matrix:\r
6   - target: i686-w64-mingw32\r
7     compiler_path: mingw32\r
8 \r
9 #  - target: x86_64-w64-mingw32\r
10 #    compiler_path: mingw64\r
12 install:\r
13 - ps: >-\r
14     Function Execute-Command ($commandPath)\r
15     {\r
16         & $commandPath $args 2>&1\r
17         if ( $LastExitCode -ne 0 ) {\r
18             $host.SetShouldExit( $LastExitCode )\r
19         }\r
20     }\r
21     Function Execute-Bash ()\r
22     {\r
23         Execute-Command 'c:\msys64\usr\bin\bash' '-e' '-c' $args\r
24     }\r
25     Execute-Command "C:\msys64\usr\bin\pacman" -Sy --noconfirm openssl-devel openssl libevent-devel libevent mingw-w64-i686-libevent mingw-w64-x86_64-libevent \r
28 build_script:\r
29 - ps: >-\r
30     if ($env:compiler -eq "mingw") {\r
31             $oldpath = ${env:Path} -split ';'\r
32             $buildpath = @("C:\msys64\${env:compiler_path}\bin", "C:\msys64\usr\bin") + $oldpath\r
33             $env:Path = $buildpath -join ';'\r
34             $env:build = @("${env:APPVEYOR_BUILD_FOLDER}", $env:target) -join '\'\r
35             Execute-Bash 'autoreconf -i'\r
36             mkdir "${env:build}"\r
37             Set-Location "${env:build}"\r
38             Execute-Bash "../configure --prefix=/${env:compiler_path} --build=${env:target} --host=${env:target}"\r
39             Execute-Bash "V=1 make"\r
40             Execute-Bash "V=1 make install"\r
41      }\r
43 test_script:\r
44 - ps: >-\r
45     if ($env:compiler -eq "mingw") {\r
46             $buildpath = @("C:\msys64\${env:compiler_path}\bin") + $oldpath\r
47             $env:Path = $buildpath -join ';'\r
48             Set-Location "${env:build}"\r
49             Execute-Bash "make check"\r
50     }\r
52 artifacts:\r
53 - path: /${env:compiler_path}\r
55 # Uncomment to solve problems\r
56 on_finish:\r
57 - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))\r