exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit d705ee26636a641bb14fd7faa7fe264c4f32b3ff
parent 00c961386ed72dcc82b7bc9b96da44b6286b8db2
Author: Devan Carpenter <devan@taler.net>
Date:   Fri, 25 Aug 2023 23:59:52 -0400

ci: add pipeline with build and package jobs

Diffstat:
Aci/Containerfile | 62++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aci/jobs/0-build/build.sh | 9+++++++++
Aci/jobs/0-build/job.sh | 6++++++
Aci/jobs/1-docs/docs.sh | 11+++++++++++
Aci/jobs/1-docs/job.sh | 6++++++
Aci/jobs/2-deb-package/install-fix.patch | 13+++++++++++++
Aci/jobs/2-deb-package/job.sh | 24++++++++++++++++++++++++
7 files changed, 131 insertions(+), 0 deletions(-)

diff --git a/ci/Containerfile b/ci/Containerfile @@ -0,0 +1,62 @@ +FROM docker.io/library/debian:bookworm + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update -yqq && \ + apt-get install -yqq \ + autoconf \ + autopoint \ + curl \ + git \ + libcurl4-gnutls-dev \ + libgcrypt-dev \ + libidn11-dev \ + libjansson-dev \ + libmicrohttpd-dev \ + libpq-dev \ + libqrencode-dev \ + libsodium-dev \ + libtool \ + libunistring-dev \ + make \ + pkg-config \ + python3-pip \ + python3-sphinx \ + python3-sphinx-rtd-theme \ + recutils \ + texinfo \ + zlib1g-dev + +# Debian packaging tools +RUN apt-get install -yqq \ + po-debconf \ + build-essential \ + debhelper-compat \ + devscripts + +# Install Taler (and friends) packages +RUN curl -sS https://deb.taler.net/apt-nightly/taler-bookworm-ci.sources \ + | tee /etc/apt/sources.list.d/taler-bookworm-ci.sources + +RUN echo '\ +Package: * \n\ +Pin: origin "deb.taler.net" \n\ +Pin-Priority: 999' > /etc/apt/preferences.d/taler + +RUN cat /etc/apt/preferences.d/taler && \ + apt-get update -y && \ + apt-get install -y \ + libgnunet-dev \ + libgnunet \ +&& rm -rf /var/lib/apt/lists/* + + +RUN pip3 install --break-system-packages htmlark + +RUN apt-get update -yqq && \ + apt-get install -yqq \ + doxygen + +WORKDIR /workdir + +CMD ["bash", "/workdir/ci/ci.sh"] diff --git a/ci/jobs/0-build/build.sh b/ci/jobs/0-build/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash +set -exuo pipefail + +./bootstrap +./configure CFLAGS="-ggdb -O0" \ + --enable-logging=verbose \ + --disable-doc + +make diff --git a/ci/jobs/0-build/job.sh b/ci/jobs/0-build/job.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -exuo pipefail + +job_dir=$(dirname "${BASH_SOURCE[0]}") + +"${job_dir}"/build.sh diff --git a/ci/jobs/1-docs/docs.sh b/ci/jobs/1-docs/docs.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -exuo pipefail + +./bootstrap +./configure --enable-only-doc + +pushd ./doc/doxygen/ + +make full + +popd diff --git a/ci/jobs/1-docs/job.sh b/ci/jobs/1-docs/job.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -exuo pipefail + +job_dir=$(dirname "${BASH_SOURCE[0]}") + +"${job_dir}"/docs.sh diff --git a/ci/jobs/2-deb-package/install-fix.patch b/ci/jobs/2-deb-package/install-fix.patch @@ -0,0 +1,13 @@ +diff --git a/debian/taler-exchange.install b/debian/taler-exchange.install +index 631c270b..072c6231 100644 +--- a/debian/taler-exchange.install ++++ b/debian/taler-exchange.install +@@ -36,6 +36,6 @@ usr/share/taler/exchange/templates/*.must + debian/etc-taler-exchange/* etc/ + + # Terms of service / privacy policy templates +-usr/share/taler/exchange/*.rst ++#usr/share/taler/exchange/terms/*.rst + # Translations of ToS/PP +-usr/share/taler/exchange/locale/*/LC_MESSAGES/*.po ++#usr/share/taler/exchange/terms/locale/*/LC_MESSAGES/*.po diff --git a/ci/jobs/2-deb-package/job.sh b/ci/jobs/2-deb-package/job.sh @@ -0,0 +1,24 @@ +#!/bin/bash +set -exuo pipefail +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +unset LD_LIBRARY_PATH + + +git apply ./ci/jobs/2-deb-package/install-fix.patch + +# Get current version from debian/control file. +DEB_VERSION=$(dpkg-parsechangelog -S Version) + +# Install build-time dependencies. +mk-build-deps --install --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control + +# We do a sparse checkout, so we need to hint +# the version to the build system. +echo $DEB_VERSION > .version +./bootstrap +dpkg-buildpackage -rfakeroot -b -uc -us + +ls ../*.deb +mv ../*.deb /artifacts/