You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

242 lines
11 KiB

  1. environment:
  2. pypi_token:
  3. secure: VHuZiUWgTqTciKE2nsv/LkDp7UtONmp6YCOGYX78Jt3wLWUr4/W0sD7xYCM9/Crg0rWQvt9uURnoUKbccx7VkUS9YYWzvWVNntc4d3LqF+pZetjghieR446cgHxmux1/DyRdr/wdpgDwP+GEmvtzhzw5h2Bd5dEWbsH+TKkECEEqXlGO8hUN4E3nmcUcSX1eCnc/1CIP3FdHDRt0esYWSX9mw6Z76Jb2zhDANvpH/s5ofeb+VqpB6XwsmcEfaoa2vOZ+kO3kndAtq8YcSbUdhQ==
  4. matrix:
  5. - TARGET: vs2008
  6. BUILD_ENVIRONMENT: msbuild
  7. APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
  8. VisualStudioVersion: 9.0
  9. platform: Win32
  10. configuration: Release
  11. - TARGET: vs2010
  12. BUILD_ENVIRONMENT: msbuild
  13. APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
  14. VisualStudioVersion: 10.0
  15. platform: Win32
  16. configuration: VSDebug
  17. - TARGET: vs2012
  18. BUILD_ENVIRONMENT: msbuild
  19. APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
  20. VisualStudioVersion: 11.0
  21. platform: x64
  22. configuration: Release
  23. - TARGET: vs2013
  24. BUILD_ENVIRONMENT: msbuild
  25. APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
  26. VisualStudioVersion: 12.0
  27. platform: Win32
  28. configuration: Release
  29. - TARGET: vs2015
  30. BUILD_ENVIRONMENT: msbuild
  31. APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
  32. VisualStudioVersion: 14.0
  33. platform: Win32
  34. configuration: Release
  35. - TARGET: vs2017
  36. BUILD_ENVIRONMENT: msbuild
  37. APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
  38. VisualStudioVersion: 15.0
  39. configuration: Release
  40. - TARGET: python27
  41. BUILD_ENVIRONMENT: python
  42. PYTHON: "C:\\Python27\\python.exe"
  43. - TARGET: python27-x64
  44. BUILD_ENVIRONMENT: python
  45. PYTHON: "C:\\Python27-x64\\python.exe"
  46. - TARGET: python37
  47. BUILD_ENVIRONMENT: python
  48. PYTHON: "C:\\Python37\\python.exe"
  49. - TARGET: python37-x64
  50. BUILD_ENVIRONMENT: python
  51. PYTHON: "C:\\Python37-x64\\python.exe"
  52. - TARGET: python37-x64
  53. BUILD_ENVIRONMENT: python
  54. APPVEYOR_BUILD_WORKER_IMAGE: macOS-Mojave
  55. PYTHON: "/usr/local/bin/python3.7"
  56. - TARGET: cygwin-gcc
  57. BUILD_ENVIRONMENT: cygwin
  58. CONFIGURE_OPTIONS: ""
  59. CFLAGS: "--coverage"
  60. LDFLAGS: "--coverage"
  61. - TARGET: cygwin-gcc-no-optimization
  62. BUILD_ENVIRONMENT: cygwin
  63. CONFIGURE_OPTIONS: "--enable-shared=no"
  64. CFLAGS: "--coverage -O0"
  65. CPPFLAGS: "-DOPTIMIZATION_DISABLED"
  66. LDFLAGS: "--coverage"
  67. - TARGET: cygwin-gcc-python
  68. BUILD_ENVIRONMENT: cygwin
  69. CONFIGURE_OPTIONS: "--enable-python"
  70. CFLAGS: "--coverage"
  71. LDFLAGS: "--coverage"
  72. - TARGET: cygwin-gcc-python2
  73. BUILD_ENVIRONMENT: cygwin
  74. CONFIGURE_OPTIONS: "--enable-python2"
  75. CFLAGS: "--coverage"
  76. LDFLAGS: "--coverage"
  77. PYTHON_VERSION: 2
  78. - TARGET: cygwin-gcc-python3
  79. BUILD_ENVIRONMENT: cygwin
  80. CONFIGURE_OPTIONS: "--enable-python3"
  81. CFLAGS: "--coverage"
  82. LDFLAGS: "--coverage"
  83. PYTHON_VERSION: 3
  84. - TARGET: cygwin-gcc-static-executables
  85. BUILD_ENVIRONMENT: cygwin
  86. CONFIGURE_OPTIONS: "--enable-static-executables"
  87. CFLAGS: "--coverage"
  88. LDFLAGS: "--coverage"
  89. - TARGET: cygwin64-gcc
  90. BUILD_ENVIRONMENT: cygwin64
  91. CONFIGURE_OPTIONS: ""
  92. CFLAGS: "--coverage"
  93. LDFLAGS: "--coverage"
  94. - TARGET: cygwin64-gcc-no-optimization
  95. BUILD_ENVIRONMENT: cygwin64
  96. CONFIGURE_OPTIONS: "--enable-shared=no"
  97. CFLAGS: "--coverage -O0"
  98. CPPFLAGS: "-DOPTIMIZATION_DISABLED"
  99. LDFLAGS: "--coverage"
  100. - TARGET: cygwin64-gcc-python
  101. BUILD_ENVIRONMENT: cygwin64
  102. CONFIGURE_OPTIONS: "--enable-python"
  103. CFLAGS: "--coverage"
  104. LDFLAGS: "--coverage"
  105. - TARGET: cygwin64-gcc-python2
  106. BUILD_ENVIRONMENT: cygwin64
  107. CONFIGURE_OPTIONS: "--enable-python2"
  108. CFLAGS: "--coverage"
  109. LDFLAGS: "--coverage"
  110. PYTHON_VERSION: 2
  111. - TARGET: cygwin64-gcc-python3
  112. BUILD_ENVIRONMENT: cygwin64
  113. CONFIGURE_OPTIONS: "--enable-python3"
  114. CFLAGS: "--coverage"
  115. LDFLAGS: "--coverage"
  116. PYTHON_VERSION: 3
  117. - TARGET: cygwin64-gcc-static-executables
  118. BUILD_ENVIRONMENT: cygwin64
  119. CONFIGURE_OPTIONS: "--enable-static-executables"
  120. CFLAGS: "--coverage"
  121. LDFLAGS: "--coverage"
  122. - TARGET: mingw-gcc
  123. BUILD_ENVIRONMENT: mingw
  124. CONFIGURE_OPTIONS: ""
  125. CFLAGS: "--coverage"
  126. LDFLAGS: "--coverage"
  127. - TARGET: mingw-gcc-no-optimization
  128. BUILD_ENVIRONMENT: mingw
  129. CONFIGURE_OPTIONS: "--enable-shared=no"
  130. CFLAGS: "--coverage -O0"
  131. CPPFLAGS: "-DOPTIMIZATION_DISABLED"
  132. LDFLAGS: "--coverage"
  133. - TARGET: mingw-gcc-static-executables
  134. BUILD_ENVIRONMENT: mingw
  135. CONFIGURE_OPTIONS: "--enable-static-executables"
  136. CFLAGS: "--coverage"
  137. LDFLAGS: "--coverage"
  138. - TARGET: mingw-w64-gcc
  139. BUILD_ENVIRONMENT: mingw-w64
  140. CONFIGURE_OPTIONS: ""
  141. CFLAGS: "--coverage"
  142. LDFLAGS: "--coverage"
  143. - TARGET: mingw-w64-gcc-no-optimization
  144. BUILD_ENVIRONMENT: mingw-w64
  145. CONFIGURE_OPTIONS: "--enable-shared=no"
  146. CFLAGS: "--coverage -O0"
  147. CPPFLAGS: "-DOPTIMIZATION_DISABLED"
  148. LDFLAGS: "--coverage"
  149. - TARGET: mingw-w64-gcc-static-executables
  150. BUILD_ENVIRONMENT: mingw-w64
  151. CONFIGURE_OPTIONS: "--enable-static-executables"
  152. CFLAGS: "--coverage"
  153. LDFLAGS: "--coverage"
  154. install:
  155. - cmd: git clone https://github.com/codecov/codecov-bash.git ..\codecov-bash
  156. - cmd: if [%BUILD_ENVIRONMENT%]==[msbuild] (
  157. git clone https://github.com/libyal/vstools.git ..\vstools )
  158. - ps: If ($env:BUILD_ENVIRONMENT -eq "msbuild") {
  159. .\synczlib.ps1 }
  160. - sh: if test ${BUILD_ENVIRONMENT} = "python"; then brew update && brew install gettext gnu-sed python3 && brew link --force gettext; fi
  161. - ps: If ($env:BUILD_ENVIRONMENT -eq "python") {
  162. Invoke-Expression "${env:PYTHON} -m pip install -U pip setuptools twine wheel" }
  163. - cmd: if [%BUILD_ENVIRONMENT%]==[cygwin] (
  164. C:\cygwin\setup-x86.exe -qgnNdO -l C:\cygwin\var\cache\setup -R c:\cygwin -s http://cygwin.mirror.constant.com -P zlib-devel -P python2-devel -P python3-devel )
  165. - cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] (
  166. C:\cygwin64\setup-x86_64.exe -qgnNdO -l C:\cygwin64\var\cache\setup -R c:\cygwin64 -s http://cygwin.mirror.constant.com -P zlib-devel -P python2-devel -P python3-devel )
  167. - cmd: if [%BUILD_ENVIRONMENT%]==[mingw] (
  168. C:\MinGW\bin\mingw-get install libz-dev )
  169. - cmd: if [%BUILD_ENVIRONMENT%]==[mingw-w64] (
  170. C:\msys64\usr\bin\pacman -S --noconfirm --needed msys/zlib-devel )
  171. build_script:
  172. - ps: If ($env:BUILD_ENVIRONMENT -eq "msbuild" -or ($env:BUILD_ENVIRONMENT -eq "python" -and $isWindows)) {
  173. .\synclibs.ps1;
  174. .\autogen.ps1 }
  175. - cmd: if [%TARGET%]==[vs2008] (
  176. msbuild /verbosity:quiet msvscpp\libpff.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" )
  177. - cmd: if [%TARGET%]==[vs2010] (
  178. set PYTHONPATH=..\vstools &&
  179. C:\Python27\python.exe ..\vstools\scripts\msvscpp-convert.py --no-python-dll --output-format 2010 msvscpp\libpff.sln &&
  180. msbuild /verbosity:quiet vs2010\libpff.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" )
  181. - cmd: if [%TARGET%]==[vs2012] (
  182. set PYTHONPATH=..\vstools &&
  183. C:\Python27\python.exe ..\vstools\scripts\msvscpp-convert.py --extend-with-x64 --output-format 2012 --python-path "C:\\Python27-x64" msvscpp\libpff.sln &&
  184. msbuild /verbosity:quiet vs2012\libpff.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" )
  185. - cmd: if [%TARGET%]==[vs2013] (
  186. set PYTHONPATH=..\vstools &&
  187. C:\Python27\python.exe ..\vstools\scripts\msvscpp-convert.py --output-format 2013 msvscpp\libpff.sln &&
  188. msbuild /verbosity:quiet vs2013\libpff.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" )
  189. - cmd: if [%TARGET%]==[vs2015] (
  190. set PYTHONPATH=..\vstools &&
  191. C:\Python27\python.exe ..\vstools\scripts\msvscpp-convert.py --output-format 2015 msvscpp\libpff.sln &&
  192. msbuild /verbosity:quiet vs2015\libpff.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" )
  193. - cmd: if [%TARGET%]==[vs2017] (
  194. set PYTHONPATH=..\vstools &&
  195. C:\Python27\python.exe ..\vstools\scripts\msvscpp-convert.py --extend-with-x64 --no-python-dll --output-format 2017 --with-dokany msvscpp\libpff.sln &&
  196. msbuild /verbosity:quiet vs2017\libpff.sln /property:Platform=Win32 /property:PlatformToolset=v141 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" &&
  197. msbuild /verbosity:quiet vs2017\libpff.sln /property:Platform=x64 /property:PlatformToolset=v141 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" )
  198. - cmd: if [%BUILD_ENVIRONMENT%]==[python] (
  199. "%PYTHON%" setup.py bdist_msi bdist_wheel )
  200. - sh: if test ${BUILD_ENVIRONMENT} = "python"; then ./synclibs.sh && ./autogen.sh && ./configure ${CONFIGURE_OPTIONS} && make > /dev/null; fi
  201. - sh: if test ${BUILD_ENVIRONMENT} = "python"; then ${PYTHON} setup.py bdist_wheel; fi
  202. - cmd: if [%BUILD_ENVIRONMENT%]==[cygwin] (
  203. xcopy /i /q /s C:\projects\libpff C:\cygwin\home\appveyor\libpff &&
  204. C:\cygwin\bin\bash -e -l -c "cd libpff && ./synclibs.sh --use-head && ./autogen.sh && ./configure ${CONFIGURE_OPTIONS} && make > /dev/null" )
  205. - cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] (
  206. xcopy /i /q /s C:\projects\libpff C:\cygwin64\home\appveyor\libpff &&
  207. C:\cygwin64\bin\bash -e -l -c "cd libpff && ./synclibs.sh --use-head && ./autogen.sh && ./configure ${CONFIGURE_OPTIONS} && make > /dev/null" )
  208. - cmd: if [%BUILD_ENVIRONMENT%]==[mingw] (
  209. xcopy /i /q /s C:\projects\libpff C:\MinGW\msys\1.0\home\appveyor\libpff &&
  210. C:\MinGW\msys\1.0\bin\bash -e -l -c "cd libpff && sed 's/@VERSION@/0.29/g' m4/pkg.m4.in > m4/pkg.m4 && ./synclibs.sh --use-head && ./autogen.sh && ./configure ${CONFIGURE_OPTIONS} && make > /dev/null" )
  211. - cmd: if [%BUILD_ENVIRONMENT%]==[mingw-w64] (
  212. xcopy /i /q /s C:\projects\libpff C:\msys64\home\appveyor\libpff &&
  213. C:\msys64\usr\bin\bash -e -l -c "cd libpff && ./synclibs.sh --use-head && ./autogen.sh && ./configure ${CONFIGURE_OPTIONS} && make > /dev/null" )
  214. test_script:
  215. - cmd: rem Run tests
  216. - ps: If ($env:BUILD_ENVIRONMENT -eq "msbuild") {
  217. .\runtests.ps1 }
  218. - cmd: if [%BUILD_ENVIRONMENT%]==[cygwin] (
  219. C:\cygwin\bin\bash -l -c "cd libpff && make check CHECK_WITH_STDERR=1; RESULT=$?; if test ${RESULT} -ne 0 && test -f tests/test-suite.log; then cat tests/test-suite.log; fi; exit ${RESULT};" )
  220. - cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] (
  221. C:\cygwin64\bin\bash -l -c "cd libpff && make check CHECK_WITH_STDERR=1; RESULT=$?; if test ${RESULT} -ne 0 && test -f tests/test-suite.log; then cat tests/test-suite.log; fi; exit ${RESULT};" )
  222. - cmd: if [%BUILD_ENVIRONMENT%]==[mingw] (
  223. C:\MinGW\msys\1.0\bin\bash -l -c "cd libpff && make check CHECK_WITH_STDERR=1; RESULT=$?; if test ${RESULT} -ne 0 && test -f tests/test-suite.log; then cat tests/test-suite.log; fi; exit ${RESULT};" )
  224. - cmd: if [%BUILD_ENVIRONMENT%]==[mingw-w64] (
  225. C:\msys64\usr\bin\bash -l -c "cd libpff && make check CHECK_WITH_STDERR=1; RESULT=$?; if test ${RESULT} -ne 0 && test -f tests/test-suite.log; then cat tests/test-suite.log; fi; exit ${RESULT};" )
  226. after_test:
  227. - cmd: if [%TARGET%]==[mingw-gcc-no-optimization] (
  228. copy C:\projects\codecov-bash\codecov C:\MinGW\msys\1.0\home\appveyor\libpff\codecov.sh &&
  229. C:\MinGW\msys\1.0\bin\bash -e -l -c "cd libpff && chmod a+x ./codecov.sh && sed -i 's/-execdir /-exec /' ./codecov.sh && ./codecov.sh -n ${TARGET} -y .codecov.yml" )
  230. artifacts:
  231. - path: dist\*.whl
  232. deploy_script:
  233. - ps: If ($env:APPVEYOR_REPO_TAG -eq "true" -and $isWindows) {
  234. Invoke-Expression "${env:PYTHON} -m twine upload dist/*.whl --username __token__ --password ${env:PYPI_TOKEN} --skip-existing" }