.appveyor.yml 2.8 KB

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