this is the main cwtch gui with the pretty interface https://cwtch.im
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.
 
 
 
 
 
 

223 lines
7.6 KiB

  1. workspace:
  2. base: /media/sf_GOPATH1/src/cwtch.im
  3. path: ui
  4. pipeline:
  5. build-linux:
  6. mem_limit: 3G
  7. image: therecipe/qt:linux_static
  8. when:
  9. repo: cwtch.im/ui
  10. branch: master
  11. event: [ push, pull_request ]
  12. environment:
  13. - QT_DIR=/opt/Qt
  14. - QT_DOCKER='true'
  15. - QT_API=5.13.0
  16. - GO111MODULE=on
  17. commands:
  18. - export PATH=$PATH:/home/user/work/bin:/media/sf_GOPATH1/bin
  19. - apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates curl git openssh-client
  20. - go mod download
  21. - $QT_DIR/$QT_API/gcc_64/bin/lrelease ui.pro
  22. - git fetch --tags
  23. - export VERSION=`git describe --tags`
  24. - export BUILDDATE=`date +%G-%m-%d-%H-%M`
  25. - go mod vendor
  26. - qtdeploy -ldflags "-X main.buildVer=$VERSION -X main.buildDate=$BUILDDATE" build linux
  27. - cp README.md deploy/linux
  28. - cp -R assets deploy/linux/
  29. - export FILENAME=cwtch-linux-$BUILDDATE.tar.gz
  30. - cd deploy
  31. - mv linux cwtch
  32. - tar -czf $FILENAME cwtch
  33. - sha256sum $FILENAME > $FILENAME.sha256
  34. - rm -r cwtch
  35. build-android-arm-v7a:
  36. mem_limit: 3G
  37. image: therecipe/qt:android
  38. secrets: [upload_jks_file,upload_jks_pass]
  39. when:
  40. repo: cwtch.im/ui
  41. branch: master
  42. event: push
  43. environment:
  44. - QT_DIR=/opt/Qt
  45. - QT_DOCKER='true'
  46. - QT_API=5.13.0
  47. - ANDROID_NDK_DIR=/home/user/android-ndk-r18b
  48. - ANDROID_SDK_DIR=/home/user/android-sdk-linux
  49. - GO111MODULE=on
  50. commands:
  51. - export PATH=$PATH:/home/user/work/bin:/media/sf_GOPATH1/bin
  52. - apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates curl git
  53. - rm -r vendor/
  54. - make clean
  55. - echo "cwtch-upload" > android/jks_alias
  56. - echo $UPLOAD_JKS_PASS > android/jks_pass
  57. - echo $UPLOAD_JKS_FILE | tr -d '\n ' > android/ui.jks.b64
  58. - base64 --decode android/ui.jks.b64 > android/ui.jks
  59. - export GOARCH=arm
  60. - go mod download
  61. - export VERSION=`git describe --tags`
  62. - export BUILDDATE=`date +%G-%m-%d-%H-%M`
  63. - go mod vendor
  64. - qtsetup generate android
  65. - mv assets android/
  66. - ANDROID_MODULES_INCLUDE="Core,Gui,Svg,QuickWidgets,Xml" qtdeploy -ldflags "-X main.buildVer=$VERSION -X main.buildDate=$BUILDDATE" build android
  67. - mv android/assets assets
  68. - cd deploy
  69. - export FILENAME=cwtch-android-arm-v7a-$BUILDDATE.apk
  70. - cp android/build-release-signed.apk $FILENAME
  71. - sha256sum $FILENAME > $FILENAME.sha256
  72. - rm -r android
  73. build-android-arm64-v8a:
  74. mem_limit: 3G
  75. image: therecipe/qt:android
  76. secrets: [upload_jks_file,upload_jks_pass]
  77. when:
  78. repo: cwtch.im/ui
  79. branch: master
  80. event: push
  81. environment:
  82. - QT_DIR=/opt/Qt
  83. - QT_DOCKER='true'
  84. - QT_API=5.13.0
  85. - ANDROID_NDK_DIR=/home/user/android-ndk-r18b
  86. - ANDROID_SDK_DIR=/home/user/android-sdk-linux
  87. - GO111MODULE=on
  88. commands:
  89. - export PATH=$PATH:/home/user/work/bin:/media/sf_GOPATH1/bin
  90. - apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates curl git
  91. - rm -r vendor/
  92. - make clean
  93. - echo "cwtch-upload" > android/jks_alias
  94. - echo $UPLOAD_JKS_PASS > android/jks_pass
  95. - echo $UPLOAD_JKS_FILE | tr -d '\n ' > android/ui.jks.b64
  96. - base64 --decode android/ui.jks.b64 > android/ui.jks
  97. - export GOARCH=arm64
  98. - perl -pe 's/versionCode="(\d+)"/"versionCode=\"" .($1+1)."\""/eg' android/AndroidManifest.xml > android/AndroidManifest.xml.inc
  99. - rm android/AndroidManifest.xml
  100. - mv android/AndroidManifest.xml.inc android/AndroidManifest.xml
  101. - go mod download
  102. - export VERSION=`git describe --tags`
  103. - export BUILDDATE=`date +%G-%m-%d-%H-%M`
  104. - go mod vendor
  105. - qtsetup generate android
  106. - mv assets android/
  107. - ANDROID_MODULES_INCLUDE="Core,Gui,Svg,QuickWidgets,Xml" qtdeploy -ldflags "-X main.buildVer=$VERSION -X main.buildDate=$BUILDDATE" build android
  108. - mv android/assets assets
  109. - cd deploy
  110. - export FILENAME=cwtch-android-arm64-v8a-$BUILDDATE.apk
  111. - cp android/build-release-signed.apk $FILENAME
  112. - sha256sum $FILENAME > $FILENAME.sha256
  113. - rm -r android
  114. build-windows:
  115. mem_limit: 3G
  116. image: therecipe/qt:windows_64_static
  117. when:
  118. repo: cwtch.im/ui
  119. branch: [ master, windows_build ]
  120. event: push
  121. environment:
  122. - QT_DIR=/opt/Qt
  123. - QT_DOCKER='true'
  124. - QT_API=5.13.0
  125. - GO111MODULE=on
  126. commands:
  127. - export PATH=$PATH:/home/user/work/bin:/media/sf_GOPATH1/bin
  128. - apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates curl git zip
  129. - rm -r vendor || true
  130. - make clean || true
  131. - go mod download
  132. - export VERSION=`git describe --tags`
  133. - export BUILDDATE=`date +%G-%m-%d-%H-%M`
  134. - go mod vendor
  135. - export QT_DEBUG=true
  136. - export CONSOLE=true
  137. - export QT_DEBUG_QML=true
  138. - qtdeploy -ldflags "-X main.buildVer=$VERSION -X main.buildDate=$BUILDDATE" build windows
  139. - cp README.md deploy/windows
  140. - cp -R assets deploy/windows/
  141. - cp -r windows/* deploy/windows
  142. - cd deploy
  143. - mv windows cwtch
  144. - export FILENAME=cwtch-windows-$BUILDDATE.zip
  145. - zip -r $FILENAME cwtch
  146. - sha256sum $FILENAME > $FILENAME.sha256
  147. - mv cwtch windows
  148. package-windows:
  149. mem_limit: 3G
  150. image: hp41/nsis:latest
  151. when:
  152. repo: cwtch.im/ui
  153. branch: [ master, windows_build ]
  154. event: push
  155. environment:
  156. commands:
  157. - cp nsis/cwtch-installer.nsi deploy/
  158. - cd deploy
  159. - makensis -V3 cwtch-installer.nsi
  160. - export BUILDDATE=`date +%G-%m-%d-%H-%M`
  161. - export FILENAME=cwtch-installer-$BUILDDATE.exe
  162. - mv cwtch-installer.exe $FILENAME
  163. - sha256sum $FILENAME > $FILENAME.sha256
  164. - rm cwtch-installer.nsi
  165. - rm -r windows
  166. deploy-buildfiles:
  167. image: pivotaldata/concourse-ssh
  168. secrets: [buildfiles_key]
  169. when:
  170. repo: cwtch.im/ui
  171. branch: master
  172. event: push
  173. status: [ success ]
  174. commands:
  175. - apk add --no-cache git
  176. - echo $BUILDFILES_KEY > ~/id_rsab64
  177. - base64 -d ~/id_rsab64 > ~/id_rsa
  178. - chmod 400 ~/id_rsa
  179. - export DIR=`date +%G.%m.%d-%H.%M`-`git describe --tags`
  180. - cd deploy
  181. - mkdir $DIR
  182. - mv cwtch* $DIR/
  183. - scp -r -o StrictHostKeyChecking=no -i ~/id_rsa $DIR buildfiles@openprivacy.ca:/home/buildfiles/buildfiles/
  184. deploy-windows-build:
  185. image: pivotaldata/concourse-ssh
  186. secrets: [buildfiles_key]
  187. when:
  188. repo: cwtch.im/ui
  189. branch: windows_build
  190. event: push
  191. status: [ success ]
  192. commands:
  193. - apk add --no-cache git
  194. - echo $BUILDFILES_KEY > ~/id_rsab64
  195. - base64 -d ~/id_rsab64 > ~/id_rsa
  196. - chmod 400 ~/id_rsa
  197. - git fetch --tags
  198. - export DIR=`date +%G.%m.%d-%H.%M`-`git describe --tags`
  199. - cd deploy
  200. - mkdir -p windows_build/$DIR
  201. - mv cwtch* windows_build/$DIR/
  202. - scp -r -o StrictHostKeyChecking=no -i ~/id_rsa windows_build buildfiles@openprivacy.ca:/home/buildfiles/buildfiles/
  203. notify-email:
  204. image: drillster/drone-email
  205. host: build.openprivacy.ca
  206. port: 25
  207. skip_verify: true
  208. from: drone@openprivacy.ca
  209. when:
  210. repo: cwtch.im/ui
  211. branch: master
  212. status: [ failure ]
  213. notify-gogs:
  214. image: openpriv/drone-gogs
  215. when:
  216. repo: cwtch.im/ui
  217. branch: master
  218. event: pull_request
  219. status: [ success, changed, failure ]
  220. secrets: [gogs_account_token]
  221. gogs_url: https://git.openprivacy.ca