.appveyor.yml 2.7 KB

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