azure-pipelines.yml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. name: $(BuildID)
  2. trigger:
  3. branches:
  4. include:
  5. - 'master'
  6. # Release branches
  7. - '0.*'
  8. variables:
  9. CI: 1
  10. jobs:
  11. - job: vs2017
  12. pool:
  13. vmImage: VS2017-Win2016
  14. strategy:
  15. matrix:
  16. vc2017x86ninja:
  17. arch: x86
  18. compiler: msvc2017
  19. backend: ninja
  20. vc2017x64vs:
  21. arch: x64
  22. compiler: msvc2017
  23. backend: vs2017
  24. clangclx64ninja:
  25. arch: x64
  26. compiler: clang-cl
  27. backend: ninja
  28. steps:
  29. - task: UsePythonVersion@0
  30. inputs:
  31. versionSpec: '3.5'
  32. addToPath: true
  33. architecture: 'x64'
  34. - template: ci/azure-steps.yml
  35. - job: vs2019
  36. pool:
  37. vmImage: windows-2019
  38. strategy:
  39. matrix:
  40. vc2019x64ninja:
  41. arch: x64
  42. compiler: msvc2019
  43. backend: ninja
  44. vc2019x64vs:
  45. arch: x64
  46. compiler: msvc2019
  47. backend: vs2019
  48. steps:
  49. - task: UsePythonVersion@0
  50. inputs:
  51. versionSpec: '3.7'
  52. addToPath: true
  53. architecture: 'x64'
  54. - template: ci/azure-steps.yml
  55. - job: cygwin
  56. pool:
  57. vmImage: VS2017-Win2016
  58. strategy:
  59. matrix:
  60. gccx64ninja: {}
  61. variables:
  62. CYGWIN_ROOT: $(System.Workfolder)\cygwin
  63. CYGWIN_MIRROR: http://cygwin.mirror.constant.com
  64. steps:
  65. - script: |
  66. choco install cygwin --params="/InstallDir:%CYGWIN_ROOT%"
  67. displayName: Install Cygwin
  68. - script: |
  69. %CYGWIN_ROOT%\cygwinsetup.exe -qnNdO -R "%CYGWIN_ROOT%" -s "%CYGWIN_MIRROR%" -g -P ^
  70. gcc-fortran,^
  71. gcc-objc++,^
  72. gcc-objc,^
  73. git,^
  74. gobject-introspection,^
  75. libarchive13,^
  76. libboost-devel,^
  77. libglib2.0-devel,^
  78. libgtk3-devel,^
  79. libjsoncpp19,^
  80. librhash0,^
  81. libuv1,^
  82. ninja,^
  83. python2-devel,^
  84. python3-devel,^
  85. python36-pip,^
  86. vala,^
  87. wget,^
  88. cmake,^
  89. zlib-devel
  90. displayName: Install Dependencies
  91. - script: |
  92. set PATH=%CYGWIN_ROOT%\bin;%SYSTEMROOT%\system32
  93. env.exe -- python3 -m pip --disable-pip-version-check install pefile pytest-xdist jsonschema
  94. displayName: pip install pefile pytest-xdist jsonschema
  95. - script: |
  96. set BOOST_ROOT=
  97. set PATH=%CYGWIN_ROOT%\bin;%SYSTEMROOT%\system32
  98. set SKIP_STATIC_BOOST=1
  99. env.exe -- python3 run_tests.py --backend=ninja
  100. # Cygwin's static boost installation is broken (some static library
  101. # variants such as boost_thread are not present)
  102. displayName: Run Tests
  103. - task: CopyFiles@2
  104. condition: not(canceled())
  105. inputs:
  106. contents: 'meson-test-run.*'
  107. targetFolder: $(Build.ArtifactStagingDirectory)
  108. - task: PublishBuildArtifacts@1
  109. inputs:
  110. artifactName: $(System.JobName)
  111. # publishing artifacts from PRs from a fork is currently blocked
  112. condition: and(eq(variables['system.pullrequest.isfork'], false), not(canceled()))
  113. - task: PublishTestResults@2
  114. condition: not(canceled())
  115. inputs:
  116. testResultsFiles: meson-test-run.xml
  117. testRunTitle: $(System.JobName)
  118. - job: msys2
  119. pool:
  120. vmImage: VS2017-Win2016
  121. strategy:
  122. matrix:
  123. gccx86ninja:
  124. MSYSTEM: MINGW32
  125. MSYS2_ARCH: i686
  126. compiler: gcc
  127. gccx64ninja:
  128. MSYSTEM: MINGW64
  129. MSYS2_ARCH: x86_64
  130. compiler: gcc
  131. clangx64ninja:
  132. MSYSTEM: MINGW64
  133. MSYS2_ARCH: x86_64
  134. compiler: clang
  135. variables:
  136. MSYS2_ROOT: $(System.Workfolder)\msys64
  137. steps:
  138. - script: |
  139. choco install msys2 --params="/InstallDir:%MSYS2_ROOT% /NoUpdate /NoPath"
  140. displayName: Install MSYS2
  141. - script: |
  142. set PATH=%MSYS2_ROOT%\usr\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
  143. %MSYS2_ROOT%\usr\bin\pacman --noconfirm -Syyuu
  144. %MSYS2_ROOT%\usr\bin\pacman --noconfirm -Syuu
  145. displayName: Update MSYS2
  146. - script: |
  147. set PATH=%MSYS2_ROOT%\usr\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
  148. if %compiler%==gcc ( set "TOOLCHAIN=mingw-w64-$(MSYS2_ARCH)-toolchain" ) else ( set "TOOLCHAIN=mingw-w64-$(MSYS2_ARCH)-clang" )
  149. %MSYS2_ROOT%\usr\bin\pacman --noconfirm --needed -S ^
  150. base-devel ^
  151. git ^
  152. mercurial ^
  153. mingw-w64-$(MSYS2_ARCH)-cmake ^
  154. mingw-w64-$(MSYS2_ARCH)-ninja ^
  155. mingw-w64-$(MSYS2_ARCH)-pkg-config ^
  156. mingw-w64-$(MSYS2_ARCH)-python2 ^
  157. mingw-w64-$(MSYS2_ARCH)-python3 ^
  158. mingw-w64-$(MSYS2_ARCH)-python3-setuptools ^
  159. mingw-w64-$(MSYS2_ARCH)-python3-pip ^
  160. %TOOLCHAIN%
  161. %MSYS2_ROOT%\usr\bin\bash -lc "python3 -m pip --disable-pip-version-check install pefile jsonschema"
  162. displayName: Install Dependencies
  163. - script: |
  164. set BOOST_ROOT=
  165. set PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
  166. set PATHEXT=%PATHEXT%;.py
  167. if %compiler%==clang ( set CC=clang && set CXX=clang++ && set OBJC=clang && set OBJCXX=clang++ )
  168. %MSYS2_ROOT%\usr\bin\bash -lc "MSYSTEM= python3 run_tests.py --backend=ninja"
  169. env:
  170. CHERE_INVOKING: yes
  171. displayName: Run Tests
  172. - task: CopyFiles@2
  173. condition: not(canceled())
  174. inputs:
  175. contents: 'meson-test-run.*'
  176. targetFolder: $(Build.ArtifactStagingDirectory)
  177. - task: PublishBuildArtifacts@1
  178. inputs:
  179. artifactName: $(System.JobName)
  180. # publishing artifacts from PRs from a fork is currently blocked
  181. condition: and(eq(variables['system.pullrequest.isfork'], false), not(canceled()))
  182. - task: PublishTestResults@2
  183. condition: not(canceled())
  184. inputs:
  185. testResultsFiles: meson-test-run.xml
  186. testRunTitle: $(System.JobName)