azure-pipelines.yml 4.7 KB

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