gitlab-release.yml 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. stages:
  2. - build
  3. - repoupload
  4. - deploy
  5. variables:
  6. CMAKE_INTERPROCEDURAL_OPTIMIZATION: 0
  7. VERBOSE: 1
  8. DIAGNOSTIC: 1
  9. PACK_ICUDATA: 0
  10. PACK_GALERA: 0
  11. CMAKE_XTRA: -DCMAKE_UNITY_BUILD=1
  12. # ==================== .helper generic build ======================
  13. .build:
  14. stage: build
  15. interruptible: true
  16. rules:
  17. - if: $CI_MERGE_REQUEST_ID
  18. when: manual
  19. - if: $CI_MERGE_REQUEST_ID == null
  20. when: manual
  21. needs: [ ]
  22. tags:
  23. - docker
  24. image: manticoresearch/external_toolchain:vcpkg331_20250114
  25. variables:
  26. CACHEB: "../cache"
  27. arch: x86_64
  28. boost: boost_nov22
  29. sysroot: roots_nov22
  30. script:
  31. - mkdir build && cd build
  32. - cmake -DPACK=1 -DBUILD_TAG=$RELEASE_TAG $CMAKE_XTRA ..
  33. - cmake --build . --target package
  34. cache:
  35. key: release_$DISTR$arch
  36. paths:
  37. - cache
  38. artifacts:
  39. paths:
  40. - build/manticore*deb
  41. - build/manticore-*.tar.gz
  42. - build/manticore-*.zip
  43. - build/manticore-*.exe
  44. when: on_success
  45. expire_in: 12 hrs
  46. .build_rhel:
  47. extends: [ .build ]
  48. variables:
  49. boost: boost_rhel_feb17
  50. before_script:
  51. - export CMAKE_TOOLCHAIN_FILE=$(pwd)/dist/build_dockers/cross/linux.cmake
  52. - ln -s $(pwd) /builds_manticoresearch_dev_usr_src_debug_manticore_component_src_0_0
  53. - cd /builds_manticoresearch_dev_usr_src_debug_manticore_component_src_0_0
  54. artifacts:
  55. paths:
  56. - build/manticore*rpm
  57. # ==================== .helper generic and specific collect of built artifacts ======================
  58. .collect_job:
  59. variables:
  60. GIT_STRATEGY: fetch
  61. stage: repoupload
  62. interruptible: true
  63. tags:
  64. - repo
  65. rules:
  66. - if: $CI_MERGE_REQUEST_ID
  67. when: manual
  68. allow_failure: true
  69. - if: $CI_COMMIT_BRANCH =~ /^manticore-.*$/
  70. when: manual
  71. - if: $CI_COMMIT_BRANCH == "maintenance-release"
  72. when: manual
  73. - if: $CI_COMMIT_BRANCH == "master"
  74. when: on_success
  75. .collect_deb:
  76. extends: [ .collect_job ]
  77. script:
  78. - wget https://raw.githubusercontent.com/manticoresoftware/repo_scripts/main/upload_repo_deb
  79. - chmod +x upload_repo_deb
  80. - MAKE_BUNDLE=1 /bin/bash ./upload_repo_deb
  81. .collect_rpm:
  82. extends: [ .collect_job ]
  83. script:
  84. - wget https://raw.githubusercontent.com/manticoresoftware/repo_scripts/main/upload_repo_rpm
  85. - chmod +x upload_repo_rpm
  86. - MAKE_BUNDLE=1 /bin/bash ./upload_repo_rpm
  87. .collect_arc:
  88. extends: [ .collect_job ]
  89. script:
  90. - wget https://raw.githubusercontent.com/manticoresoftware/repo_scripts/main/upload_repo_arc
  91. - chmod +x upload_repo_arc
  92. - /bin/bash ./upload_repo_arc
  93. # ==================== MacOS ======================
  94. macos:
  95. extends: [ .build ]
  96. before_script:
  97. - export CMAKE_TOOLCHAIN_FILE=$(pwd)/dist/build_dockers/cross/osx.cmake
  98. variables:
  99. DISTR: macos
  100. macos_arm:
  101. extends: [ macos ]
  102. variables:
  103. arch: arm64
  104. .collect_macos:
  105. extends: [ .collect_arc ]
  106. needs: [ macos, macos_arm ]
  107. # ==================== Windows ======================
  108. windows:
  109. extends: [ .build ]
  110. variables:
  111. arch: x64
  112. sysroot: roots_mysql83_jan17
  113. boost: boost_80
  114. DISTR: windows
  115. # windows build with native clang flavour
  116. .windows_cl:
  117. extends: [ windows ]
  118. before_script:
  119. - export CMAKE_TOOLCHAIN_FILE=$(pwd)/dist/build_dockers/cross/windows.cmake
  120. .collect_windows:
  121. extends: [ .collect_arc ]
  122. needs: [ windows ]
  123. # ==================== Centos 7 ======================
  124. rhel7:
  125. extends: [ .build_rhel ]
  126. variables:
  127. DISTR: rhel7
  128. rhel7_arm:
  129. extends: [ rhel7 ]
  130. variables:
  131. arch: aarch64
  132. .collect_rhel7:
  133. extends: [ .collect_rpm ]
  134. needs: [ rhel7, rhel7_arm ]
  135. variables:
  136. DISTRO: 7
  137. # ==================== Centos 8 ======================
  138. rhel8:
  139. extends: [ .build_rhel ]
  140. variables:
  141. DISTR: rhel8
  142. rhel8_arm:
  143. extends: [ rhel8 ]
  144. variables:
  145. arch: aarch64
  146. .collect_rhel8:
  147. extends: [ .collect_rpm ]
  148. needs: [ rhel8, rhel8_arm ]
  149. variables:
  150. DISTRO: 8
  151. # ==================== RHEL 9 ======================
  152. rhel9:
  153. extends: [ .build_rhel ]
  154. variables:
  155. DISTR: rhel9
  156. rhel9_arm:
  157. extends: [ rhel9 ]
  158. variables:
  159. arch: aarch64
  160. .collect_rhel9:
  161. extends: [ .collect_rpm ]
  162. needs: [ rhel9, rhel9_arm ]
  163. variables:
  164. DISTRO: 9
  165. # ==================== Debian-based ======================
  166. # ==================== Ubuntu Bionic ======================
  167. bionic:
  168. extends: [ .build ]
  169. before_script:
  170. - export CMAKE_TOOLCHAIN_FILE=$(pwd)/dist/build_dockers/cross/linux.cmake
  171. variables:
  172. DISTR: bionic
  173. bionic_arm:
  174. extends: [ bionic ]
  175. variables:
  176. arch: aarch64
  177. .collect_bionic:
  178. extends: [ .collect_deb ]
  179. needs: [ bionic, bionic_arm ]
  180. variables:
  181. DISTRO: bionic
  182. # ==================== Ubuntu Focal ======================
  183. focal:
  184. extends: [ .build ]
  185. before_script:
  186. - export CMAKE_TOOLCHAIN_FILE=$(pwd)/dist/build_dockers/cross/linux.cmake
  187. variables:
  188. DISTR: focal
  189. focal_arm:
  190. extends: [ focal ]
  191. variables:
  192. arch: aarch64
  193. .collect_focal:
  194. extends: [ .collect_deb ]
  195. needs: [ focal, focal_arm ]
  196. variables:
  197. DISTRO: focal
  198. # ==================== Debian Buster ======================
  199. buster:
  200. extends: [ .build ]
  201. before_script:
  202. - export CMAKE_TOOLCHAIN_FILE=$(pwd)/dist/build_dockers/cross/linux.cmake
  203. variables:
  204. DISTR: buster
  205. buster_arm:
  206. extends: [ buster ]
  207. variables:
  208. arch: aarch64
  209. .collect_buster:
  210. extends: [ .collect_deb ]
  211. needs: [ buster, buster_arm ]
  212. variables:
  213. DISTRO: buster
  214. # ==================== Debian Bullseye ======================
  215. bullseye:
  216. extends: [ .build ]
  217. before_script:
  218. - export CMAKE_TOOLCHAIN_FILE=$(pwd)/dist/build_dockers/cross/linux.cmake
  219. variables:
  220. DISTR: bullseye
  221. bullseye_arm:
  222. extends: [ bullseye ]
  223. variables:
  224. arch: aarch64
  225. .collect_bullseye:
  226. extends: [ .collect_deb ]
  227. needs: [ bullseye, bullseye_arm ]
  228. variables:
  229. DISTRO: bullseye
  230. # ==================== Ubuntu Jammy ======================
  231. jammy:
  232. extends: [ .build ]
  233. before_script:
  234. - export CMAKE_TOOLCHAIN_FILE=$(pwd)/dist/build_dockers/cross/linux.cmake
  235. variables:
  236. DISTR: jammy
  237. jammy_arm:
  238. extends: [ jammy ]
  239. variables:
  240. arch: aarch64
  241. .collect_jammy:
  242. extends: [ .collect_deb ]
  243. needs: [ jammy, jammy_arm ]
  244. variables:
  245. DISTRO: jammy
  246. # ==================== Debian Bookworm ======================
  247. bookworm:
  248. extends: [ .build ]
  249. before_script:
  250. - export CMAKE_TOOLCHAIN_FILE=$(pwd)/dist/build_dockers/cross/linux.cmake
  251. variables:
  252. DISTR: bookworm
  253. bookworm_arm:
  254. extends: [ bookworm ]
  255. variables:
  256. arch: aarch64
  257. .collect_bookworm:
  258. extends: [ .collect_deb ]
  259. needs: [ bookworm, bookworm_arm ]
  260. variables:
  261. DISTRO: bookworm
  262. # ==================== Docker image ======================
  263. .nsis_release:
  264. stage: deploy
  265. rules:
  266. trigger:
  267. include: dist/nsis-release.yml
  268. needs:
  269. - job: .collect_windows
  270. .build_docker:
  271. stage: deploy
  272. needs:
  273. - job: .collect_focal
  274. optional: true
  275. interruptible: true
  276. variables:
  277. GIT_STRATEGY: none
  278. rules:
  279. - if: $CI_MERGE_REQUEST_ID
  280. when: manual
  281. allow_failure: true
  282. - if: $CI_COMMIT_BRANCH =~ /^manticore-.*$/
  283. when: manual
  284. - if: $CI_COMMIT_BRANCH == "maintenance-release"
  285. when: manual
  286. - if: $CI_COMMIT_BRANCH == "master"
  287. when: on_success
  288. tags:
  289. - dev-host
  290. script:
  291. - echo "Build docker image"
  292. - /bin/bash dist/dockerhub_deploy.sh