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