You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lokinet/.drone.jsonnet

50 lines
2.1 KiB
Plaintext

local distro = "sid";
local apt_get_quiet = 'apt-get -o=Dpkg::Use-Pty=0 -q';
local repo_suffix = '/staging'; // can be /beta or /staging for non-primary repo deps
local submodules = {
name: 'submodules',
image: 'drone/git',
commands: ['git fetch --tags', 'git submodule update --init --recursive']
};
local deb_pipeline(name, image, buildarch='amd64', debarch='amd64', jobs=6) = {
kind: 'pipeline',
type: 'docker',
name: name,
platform: { arch: buildarch },
steps: [
submodules,
{
name: 'build',
image: image,
environment: { SSH_KEY: { from_secret: "SSH_KEY" } },
commands: [
'echo "man-db man-db/auto-update boolean false" | debconf-set-selections',
'echo deb http://deb.loki.network' + repo_suffix + ' ' + distro + ' main >/etc/apt/sources.list.d/loki.list',
'cp debian/deb.loki.network.gpg /etc/apt/trusted.gpg.d',
apt_get_quiet + ' update',
apt_get_quiet + ' install -y eatmydata',
'eatmydata ' + apt_get_quiet + ' dist-upgrade -y',
'eatmydata ' + apt_get_quiet + ' install --no-install-recommends -y git-buildpackage devscripts equivs ccache openssh-client',
'cd debian',
'eatmydata mk-build-deps -i -r --tool="' + apt_get_quiet + ' -o Debug::pkgProblemResolver=yes --no-install-recommends -y" control',
'cd ..',
4 years ago
'ccache -s',
'eatmydata gbp buildpackage --git-no-pbuilder --git-builder=\'debuild --preserve-envvar=CCACHE_*\' --git-upstream-tag=HEAD -us -uc -j' + jobs,
4 years ago
'ccache -s',
'./debian/ci-upload.sh ' + distro + ' ' + debarch,
],
}
]
};
[
deb_pipeline("Debian sid (amd64)", "debian:sid"),
deb_pipeline("Debian sid (i386)", "i386/debian:sid", buildarch='amd64', debarch='i386'),
deb_pipeline("Debian sid (arm64)", "arm64v8/debian:sid", buildarch='arm64', debarch="arm64", jobs=4),
deb_pipeline("Debian sid (armhf)", "arm32v7/debian:sid", buildarch='arm64', debarch="armhf", jobs=4),
]