Set up drone CI for Debian / Ubuntu package uploading.

This commit is contained in:
tastytea 2021-05-26 10:31:44 +02:00
parent 8114d1a200
commit f20f95ff21
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 115 additions and 0 deletions

View File

@ -90,3 +90,118 @@ steps:
from_secret: email_password
when:
status: [ changed, failure ]
---
kind: pipeline
name: Packages x86_64
volumes:
- name: debian-package-cache
host:
path: /var/cache/debian-package-cache
trigger:
event:
- tag
steps:
- name: Debian buster
image: debian:buster-slim
pull: always
environment:
CXX: g++-8
CXXFLAGS: -pipe -O2
DEBIAN_FRONTEND: noninteractive
LANG: C.UTF-8
commands:
- rm /etc/apt/apt.conf.d/docker-clean
- alias apt-get='rm -f /var/cache/apt/archives/lock && apt-get'
- apt-get update -q
- apt-get install -qq build-essential cmake clang locales lsb-release
- apt-get install -qq catch libboost-program-options-dev libboost-locale-dev libboost-regex-dev gettext libarchive-dev libfmt-dev asciidoc
- rm -rf build && mkdir -p build && cd build
- cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr ..
- make VERBOSE=1
- make install DESTDIR=install
- cpack -G DEB
- cp -v epubgrep_${DRONE_TAG}-0_amd64_buster.deb ..
volumes:
- name: debian-package-cache
path: /var/cache/apt/archives
- name: Ubuntu focal
image: ubuntu:focal
pull: always
environment:
CXX: g++-9
CXXFLAGS: -pipe -O2
DEBIAN_FRONTEND: noninteractive
LANG: C.UTF-8
commands:
- rm /etc/apt/apt.conf.d/docker-clean
- alias apt-get='rm -f /var/cache/apt/archives/lock && apt-get'
- apt-get update -q
- apt-get install -qq build-essential clang locales lsb-release
- apt-get install -qq catch libboost-program-options-dev libboost-locale-dev libboost-regex-dev gettext libarchive-dev libfmt-dev asciidoc
- rm -rf build && mkdir -p build && cd build
- cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr ..
- make VERBOSE=1
- make install DESTDIR=install
- cpack -G DEB
- cp -v epubgrep_${DRONE_TAG}-0_amd64_focal.deb ..
volumes:
- name: debian-package-cache
path: /var/cache/apt/archives
- name: Ubuntu bionic
image: ubuntu:bionic
pull: always
environment:
CXX: g++-7
CXXFLAGS: -pipe -O2
DEBIAN_FRONTEND: noninteractive
LANG: C.UTF-8
commands:
- rm /etc/apt/apt.conf.d/docker-clean
- alias apt-get='rm -f /var/cache/apt/archives/lock && apt-get'
- apt-get update -q
- apt-get install -qq build-essential clang locales lsb-release
- apt-get install -qq catch libboost-program-options-dev libboost-locale-dev libboost-regex-dev gettext libarchive-dev libfmt-dev asciidoc
- sh cmake_installer.sh --skip-license --exclude-subdir --prefix=/usr/local
- rm -rf build && mkdir -p build && cd build
- cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr ..
- make VERBOSE=1
- make install DESTDIR=install
- cpack -G DEB
- cp -v epubgrep_${DRONE_TAG}-0_amd64_bionic.deb ..
volumes:
- name: debian-package-cache
path: /var/cache/apt/archives
- 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:
- epubgrep_${DRONE_TAG}-0_amd64_buster.deb
- epubgrep_${DRONE_TAG}-0_amd64_bionic.deb
checksum:
- sha512
- name: notification
image: drillster/drone-email
pull: always
settings:
host: mail.tzend.de
from: drone@tzend.de
username:
from_secret: email_username
password:
from_secret: email_password
when:
status: [ changed, failure ]