.drone.yml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. kind: pipeline
  2. name: qt-5.15
  3. steps:
  4. - name: cmake
  5. image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-11
  6. volumes:
  7. - name: build
  8. path: /drone/build
  9. commands:
  10. - cd /drone/build
  11. - cmake -G Ninja -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_BUILD_TYPE=Debug -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DADD_E2E_TESTS=ON -DECM_ENABLE_SANITIZERS=address -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64 ../src
  12. - name: compile
  13. image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-11
  14. volumes:
  15. - name: build
  16. path: /drone/build
  17. commands:
  18. - cd /drone/build
  19. - ninja
  20. - name: test
  21. image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-11
  22. volumes:
  23. - name: build
  24. path: /drone/build
  25. commands:
  26. - cd /drone/build
  27. - useradd -m -s /bin/bash test
  28. - chown -R test:test .
  29. - su -c 'ASAN_OPTIONS=detect_leaks=0 xvfb-run ctest --output-on-failure' test
  30. services:
  31. - name: server
  32. image: ghcr.io/nextcloud/continuous-integration-server:latest # also change in updateScreenshots.sh
  33. environment:
  34. EVAL: true
  35. SERVER_VERSION: 'stable24'
  36. commands:
  37. - BRANCH="$SERVER_VERSION" /usr/local/bin/initnc.sh
  38. - echo 127.0.0.1 server >> /etc/hosts
  39. - su www-data -c "OC_PASS=user1 php /var/www/html/occ user:add --password-from-env --display-name='User One' user1"
  40. - su www-data -c "OC_PASS=user2 php /var/www/html/occ user:add --password-from-env --display-name='User Two' user2"
  41. - su www-data -c "OC_PASS=user3 php /var/www/html/occ user:add --password-from-env --display-name='User Three' user3"
  42. - su www-data -c "php /var/www/html/occ user:setting user2 files quota 1G"
  43. - su www-data -c "php /var/www/html/occ group:add users"
  44. - su www-data -c "php /var/www/html/occ group:adduser users user1"
  45. - su www-data -c "php /var/www/html/occ group:adduser users user2"
  46. - su www-data -c "git clone --depth=1 -b $SERVER_VERSION https://github.com/nextcloud/activity.git /var/www/html/apps/activity/"
  47. - su www-data -c "php /var/www/html/occ app:enable activity"
  48. - su www-data -c "git clone --depth=1 -b $SERVER_VERSION https://github.com/nextcloud/text.git /var/www/html/apps/text/"
  49. - su www-data -c "php /var/www/html/occ app:enable text"
  50. - su www-data -c "git clone --depth=1 -b $SERVER_VERSION https://github.com/nextcloud/end_to_end_encryption.git /var/www/html/apps/end_to_end_encryption/"
  51. - su www-data -c "php /var/www/html/occ app:enable end_to_end_encryption"
  52. - /usr/local/bin/run.sh
  53. volumes:
  54. - name: build
  55. temp: {}
  56. trigger:
  57. branch:
  58. - master
  59. - stable-*
  60. event:
  61. - pull_request
  62. - push
  63. ---
  64. kind: pipeline
  65. name: qt-5.15-clang
  66. steps:
  67. - name: cmake
  68. image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-11
  69. volumes:
  70. - name: build
  71. path: /drone/build
  72. commands:
  73. - cd /drone/build
  74. - cmake -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_C_COMPILER=clang-14 -DCMAKE_CXX_COMPILER=clang++-14 -DCMAKE_BUILD_TYPE=Debug -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DADD_E2E_TESTS=ON -DECM_ENABLE_SANITIZERS=address -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64 ../src
  75. - name: compile
  76. image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-11
  77. volumes:
  78. - name: build
  79. path: /drone/build
  80. commands:
  81. - cd /drone/build
  82. - ninja
  83. - name: test
  84. image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-11
  85. volumes:
  86. - name: build
  87. path: /drone/build
  88. commands:
  89. - cd /drone/build
  90. - useradd -m -s /bin/bash test
  91. - chown -R test:test .
  92. - su -c 'ASAN_OPTIONS=detect_leaks=0 xvfb-run ctest --output-on-failure' test
  93. services:
  94. - name: server
  95. image: ghcr.io/nextcloud/continuous-integration-server:latest # also change in updateScreenshots.sh
  96. environment:
  97. EVAL: true
  98. SERVER_VERSION: 'stable24'
  99. commands:
  100. - BRANCH="$SERVER_VERSION" /usr/local/bin/initnc.sh
  101. - echo 127.0.0.1 server >> /etc/hosts
  102. - su www-data -c "OC_PASS=user1 php /var/www/html/occ user:add --password-from-env --display-name='User One' user1"
  103. - su www-data -c "OC_PASS=user2 php /var/www/html/occ user:add --password-from-env --display-name='User Two' user2"
  104. - su www-data -c "OC_PASS=user3 php /var/www/html/occ user:add --password-from-env --display-name='User Three' user3"
  105. - su www-data -c "php /var/www/html/occ user:setting user2 files quota 1G"
  106. - su www-data -c "php /var/www/html/occ group:add users"
  107. - su www-data -c "php /var/www/html/occ group:adduser users user1"
  108. - su www-data -c "php /var/www/html/occ group:adduser users user2"
  109. - su www-data -c "git clone --depth=1 -b $SERVER_VERSION https://github.com/nextcloud/activity.git /var/www/html/apps/activity/"
  110. - su www-data -c "php /var/www/html/occ app:enable activity"
  111. - su www-data -c "git clone --depth=1 -b $SERVER_VERSION https://github.com/nextcloud/text.git /var/www/html/apps/text/"
  112. - su www-data -c "php /var/www/html/occ app:enable text"
  113. - su www-data -c "git clone --depth=1 -b $SERVER_VERSION https://github.com/nextcloud/end_to_end_encryption.git /var/www/html/apps/end_to_end_encryption/"
  114. - su www-data -c "php /var/www/html/occ app:enable end_to_end_encryption"
  115. - /usr/local/bin/run.sh
  116. volumes:
  117. - name: build
  118. temp: {}
  119. trigger:
  120. branch:
  121. - master
  122. - stable-*
  123. event:
  124. - pull_request
  125. - push
  126. ---
  127. kind: pipeline
  128. name: AppImage
  129. steps:
  130. - name: build
  131. image: ghcr.io/nextcloud/continuous-integration-client-appimage:client-appimage-6
  132. environment:
  133. CI_UPLOAD_GIT_TOKEN:
  134. from_secret: CI_UPLOAD_GIT_TOKEN
  135. CI_UPLOAD_GIT_USERNAME:
  136. from_secret: CI_UPLOAD_GIT_USERNAME
  137. commands:
  138. - BUILDNR=$DRONE_BUILD_NUMBER VERSION_SUFFIX=$DRONE_PULL_REQUEST BUILD_UPDATER=ON DESKTOP_CLIENT_ROOT=$DRONE_WORKSPACE /bin/bash -c "./admin/linux/build-appimage.sh"
  139. - BUILDNR=$DRONE_BUILD_NUMBER VERSION_SUFFIX=$DRONE_PULL_REQUEST DESKTOP_CLIENT_ROOT=$DRONE_WORKSPACE /bin/bash -c "./admin/linux/upload-appimage.sh" || echo "Upload failed, however this is an optional step."
  140. trigger:
  141. branch:
  142. - master
  143. - stable-*
  144. event:
  145. - pull_request
  146. - push
  147. ---
  148. kind: pipeline
  149. name: Debian
  150. steps:
  151. - name: build
  152. image: ghcr.io/nextcloud/continuous-integration-client-debian:client-debian-3
  153. commands:
  154. - /bin/bash -c "./admin/linux/debian/drone-build.sh" || echo "[WARNING] Debian build failed but this is a non-blocking CI event"
  155. environment:
  156. DEBIAN_SECRET_KEY:
  157. from_secret: DEBIAN_SECRET_KEY
  158. DEBIAN_SECRET_IV:
  159. from_secret: DEBIAN_SECRET_IV
  160. trigger:
  161. branch:
  162. - master
  163. event:
  164. - pull_request
  165. - push
  166. ---
  167. kind: pipeline
  168. name: Documentation
  169. steps:
  170. - name: build
  171. image: nextcloudci/documentation:documentation-5
  172. commands:
  173. - cd doc
  174. - make html
  175. trigger:
  176. branch:
  177. - master
  178. event:
  179. - pull_request
  180. - push