talkatu/builders

Parents
Children e6587a6f37c0
Initial builders, debian buster amd64, scanbuild, and fedora 28
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore Tue Jul 31 20:53:20 2018 -0500
@@ -0,0 +1,7 @@
+syntax: glob
+.*.swp
+*.sublime-workspace
+
+syntax: regexp
+^coverity\/.+\.tar\..*
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Dockerfile.debian-buster-amd64 Tue Jul 31 20:53:20 2018 -0500
@@ -0,0 +1,31 @@
+FROM debian:buster
+
+MAINTAINER Gary Kramlich <grim@reaperworld.com>
+
+COPY debian/localepurge.selections /
+
+RUN set -ex && \
+ debconf-set-selections -v /localepurge.selections && \
+ apt-get update && \
+ apt-get install -y --no-install-recommends localepurge && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists
+
+RUN set -ex && \
+ apt-get update && \
+ apt-get install -y --no-install-recommends \
+ devscripts fakeroot debhelper libdistro-info-perl \
+ build-essential meson gettext help2man mercurial libxml2-utils \
+ libglib2.0-dev gobject-introspection libgirepository1.0-dev libgtk-3-dev gtk-doc-tools \
+ libgumbo-dev libcmark-dev libgladeui-dev libgspell-1-dev \
+ && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists
+
+CMD ["/build.sh"]
+
+ENV DISTRIBUTION=buster \
+ ARCH=amd64
+
+COPY debian/build.sh /build.sh
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Dockerfile.fedora-28-amd64 Tue Jul 31 20:53:20 2018 -0500
@@ -0,0 +1,19 @@
+FROM fedora:28
+
+MAINTAINER Gary Kramlich <grim@reaperworld.com>
+
+RUN set -ex && \
+ dnf install -y \
+ meson ninja-build gcc mercurial \
+ redhat-rpm-config rpm-build \
+ help2man gettext \
+ glib2-devel gobject-introspection-devel gtk3-devel gtk-doc \
+ cmark-devel gspell-devel gumbo-parser-devel glade-devel
+
+CMD ["/build.sh"]
+
+ENV DISTRIBUTION=fedora \
+ VERSION=28 \
+ ARCH=amd64
+
+COPY rpm/build.sh /build.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Dockerfile.scanbuild Tue Jul 31 20:53:20 2018 -0500
@@ -0,0 +1,12 @@
+FROM talkatu/builders:debian-buster-amd64
+
+MAINTAINER Gary Kramlich <grim@reaperworld.com>
+
+RUN set -ex && \
+ apt-get update && \
+ apt-get install -y --no-install-recommends clang-tools-4.0 && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists
+
+COPY scanbuild/build.sh /
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/convey.yml Tue Jul 31 20:53:20 2018 -0500
@@ -0,0 +1,57 @@
+tasks:
+ import:
+ type: docker/import
+ files:
+ - .
+
+ debian-buster-amd64:
+ type: docker/build
+ dockerfile: Dockerfile.debian-buster-amd64
+ tag: talkatu/builders:debian-buster-amd64
+ files: debian
+
+ fedora-28-amd64:
+ type: docker/build
+ dockerfile: Dockerfile.fedora-28-amd64
+ tag: talkatu/builders:fedora-28-amd64
+ files: rpm
+
+ scanbuild:
+ type: docker/build
+ dockerfile: Dockerfile.scanbuild
+ tag: talkatu/builders:scanbuild
+ files: scanbuild
+
+plans:
+ debian:
+ stages:
+ - name: import
+ tasks:
+ - import
+ - name: build
+ concurrent: true
+ tasks:
+ - debian-buster-amd64
+ fedora:
+ stages:
+ - name: import
+ tasks:
+ - import
+ - name: build
+ tasks:
+ - fedora-28-amd64
+ scanbuild:
+ stages:
+ - name: import
+ tasks:
+ - import
+ - name: build
+ tasks: scanbuild
+
+meta-plans:
+ default:
+ plans:
+ - debian
+ - fedora
+ - scanbuild
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/build.sh Tue Jul 31 20:53:20 2018 -0500
@@ -0,0 +1,42 @@
+#!/bin/sh -ex
+# Copyright (C) 2015-2017 Gary Kramlich <grim@reaperworld.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+cd ${CONVEY_WORKSPACE}
+
+ARTIFACTS_DIR=${CONVEY_WORKSPACE}/debian-${DISTRIBUTION}-${ARCH}
+mkdir -p ${ARTIFACTS_DIR}
+
+cp -a ${CONVEY_WORKSPACE}/packaging/debian debian
+
+HG_ID=$(hg id -i)
+BUILD_NUMBER="${BUILD_NUMBER:-0}"
+BUILD_VERSION="${BUILD_NUMBER}~${HG_ID}"
+VERSION=$(dpkg-parsechangelog --show-field Version)
+dch -D ${DISTRIBUTION} -v ${VERSION}.${BUILD_VERSION} "build for ${HG_ID}"
+debuild -us -uc
+
+find -name "*-junit.xml" -exec cp {} ${ARTIFACTS_DIR} \;
+
+cd ..
+DEBS_DIR="${ARTIFACTS_DIR}/debs"
+mkdir -p ${DEBS_DIR}
+cp *.changes ${DEBS_DIR}
+LINE_NO=$(grep -n Files: *.changes | cut -d: -f1)
+for FILENAME in $(cat *.changes | tail -n +${LINE_NO} | awk '{print $5}'); do
+ mv ${FILENAME} ${DEBS_DIR}
+done
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/debian/localepurge.selections Tue Jul 31 20:53:20 2018 -0500
@@ -0,0 +1,10 @@
+localepurge localepurge/dontbothernew boolean false
+localepurge localepurge/none_selected boolean true
+localepurge localepurge/quickndirtycalc boolean true
+localepurge localepurge/remove_no note
+localepurge localepurge/use-dpkg-feature boolean true
+localepurge localepurge/verbose boolean false
+localepurge localepurge/nopurge multiselect
+localepurge localepurge/showfreedspace boolean true
+localepurge localepurge/mandelete boolean true
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/rpm/build.sh Tue Jul 31 20:53:20 2018 -0500
@@ -0,0 +1,36 @@
+#!/bin/sh -ex
+# Copyright (C) 2015-2016 Gary Kramlich <grim@reaperworld.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+cd ${CONVEY_WORKSPACE}
+
+BUILD_TRIPLET=${DISTRIBUTION}-${VERSION}-${ARCH}
+
+ARTIFACTS_DIR=${CONVEY_WORKSPACE}/${BUILD_TRIPLET}
+mkdir -p ${ARTIFACTS_DIR}
+
+BUILD_NUMBER="${BUILD_NUMBER:-0}"
+BUILD_VERSION="${BUILD_NUMBER}~$(hg id -i)"
+
+# we need to generate the spec file so we need to run a meson
+meson /tmp/${BUILD_TRIPLET}
+
+# now that we have our rpm spec file we can do an rpmbuild
+rpmbuild -bb \
+ -D "_rpmdir ${ARTIFACTS_DIR}" \
+ -D "_builddir ${CONVEY_WORKSPACE}" \
+ -D "build_number ${BUILD_VERSION}" \
+ /tmp/${BUILD_TRIPLET}/packaging/talkatu.spec
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/scanbuild/build.sh Tue Jul 31 20:53:20 2018 -0500
@@ -0,0 +1,29 @@
+#!/bin/sh -ex
+# Copyright (C) 2015-2016 Gary Kramlich <grim@reaperworld.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+cd ${CONVEY_WORKSPACE}
+
+BUILD_DIR="build-scanbuild"
+
+meson ${BUILD_DIR}
+ninja -C ${BUILD_DIR} scan-build
+EC=${?}
+
+cp -a ${BUILD_DIR}/meson-logs/scanbuild ${CONVEY_WORKSPACE}
+
+exit ${?}
+