.appveyor.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. version: 1.0.{build}
  2. clone_depth: 50
  3. environment:
  4. compiler: mingw
  5. matrix:
  6. - target: i686-w64-mingw32
  7. compiler_path: mingw32
  8. openssl_path: /c/OpenSSL-Win32
  9. - target: x86_64-w64-mingw32
  10. compiler_path: mingw64
  11. openssl_path: /c/OpenSSL-Win64
  12. install:
  13. - ps: >-
  14. Function Execute-Command ($commandPath)
  15. {
  16. & $commandPath $args 2>&1
  17. if ( $LastExitCode -ne 0 ) {
  18. $host.SetShouldExit( $LastExitCode )
  19. }
  20. }
  21. Function Execute-Bash ()
  22. {
  23. Execute-Command 'c:\msys64\usr\bin\bash' '-e' '-c' $args
  24. }
  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 mingw-w64-i686-openssl mingw-w64-x86_64-openssl mingw-w64-i686-zstd mingw-w64-x86_64-zstd
  26. build_script:
  27. - ps: >-
  28. if ($env:compiler -eq "mingw") {
  29. $oldpath = ${env:Path} -split ';'
  30. $buildpath = @("C:\msys64\${env:compiler_path}\bin", "C:\msys64\usr\bin") + $oldpath
  31. $env:Path = @($buildpath) -join ';'
  32. $env:build = @("${env:APPVEYOR_BUILD_FOLDER}", $env:target) -join '\'
  33. Set-Location "${env:APPVEYOR_BUILD_FOLDER}"
  34. Execute-Bash 'autoreconf -i'
  35. mkdir "${env:build}"
  36. Set-Location "${env:build}"
  37. Execute-Bash "../configure --prefix=/${env:compiler_path} --build=${env:target} --host=${env:target} --disable-asciidoc --enable-fatal-warnings --with-openssl-dir=${env:openssl_path}"
  38. Execute-Bash "V=1 make -j2"
  39. Execute-Bash "V=1 make -j2 install"
  40. }
  41. test_script:
  42. - ps: >-
  43. if ($env:compiler -eq "mingw") {
  44. $oldpath = ${env:Path} -split ';'
  45. $buildpath = @("C:\msys64\${env:compiler_path}\bin") + $oldpath
  46. $env:Path = $buildpath -join ';'
  47. Set-Location "${env:build}"
  48. Execute-Bash "VERBOSE=1 make -j2 check"
  49. }
  50. on_failure:
  51. - cmd: C:\Python27\python.exe %APPVEYOR_BUILD_FOLDER%\scripts\test\appveyor-irc-notify.py irc.oftc.net:6697 tor-ci failure