This repository has been archived on 2020-05-10. You can view files and clone it, but cannot push or open issues or pull requests.
mastodon-cpp/.drone.yml

270 lines
7.4 KiB
YAML

kind: pipeline
name: x86_64
platform:
os: linux
arch: amd64
volumes:
- name: debian-package-cache
host:
path: /var/cache/debian-package-cache
trigger:
event:
exclude:
- tag
steps:
- name: gcc6
image: debian:stretch-slim
pull: true
environment:
CXX: g++-6
CXXFLAGS: -pipe -O2
MASTODON_CPP_ACCESS_TOKEN:
from_secret: mastodon_cpp_access_token
commands:
- rm -f /etc/apt/apt.conf.d/docker-clean
- rm -f /var/cache/apt/archives/lock
- apt-get update -q
- apt-get install -qy build-essential cmake
- apt-get install -qy libpoco-dev libjsoncpp-dev doxygen catch
- rm -rf build && mkdir -p build && cd build
- cmake -DWITH_EXAMPLES=YES -DWITH_TESTS=YES -DEXTRA_TEST_ARGS="~[api]" ..
- make VERBOSE=1
- make install DESTDIR=install
- cd tests && ctest
volumes:
- name: debian-package-cache
path: /var/cache/apt/archives
- name: gcc9
image: debian:stretch-slim
pull: true
environment:
CXX: g++-9
CXXFLAGS: -pipe -O2
MASTODON_CPP_ACCESS_TOKEN:
from_secret: mastodon_cpp_access_token
commands:
- rm -f /etc/apt/apt.conf.d/docker-clean
- rm -f /var/cache/apt/archives/lock
- apt-get update -q
- echo "APT::Default-Release \"stretch\";" >> /etc/apt/apt.conf.d/00default_release
- echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main" >> /etc/apt/sources.list.d/ubuntu-toolchain-r.list
- apt-get install -qy gnupg
- gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 0x60c317803a41ba51845e371a1e9377a2ba9ef27f
- gpg --armor --export 0x60c317803a41ba51845e371a1e9377a2ba9ef27f | apt-key add -
- apt-get update -q
- apt-get install -qy build-essential cmake
- apt-get install -qy -t xenial g++-9
- apt-get install -qy libpoco-dev libjsoncpp-dev doxygen catch
- rm -rf build && mkdir -p build && cd build
- cmake -DWITH_EXAMPLES=YES ..
- make VERBOSE=1
- make install DESTDIR=install
volumes:
- name: debian-package-cache
path: /var/cache/apt/archives
- name: clang5
image: debian:stretch-slim
pull: true
environment:
CXX: clang++-5.0
CXXFLAGS: -pipe -O2
MASTODON_CPP_ACCESS_TOKEN:
from_secret: mastodon_cpp_access_token
commands:
- rm -f /etc/apt/apt.conf.d/docker-clean
- rm -f /var/cache/apt/archives/lock
- apt-get update -q
- echo "APT::Default-Release \"stretch\";" >> /etc/apt/apt.conf.d/00default_release
- echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list.d/stretch.list
- apt-get update -q
- apt-get install -qy build-essential cmake
- apt-get install -qy -t stretch-backports clang-5.0
- apt-get install -qy libpoco-dev libjsoncpp-dev doxygen catch
- rm -rf build && mkdir -p build && cd build
- cmake -DWITH_EXAMPLES=YES ..
- make VERBOSE=1
- make install DESTDIR=install
volumes:
- name: debian-package-cache
path: /var/cache/apt/archives
- name: clang7
image: debian:buster-slim
pull: true
environment:
LANG: C.utf8
CXX: clang++
CXXFLAGS: -pipe -O2
MASTODON_CPP_ACCESS_TOKEN:
from_secret: mastodon_cpp_access_token
commands:
- rm -f /etc/apt/apt.conf.d/docker-clean
- rm -f /var/cache/apt/archives/lock
- apt-get update -q
- apt-get update -q
- apt-get install -qy build-essential cmake clang
- apt-get install -qy libpoco-dev libjsoncpp-dev doxygen catch
- rm -rf build && mkdir -p build && cd build
- cmake -DWITH_EXAMPLES=YES ..
- make VERBOSE=1
- make install DESTDIR=install
volumes:
- name: debian-package-cache
path: /var/cache/apt/archives
- name: notification
image: drillster/drone-email
pull: always
settings:
host: cryptoparty-celle.de
from: drone@tzend.de
username:
from_secret: email_username
password:
from_secret: email_password
when:
status: [ changed, failure ]
---
kind: pipeline
name: packages x86_64
platform:
os: linux
arch: amd64
volumes:
- name: debian-package-cache
host:
path: /var/cache/debian-package-cache
- name: centos-package-cache
host:
path: /var/cache/centos-package-cache
trigger:
event:
- tag
steps:
- name: Debian stretch
image: debian:stretch-slim
pull: always
environment:
CXXFLAGS: -pipe -O2
LANG: C.utf8
commands:
- rm -f /etc/apt/apt.conf.d/docker-clean
- rm -f /var/cache/apt/archives/lock
- apt-get update -q
- apt-get install -qy build-essential cmake lsb-release
- apt-get install -qy libpoco-dev libjsoncpp-dev file
- rm -rf build && mkdir -p build && cd build
- cmake -DWITH_DEB=YES -DWITH_DOC=NO ..
- make package
- cp -v libmastodon-cpp_${DRONE_TAG}-0_stretch_amd64.deb ..
volumes:
- name: debian-package-cache
path: /var/cache/apt/archives
- name: Debian buster
image: debian:buster-slim
pull: always
environment:
CXXFLAGS: -pipe -O2
LANG: C.utf8
commands:
- rm -f /etc/apt/apt.conf.d/docker-clean
- rm -f /var/cache/apt/archives/lock
- apt-get update -q
- apt-get install -qy build-essential cmake lsb-release
- apt-get install -qy libpoco-dev libjsoncpp-dev file
- rm -rf build && mkdir -p build && cd build
- cmake -DWITH_DEB=YES -DWITH_DOC=NO ..
- make package
- cp -v libmastodon-cpp_${DRONE_TAG}-0_buster_amd64.deb ..
volumes:
- name: debian-package-cache
path: /var/cache/apt/archives
- name: Ubuntu bionic
image: ubuntu:bionic
pull: always
environment:
CXXFLAGS: -pipe -O2
LANG: C.utf8
commands:
- rm -f /etc/apt/apt.conf.d/docker-clean
- rm -f /var/cache/apt/archives/lock
- apt-get update -q
- apt-get install -qy build-essential cmake lsb-release
- apt-get install -qy libpoco-dev libjsoncpp-dev file
- rm -rf build && mkdir -p build && cd build
- cmake -DWITH_DEB=YES -DWITH_DOC=NO ..
- make package
- cp -v libmastodon-cpp_${DRONE_TAG}-0_bionic_amd64.deb ..
volumes:
- name: debian-package-cache
path: /var/cache/apt/archives
- name: CentOS 7
image: centos:7
pull: always
environment:
CXX: /opt/rh/devtoolset-6/root/usr/bin/g++
CXXFLAGS: -pipe -O2
LANG: C.utf8
commands:
- sed -i 's/keepcache=0/keepcache=1/' /etc/yum.conf
- curl -s -o /var/cache/yum/epel-release-latest-7.noarch.rpm http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
- rpm -i /var/cache/yum/epel-release-latest-7.noarch.rpm
- yum install -qy centos-release-scl
- yum install -qy devtoolset-6
- scl enable devtoolset-6 bash
- yum install -qy poco-devel openssl-devel doxygen rpm-build
- yum --enablerepo=epel install -qy cmake3 jsoncpp-devel
- rm -rf build && mkdir -p build && cd build
- cmake3 -DWITH_RPM=YES -DWITH_DOC=NO ..
- make package
- cp -v libmastodon-cpp-${DRONE_TAG}-0.x86_64.rpm ..
volumes:
- name: centos-package-cache
path: /var/cache/yum
- name: gitea_release
image: plugins/gitea-release
pull: always
settings:
base_url: https://schlomp.space
api_key:
from_secret: gitea_token
title: ${DRONE_TAG}
prerelease: true
files:
- libmastodon-cpp_${DRONE_TAG}-0_stretch_amd64.deb
- libmastodon-cpp_${DRONE_TAG}-0_buster_amd64.deb
- libmastodon-cpp_${DRONE_TAG}-0_bionic_amd64.deb
- libmastodon-cpp-${DRONE_TAG}-0.x86_64.rpm
checksum:
- sha256
- sha512
- name: notification
image: drillster/drone-email
pull: always
settings:
host: cryptoparty-celle.de
from: drone@tzend.de
username:
from_secret: email_username
password:
from_secret: email_password
when:
status: [ changed, failure ]