C++ wrapper for the Mastodon API .
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.

.drone.yml 8.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. kind: pipeline
  2. name: x86_64
  3. platform:
  4. os: linux
  5. arch: amd64
  6. volumes:
  7. - name: debian-package-cache
  8. host:
  9. path: /var/cache/debian-package-cache
  10. trigger:
  11. event:
  12. exclude:
  13. - tag
  14. steps:
  15. - name: gcc6
  16. image: debian:stretch-slim
  17. pull: true
  18. environment:
  19. LANG: C.utf8
  20. CXX: g++-6
  21. CXXFLAGS: -pipe -O2
  22. MASTODON_CPP_ACCESS_TOKEN:
  23. from_secret: mastodon_cpp_access_token
  24. commands:
  25. - rm /etc/apt/apt.conf.d/docker-clean
  26. - echo "APT::Default-Release \"stretch\";" >> /etc/apt/apt.conf.d/00default_release
  27. - echo "deb http://deb.debian.org/debian sid main" >> /etc/apt/sources.list.d/sid.list
  28. - apt-get update -q
  29. - apt-get install -qy build-essential cmake pkg-config
  30. - apt-get install -qy libcurl4-openssl-dev libjsoncpp-dev doxygen catch
  31. - apt-get install -qy -t sid libcurlpp-dev
  32. - rm -rf build && mkdir -p build && cd build
  33. - cmake -DWITH_EXAMPLES=YES -DWITH_TESTS=YES -DEXTRA_TEST_ARGS="~[api]" ..
  34. - make VERBOSE=1
  35. - make install DESTDIR=install
  36. - ctest
  37. volumes:
  38. - name: debian-package-cache
  39. path: /var/cache/apt/archives
  40. - name: gcc7
  41. image: debian:stretch-slim
  42. pull: true
  43. environment:
  44. LANG: C.utf8
  45. CXX: g++-7
  46. CXXFLAGS: -pipe -O2
  47. MASTODON_CPP_ACCESS_TOKEN:
  48. from_secret: mastodon_cpp_access_token
  49. commands:
  50. - rm /etc/apt/apt.conf.d/docker-clean
  51. - apt-get update -q
  52. - echo "APT::Default-Release \"stretch\";" >> /etc/apt/apt.conf.d/00default_release
  53. - echo "deb http://deb.debian.org/debian sid main" >> /etc/apt/sources.list.d/sid.list
  54. - echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main" >> /etc/apt/sources.list.d/ubuntu-toolchain-r.list
  55. - apt-get install -qy gnupg
  56. - gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 0x60c317803a41ba51845e371a1e9377a2ba9ef27f
  57. - gpg --armor --export 0x60c317803a41ba51845e371a1e9377a2ba9ef27f | apt-key add -
  58. - apt-get update -q
  59. - apt-get install -qy build-essential cmake pkg-config
  60. - apt-get install -qy -t xenial g++-7
  61. - apt-get install -qy libcurl4-openssl-dev libjsoncpp-dev doxygen catch
  62. - apt-get install -qy -t sid libcurlpp-dev
  63. - rm -rf build && mkdir -p build && cd build
  64. - cmake -DWITH_EXAMPLES=YES -DWITH_TESTS=YES -DEXTRA_TEST_ARGS="~[api]" ..
  65. - make VERBOSE=1
  66. - make install DESTDIR=install
  67. - ctest
  68. volumes:
  69. - name: debian-package-cache
  70. path: /var/cache/apt/archives
  71. - name: gcc8
  72. image: debian:stretch-slim
  73. pull: true
  74. environment:
  75. LANG: C.utf8
  76. CXX: g++-8
  77. CXXFLAGS: -pipe -O2
  78. MASTODON_CPP_ACCESS_TOKEN:
  79. from_secret: mastodon_cpp_access_token
  80. commands:
  81. - rm /etc/apt/apt.conf.d/docker-clean
  82. - apt-get update -q
  83. - echo "APT::Default-Release \"stretch\";" >> /etc/apt/apt.conf.d/00default_release
  84. - echo "deb http://deb.debian.org/debian sid main" >> /etc/apt/sources.list.d/sid.list
  85. - echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main" >> /etc/apt/sources.list.d/ubuntu-toolchain-r.list
  86. - apt-get install -qy gnupg
  87. - gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 0x60c317803a41ba51845e371a1e9377a2ba9ef27f
  88. - gpg --armor --export 0x60c317803a41ba51845e371a1e9377a2ba9ef27f | apt-key add -
  89. - apt-get update -q
  90. - apt-get install -qy build-essential cmake pkg-config
  91. - apt-get install -qy -t xenial g++-8
  92. - apt-get install -qy libcurl4-openssl-dev libjsoncpp-dev doxygen catch
  93. - apt-get install -qy -t sid libcurlpp-dev
  94. - rm -rf build && mkdir -p build && cd build
  95. - cmake -DWITH_EXAMPLES=YES -DWITH_TESTS=YES -DEXTRA_TEST_ARGS="~[api]" ..
  96. - make VERBOSE=1
  97. - make install DESTDIR=install
  98. - ctest
  99. volumes:
  100. - name: debian-package-cache
  101. path: /var/cache/apt/archives
  102. - name: clang5
  103. image: debian:stretch-slim
  104. pull: true
  105. environment:
  106. LANG: C.utf8
  107. CXX: clang++-5.0
  108. CXXFLAGS: -pipe -O2
  109. MASTODON_CPP_ACCESS_TOKEN:
  110. from_secret: mastodon_cpp_access_token
  111. commands:
  112. - rm /etc/apt/apt.conf.d/docker-clean
  113. - apt-get update -q
  114. - echo "APT::Default-Release \"stretch\";" >> /etc/apt/apt.conf.d/00default_release
  115. - echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list.d/stretch.list
  116. - echo "deb http://deb.debian.org/debian sid main" >> /etc/apt/sources.list.d/sid.list
  117. - apt-get update -q
  118. - apt-get install -qy build-essential cmake pkg-config
  119. - apt-get install -qy -t stretch-backports clang-5.0
  120. - apt-get install -qy libcurl4-openssl-dev libjsoncpp-dev doxygen catch
  121. - apt-get install -qy -t sid libcurlpp-dev
  122. - rm -rf build && mkdir -p build && cd build
  123. - cmake -DWITH_EXAMPLES=YES -DWITH_TESTS=YES -DEXTRA_TEST_ARGS="~[api]" ..
  124. - make VERBOSE=1
  125. - make install DESTDIR=install
  126. - ctest
  127. volumes:
  128. - name: debian-package-cache
  129. path: /var/cache/apt/archives
  130. - name: clang6
  131. image: debian:stretch-slim
  132. pull: true
  133. environment:
  134. LANG: C.utf8
  135. CXX: clang++-6.0
  136. CXXFLAGS: -pipe -O2
  137. MASTODON_CPP_ACCESS_TOKEN:
  138. from_secret: mastodon_cpp_access_token
  139. commands:
  140. - rm /etc/apt/apt.conf.d/docker-clean
  141. - apt-get update -q
  142. - echo "APT::Default-Release \"stretch\";" >> /etc/apt/apt.conf.d/00default_release
  143. - echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list.d/stretch.list
  144. - echo "deb http://deb.debian.org/debian sid main" >> /etc/apt/sources.list.d/sid.list
  145. - apt-get update -q
  146. - apt-get install -qy build-essential cmake pkg-config
  147. - apt-get install -qy -t stretch-backports clang-6.0
  148. - apt-get install -qy libcurl4-openssl-dev libjsoncpp-dev doxygen catch
  149. - apt-get install -qy -t sid libcurlpp-dev
  150. - rm -rf build && mkdir -p build && cd build
  151. - cmake -DWITH_EXAMPLES=YES -DWITH_TESTS=YES -DEXTRA_TEST_ARGS="~[api]" ..
  152. - make VERBOSE=1
  153. - make install DESTDIR=install
  154. - ctest
  155. volumes:
  156. - name: debian-package-cache
  157. path: /var/cache/apt/archives
  158. ---
  159. kind: pipeline
  160. name: packages x86_64
  161. platform:
  162. os: linux
  163. arch: amd64
  164. volumes:
  165. - name: debian-package-cache
  166. host:
  167. path: /var/cache/debian-package-cache
  168. - name: centos-package-cache
  169. host:
  170. path: /var/cache/centos-package-cache
  171. trigger:
  172. event:
  173. - tag
  174. steps:
  175. - name: deb
  176. image: debian:stretch-slim
  177. pull: always
  178. environment:
  179. LANG: C.utf8
  180. CXXFLAGS: -pipe -O2
  181. commands:
  182. - rm /etc/apt/apt.conf.d/docker-clean
  183. - echo "APT::Default-Release \"stretch\";" >> /etc/apt/apt.conf.d/00default_release
  184. - echo "deb http://deb.debian.org/debian sid main" >> /etc/apt/sources.list.d/sid.list
  185. - apt-get update -q
  186. - apt-get install -qy build-essential cmake pkg-config
  187. - apt-get install -qy libcurl4-openssl-dev libjsoncpp-dev doxygen
  188. - apt-get install -qy -t sid libcurlpp-dev
  189. - apt-get install -qy file
  190. - rm -rf build && mkdir -p build && cd build
  191. - cmake -DWITH_EXAMPLES=NO -DWITH_TESTS=NO ..
  192. - make package
  193. - cmake -DWITH_DEB=YES ..
  194. - make package
  195. - cp -v mastodon-cpp-${DRONE_TAG}_x86_64.tar.gz ..
  196. - cp -v libmastodon-cpp_${DRONE_TAG}-0_amd64.deb ..
  197. volumes:
  198. - name: debian-package-cache
  199. path: /var/cache/apt/archives
  200. - name: rpm
  201. image: centos:7
  202. pull: always
  203. environment:
  204. LANG: C.utf8
  205. CXXFLAGS: -pipe -O2
  206. commands:
  207. - sed -i 's/keepcache=0/keepcache=1/' /etc/yum.conf
  208. - curl -s -o /var/cache/yum/epel-release-latest-7.noarch.rpm http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  209. - rpm -i /var/cache/yum/epel-release-latest-7.noarch.rpm
  210. - yum install -qy centos-release-scl
  211. - yum install -qy devtoolset-6
  212. - scl enable devtoolset-6 bash
  213. - yum install -qy libcurl-devel doxygen rpm-build
  214. - yum --enablerepo=epel install -qy cmake3 jsoncpp-devel
  215. - curl -s -o /var/cache/yum/curlpp-devel-0.7.3-5.el6.x86_64.rpm https://download.fedoraproject.org/pub/epel/6/x86_64/Packages/c/curlpp-devel-0.7.3-5.el6.x86_64.rpm
  216. - curl -s -o /var/cache/yum/curlpp-0.7.3-5.el6.x86_64.rpm https://download.fedoraproject.org/pub/epel/6/x86_64/Packages/c/curlpp-0.7.3-5.el6.x86_64.rpm
  217. - yum localinstall -qy /var/cache/yum/curlpp-*
  218. - rm -rf build && mkdir -p build && cd build
  219. - cmake3 -DWITH_EXAMPLES=NO -DWITH_TESTS=NO ..
  220. - make package
  221. - cmake3 -DWITH_RPM=YES ..
  222. - make package
  223. - cp -v libmastodon-cpp-${DRONE_TAG}-0.x86_64.rpm ..
  224. volumes:
  225. - name: centos-package-cache
  226. path: /var/cache/yum
  227. - name: gitea_release
  228. image: plugins/gitea-release
  229. pull: always
  230. settings:
  231. base_url: https://schlomp.space
  232. api_key:
  233. from_secret: gitea_token
  234. title: ${DRONE_TAG}
  235. prerelease: true
  236. files:
  237. - mastodon-cpp-${DRONE_TAG}_x86_64.tar.gz
  238. - libmastodon-cpp_${DRONE_TAG}-0_amd64.deb
  239. - libmastodon-cpp-${DRONE_TAG}-0.x86_64.rpm
  240. checksum:
  241. - sha256
  242. - sha512
  243. ---
  244. kind: pipeline
  245. name: notify
  246. depends_on:
  247. - x86_64
  248. - packages x86_64
  249. trigger:
  250. status:
  251. - success
  252. - failure
  253. clone:
  254. disable: true
  255. steps:
  256. - name: email
  257. image: drillster/drone-email
  258. pull: always
  259. settings:
  260. host: cryptoparty-celle.de
  261. from: drone@tzend.de
  262. username:
  263. from_secret: email_username
  264. password:
  265. from_secret: email_password
  266. when:
  267. status: [ changed, failure ]