epubgrep/.drone.yml

332 lines
10 KiB
YAML
Raw Permalink Normal View History

# -*- fill-column: 1000 -*-
name: Build x86_64
2021-05-29 21:54:47 +02:00
kind: pipeline
type: docker
volumes:
2021-08-20 20:41:52 +02:00
- name: deb-package-cache
host:
2021-08-20 20:41:52 +02:00
path: /var/cache/deb-package-cache
- name: rpm-package-cache
host:
path: /var/cache/rpm-package-cache
trigger:
event:
exclude:
- tag
steps:
- name: GCC 10 / clang 11 (debug)
image: debian:bullseye-slim
pull: always
environment:
CXX: g++-10
CXXFLAGS: -pipe -O2
DEBIAN_FRONTEND: noninteractive
2021-05-23 09:19:28 +02:00
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
2021-05-23 09:19:28 +02:00
- apt-get install -qq build-essential cmake clang locales
2021-06-01 18:47:12 +02:00
- apt-get install -qq catch libboost-program-options-dev libboost-locale-dev libboost-regex-dev libboost-log-dev gettext libarchive-dev libfmt-dev asciidoc libpugixml-dev nlohmann-json3-dev
- rm -rf build_deb && mkdir -p build_deb && cd build_deb
- cmake -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles" -DWITH_TESTS=YES -DWITH_SANITIZERS=YES ..
- make VERBOSE=1
- make install DESTDIR=install
2021-06-03 15:53:43 +02:00
- ctest -V
2021-06-03 16:18:01 +02:00
- cd ../
- rm -rf build_deb && mkdir -p build_deb && cd build_deb
- CXX="clang++" cmake -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles" -DWITH_TESTS=YES -DWITH_SANITIZERS=YES ..
- make VERBOSE=1
- make install DESTDIR=install
2021-06-03 15:53:43 +02:00
- ctest -V
volumes:
2021-08-20 20:41:52 +02:00
- name: deb-package-cache
path: /var/cache/apt/archives
- name: Download CMake 3.12 installer
2021-05-20 09:14:17 +02:00
image: plugins/download
settings:
source: https://cmake.org/files/v3.12/cmake-3.12.0-Linux-x86_64.sh
2021-05-20 09:14:17 +02:00
destination: cmake_installer.sh
skip_verify: true
sha256: 052b7daa2adab40211c6644da200ef95096d2adbcebd4cc5e60230d9023168bd
2021-05-20 09:14:17 +02:00
- name: GCC 8 / clang 6
image: ubuntu:bionic
pull: always
environment:
CXX: g++-8
CXXFLAGS: -pipe -O2
DEBIAN_FRONTEND: noninteractive
2021-05-23 09:19:28 +02:00
LANG: C.UTF-8
pugixml_DIR: "/usr/share/libpugixml-dev/cmake"
2021-06-01 18:47:12 +02:00
nlohmann_json_DIR: "/usr/lib/cmake"
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 g++-8 build-essential clang locales
2021-06-01 18:47:12 +02:00
- apt-get install -qq catch libboost-program-options-dev libboost-locale-dev libboost-regex-dev libboost-log-dev gettext libarchive-dev libfmt-dev asciidoc libpugixml-dev nlohmann-json-dev
2021-05-20 09:14:17 +02:00
- sh cmake_installer.sh --skip-license --exclude-subdir --prefix=/usr/local
2021-05-29 20:20:16 +02:00
- cp /usr/lib/x86_64-linux-gnu/libpugixml* /lib/x86_64-linux-gnu/
- rm -rf build_deb && mkdir -p build_deb && cd build_deb
- cmake -G "Unix Makefiles" -DWITH_TESTS=YES ..
- make VERBOSE=1
- make install DESTDIR=install
2021-06-03 15:53:43 +02:00
- ctest -V
2021-06-03 16:18:01 +02:00
- cd ../
- rm -rf build_deb && mkdir -p build_deb && cd build_deb
- CXX="clang++" cmake -G "Unix Makefiles" -DWITH_TESTS=YES ..
- make VERBOSE=1
- make install DESTDIR=install
2021-06-03 15:53:43 +02:00
- ctest -V
volumes:
2021-08-20 20:41:52 +02:00
- name: deb-package-cache
path: /var/cache/apt/archives
depends_on:
- GCC 10 / clang 11 (debug)
- Download CMake 3.12 installer
2021-08-20 20:30:17 +02:00
- name: GCC 9
image: opensuse/leap:15
pull: always
environment:
CXX: g++-9
CXXFLAGS: -pipe -O2
LANG: C.UTF-8
commands:
- zypper --non-interactive modifyrepo --all --keep-packages
- zypper --non-interactive install cmake gcc9-c++ rpm-build
2021-08-20 21:25:45 +02:00
- zypper --non-interactive install Catch2-devel libboost_program_options1_75_0-devel libboost_locale1_75_0-devel libboost_log1_75_0-devel fmt-devel libarchive-devel pugixml-devel nlohmann_json-devel asciidoc
- rm -rf build_rpm && mkdir -p build_rpm && cd build_rpm
2021-08-20 20:30:17 +02:00
- cmake -G "Unix Makefiles" -DWITH_TESTS=YES ..
- make VERBOSE=1
- make install DESTDIR=install
- ctest -V
2021-08-20 20:41:52 +02:00
volumes:
- name: rpm-package-cache
path: /var/cache/zypp/packages
2021-08-20 20:30:17 +02:00
- name: notify
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 ]
2021-08-21 00:39:03 +02:00
depends_on:
- GCC 10 / clang 11 (debug)
- Download CMake 3.12 installer
- GCC 9
- GCC 8 / clang 6
---
name: Packages x86_64
2021-05-29 21:54:47 +02:00
kind: pipeline
type: docker
volumes:
2021-08-20 20:41:52 +02:00
- name: deb-package-cache
host:
2021-08-20 20:41:52 +02:00
path: /var/cache/deb-package-cache
trigger:
event:
- tag
steps:
- name: Debian bullseye
image: debian:bullseye-slim
pull: always
environment:
CXX: g++-10
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 file
- apt-get install -qq libboost-program-options-dev libboost-locale-dev libboost-regex-dev libboost-log-dev gettext libarchive-dev libfmt-dev libpugixml-dev nlohmann-json3-dev
- apt-get install -qq --no-install-recommends asciidoc xsltproc
- rm -rf build_deb && mkdir -p build_deb && cd build_deb
- 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_bullseye.deb ..
volumes:
2021-08-20 20:41:52 +02:00
- name: deb-package-cache
path: /var/cache/apt/archives
- name: Debian buster
image: debian:buster-slim
pull: always
environment:
CXX: g++-8
CXXFLAGS: -pipe -O2
DEBIAN_FRONTEND: noninteractive
LANG: C.UTF-8
2021-06-01 18:47:12 +02:00
nlohmann_json_DIR: "/usr/lib/cmake"
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 file
- apt-get install -qq libboost-program-options-dev libboost-locale-dev libboost-regex-dev libboost-log-dev gettext libarchive-dev libfmt-dev libpugixml-dev nlohmann-json-dev
- apt-get install -qq --no-install-recommends asciidoc xsltproc
- rm -rf build_deb && mkdir -p build_deb && cd build_deb
- 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:
2021-08-20 20:41:52 +02:00
- name: deb-package-cache
path: /var/cache/apt/archives
depends_on:
- Debian bullseye
- 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 cmake clang locales lsb-release file
- apt-get install -qq libboost-program-options-dev libboost-locale-dev libboost-regex-dev libboost-log-dev gettext libarchive-dev libfmt-dev libpugixml-dev nlohmann-json3-dev
- apt-get install -qq --no-install-recommends asciidoc xsltproc
- rm -rf build_deb && mkdir -p build_deb && cd build_deb
- 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:
2021-08-20 20:41:52 +02:00
- name: deb-package-cache
path: /var/cache/apt/archives
depends_on:
- Debian bullseye
2021-08-21 00:39:03 +02:00
- Debian buster
- name: Download CMake 3.12 installer
image: plugins/download
settings:
source: https://cmake.org/files/v3.12/cmake-3.12.0-Linux-x86_64.sh
destination: cmake_installer.sh
skip_verify: true
sha256: 052b7daa2adab40211c6644da200ef95096d2adbcebd4cc5e60230d9023168bd
- name: Ubuntu bionic
image: ubuntu:bionic
pull: always
environment:
2021-05-27 22:53:26 +02:00
CXX: g++-8
CXXFLAGS: -pipe -O2
DEBIAN_FRONTEND: noninteractive
LANG: C.UTF-8
pugixml_DIR: "/usr/share/libpugixml-dev/cmake"
2021-06-01 18:47:12 +02:00
nlohmann_json_DIR: "/usr/lib/cmake"
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 g++-8 build-essential clang locales lsb-release file
- apt-get install -qq libboost-program-options-dev libboost-locale-dev libboost-regex-dev libboost-log-dev gettext libarchive-dev libfmt-dev libpugixml-dev nlohmann-json-dev
- apt-get install -qq --no-install-recommends asciidoc xsltproc
- sh cmake_installer.sh --skip-license --exclude-subdir --prefix=/usr/local
2021-05-29 20:20:16 +02:00
- cp /usr/lib/x86_64-linux-gnu/libpugixml* /lib/x86_64-linux-gnu/
- rm -rf build_deb && mkdir -p build_deb && cd build_deb
- 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:
2021-08-20 20:41:52 +02:00
- name: deb-package-cache
path: /var/cache/apt/archives
depends_on:
- Debian bullseye
2021-08-21 00:39:03 +02:00
- Debian buster
- Ubuntu focal
- Download CMake 3.12 installer
- name: openSUSE Leap 15
image: opensuse/leap:15
pull: always
environment:
CXX: g++-9
CXXFLAGS: -pipe -O2
LANG: C.UTF-8
commands:
- zypper --non-interactive modifyrepo --all --keep-packages
- zypper --non-interactive install cmake gcc9-c++ rpm-build lsb-release
2021-08-20 21:25:45 +02:00
- zypper --non-interactive install libboost_program_options1_75_0-devel libboost_locale1_75_0-devel libboost_log1_75_0-devel fmt-devel libarchive-devel pugixml-devel nlohmann_json-devel asciidoc
- rm -rf build_rpm && mkdir -p build_rpm && cd build_rpm
- cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr ..
- make VERBOSE=1
- make install DESTDIR=install
- cpack -G RPM
- cp -v epubgrep-${DRONE_TAG}-0.x86_64.opensuse-$(lsb_release --release --short).rpm ..
volumes:
- name: rpm-package-cache
path: /var/cache/zypp/packages
- 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_bullseye.deb
2021-05-27 23:07:08 +02:00
- epubgrep_${DRONE_TAG}-0_amd64_focal.deb
- epubgrep_${DRONE_TAG}-0_amd64_bionic.deb
- epubgrep-${DRONE_TAG}-0.x86_64.opensuse-$(lsb_release --release --short).rpm
checksum:
- sha512
2022-08-16 19:14:19 +02:00
depends_on:
- Debian bullseye
- Debian buster
- Ubuntu focal
- Ubuntu bionic
- openSUSE Leap 15
- 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 ]
2021-08-21 00:39:03 +02:00
depends_on:
- Debian bullseye
- Debian buster
- Ubuntu focal
- Download CMake 3.12 installer
- Ubuntu bionic