Use networkstatus_read_cached_consensus() for GETINFO
[tor.git] / .appveyor.yml
blobcb8446f43060034991ddf6c726bf1f15f2720705
1 version: 1.0.{build}\r
2 \r
3 clone_depth: 50\r
4 \r
5 environment:\r
6   compiler: mingw\r
7 \r
8   matrix:\r
9   - target: i686-w64-mingw32\r
10     compiler_path: mingw32\r
11     openssl_path: /c/OpenSSL-Win32\r
12     hardening:\r
13   - target: x86_64-w64-mingw32\r
14     compiler_path: mingw64\r
15     openssl_path: /c/OpenSSL-Win64\r
16     hardening: --disable-gcc-hardening\r
18 install:\r
19 - ps: >-\r
20     Function Execute-Command ($commandPath)\r
21     {\r
22         & $commandPath $args 2>&1\r
23         if ( $LastExitCode -ne 0 ) {\r
24             $host.SetShouldExit( $LastExitCode )\r
25         }\r
26     }\r
27     Function Execute-Bash ()\r
28     {\r
29         Execute-Command 'c:\msys64\usr\bin\bash' '-e' '-c' $args\r
30     }\r
31     Execute-Command "C:\msys64\usr\bin\pacman" -Sy --noconfirm openssl-devel openssl libevent-devel libevent mingw-w64-i686-libevent mingw-w64-x86_64-libevent mingw-w64-i686-openssl mingw-w64-x86_64-openssl mingw-w64-i686-zstd mingw-w64-x86_64-zstd\r
33 build_script:\r
34 - ps: >-\r
35     if ($env:compiler -eq "mingw") {\r
36             $oldpath = ${env:Path} -split ';'\r
37             $buildpath = @("C:\msys64\${env:compiler_path}\bin", "C:\msys64\usr\bin") + $oldpath\r
38             $env:Path = @($buildpath) -join ';'\r
39             $env:build = @("${env:APPVEYOR_BUILD_FOLDER}", $env:target) -join '\'\r
40             Set-Location "${env:APPVEYOR_BUILD_FOLDER}"\r
41             Execute-Bash 'autoreconf -i'\r
42             mkdir "${env:build}"\r
43             Set-Location "${env:build}"\r
44             Execute-Bash "which ${env:target}-gcc"\r
45             Execute-Bash "${env:target}-gcc --version"\r
46             Execute-Bash "../configure --prefix=/${env:compiler_path} --build=${env:target} --host=${env:target} --disable-asciidoc --enable-fatal-warnings --with-openssl-dir=${env:openssl_path} ${env:hardening}"\r
47             Execute-Bash "V=1 make -j2"\r
48             Execute-Bash "V=1 make -j2 install"\r
49      }\r
51 test_script:\r
52 - ps: >-\r
53     if ($env:compiler -eq "mingw") {\r
54             $oldpath = ${env:Path} -split ';'\r
55             $buildpath = @("C:\msys64\${env:compiler_path}\bin") + $oldpath\r
56             $env:Path = $buildpath -join ';'\r
57             Set-Location "${env:build}"\r
58             Execute-Bash "VERBOSE=1 make -j2 check"\r
59     }\r
61 on_failure:\r
62 - ps: >-\r
63     if ($env:compiler -eq "mingw") {\r
64             $oldpath = ${env:Path} -split ';'\r
65             $buildpath = @("C:\msys64\usr\bin") + $oldpath\r
66             $env:Path = @($buildpath) -join ';'\r
67             Set-Location "${env:build}"\r
68             Execute-Bash "7z a logs.zip config.log || true"\r
69             Execute-Bash "7z a logs.zip test-suite.log || true"\r
70             Execute-Bash "appveyor PushArtifact logs.zip || true"\r
71             Execute-Bash "tail -1000 config.log || true"\r
72             Execute-Bash "cat test-suite.log || true"\r
73     }\r
74 - cmd: C:\Python27\python.exe %APPVEYOR_BUILD_FOLDER%\scripts\test\appveyor-irc-notify.py irc.oftc.net:6697 tor-ci failure\r