Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR buster build to bullseye container #100

Open
wants to merge 25 commits into
base: debian/bullseye
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f091cd8
Added sid git-buildpackage info
jagerman Mar 24, 2020
2179c30
buster packaging
jagerman Mar 24, 2020
bb18609
remove unwanted TARGET from deb branches
jagerman Mar 24, 2020
a44a843
Add magic WTF variable
jagerman Mar 24, 2020
5213864
Merge remote-tracking branch 'origin/master' into debian/buster
jagerman Mar 24, 2020
a727479
debian updates for 0.2.1
jagerman Mar 26, 2020
f27d80f
Merge remote-tracking branch 'origin/master' into debian/buster
jagerman Mar 26, 2020
e658070
0.2.1 with updated branding
jagerman Mar 26, 2020
14e22c2
Fix scalable icon filename
jagerman Mar 26, 2020
43faa5a
Merge remote-tracking branch 'origin/master' into debian/buster
jagerman Oct 3, 2020
ef34150
buster deb update
jagerman Oct 2, 2020
fdc5ac8
Merge remote-tracking branch 'origin/master' into debian/buster
jagerman Nov 7, 2020
a68a7ff
New stable release
jagerman Nov 7, 2020
80a354d
Build from main repo
jagerman Nov 7, 2020
ae15495
Merge remote-tracking branch 'origin/master' into debian/buster
jagerman Nov 10, 2020
0c99952
0.3.2 release
jagerman Nov 10, 2020
ccab42b
Merge remote-tracking branch 'origin/master' into debian/buster
jagerman Nov 12, 2020
a2efa2f
lokinet gui release for lokinet 0.8.1
jagerman Nov 12, 2020
f06bc79
Add qt5 svg dep
jagerman Nov 12, 2020
253c8f5
Update required lokimq version + add pkg-config dep
jagerman Nov 17, 2020
094f2d7
Merge remote-tracking branch 'origin/master' into debian/buster
jagerman Nov 24, 2020
ae70a04
0.3.4 control panel release (for lokinet 0.8.2)
jagerman Nov 24, 2020
a75fa62
Merge remote-tracking branch 'origin/master' into debian/buster
jagerman Dec 16, 2020
2a4411e
0.3.5 control panel release
jagerman Dec 16, 2020
cae2fb5
change to bullseye
necro-nemesis Nov 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
184 changes: 25 additions & 159 deletions .drone.jsonnet
Original file line number Diff line number Diff line change
@@ -1,183 +1,49 @@
local default_deps_base='libsystemd-dev qtbase5-dev qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qt-labs-platform qml-module-qtcharts libqt5charts5-dev libqt5svg5-dev liblokimq-dev';
local default_deps_nocxx=default_deps_base;
local default_deps='g++ ' + default_deps_nocxx; // g++ sometimes needs replacement
local default_windows_deps='mingw-w64-binutils mingw-w64-gcc mingw-w64-crt mingw-w64-headers mingw-w64-winpthreads perl openssh zip bash binutils'; // deps for windows cross compile
local distro = "bullseye";
local distro_name = 'Debian 11';
local distro_docker = 'debian:bullseye';

local apt_get_quiet = 'apt-get -o=Dpkg::Use-Pty=0 -q';

local repo_suffix = '/'; // 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']
commands: ['git fetch --tags', 'git submodule update --init --recursive --depth=1']
};


// Regular build on a debian-like system:
local debian_pipeline(name, image,
arch='amd64',
deps=default_deps,
build_type='Release',
werror=true,
cmake_extra='',
extra_cmds=[],
imaginary_repo=true,
allow_fail=false) = {
local deb_pipeline(image, buildarch='amd64', debarch='amd64', jobs=6) = {
kind: 'pipeline',
type: 'docker',
name: name,
platform: { arch: arch },
trigger: { branch: { exclude: ['debian/*', 'ubuntu/*'] } },
name: distro_name + ' (' + debarch + ')',
platform: { arch: buildarch },
steps: [
submodules,
{
name: 'build',
image: image,
[if allow_fail then "failure"]: "ignore",
environment: { SSH_KEY: { from_secret: "SSH_KEY" } },
commands: [
'echo "man-db man-db/auto-update boolean false" | debconf-set-selections',
'apt-get update',
'apt-get install -y eatmydata',
'eatmydata apt-get dist-upgrade -y',
] + (if imaginary_repo then [
'eatmydata apt-get install -y gpg curl lsb-release',
'echo deb https://deb.imaginary.stream $$(lsb_release -sc) main >/etc/apt/sources.list.d/imaginary.stream.list',
'curl -s https://deb.imaginary.stream/public.gpg | apt-key add -',
'eatmydata apt-get update'
] else []
) + [
'eatmydata apt-get install -y gdb cmake git ninja-build pkg-config ccache ' + deps,
'mkdir build',
'cd build',
'cmake .. -G Ninja -DCMAKE_CXX_FLAGS=-fdiagnostics-color=always -DSYSTEMD=ON -DCMAKE_BUILD_TYPE='+build_type+' ' +
(if werror then '-DWARNINGS_AS_ERRORS=ON ' else '') +
cmake_extra,
'ninja -v',
] + extra_cmds,
}
],
};

// windows cross compile on alpine linux
local windows_cross_pipeline(name, image,
arch='amd64',
deps=default_windows_deps,
build_type='Release',
lto=false,
werror=false,
cmake_extra='',
toolchain='32',
extra_cmds=[],
allow_fail=false) = {
kind: 'pipeline',
type: 'docker',
name: name,
platform: { arch: arch },
trigger: { branch: { exclude: ['debian/*', 'ubuntu/*'] } },
steps: [
submodules,
{
name: 'build',
image: image,
[if allow_fail then "failure"]: "ignore",
environment: { SSH_KEY: { from_secret: "SSH_KEY" }, WINDOWS_BUILD_NAME: toolchain+"bit" },
commands: [
'apk update && apk upgrade',
'apk add cmake git ninja pkgconf ccache patch make g++ curl linux-headers python2 ' + deps,
'./contrib/build-win32-deps.sh',
'cd /drone/src',
'mkdir build',
'cd build',
'cmake .. -G Ninja -DCMAKE_CROSSCOMPILING=ON -DCMAKE_EXE_LINKER_FLAGS=-fstack-protector -DCMAKE_TOOLCHAIN_FILE=$PWD/../mingw32.cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_DEPS=ON ' +
std.join(" ", ['-DQt5' + x + '_DIR=/drone/src/qt5-win32/lib/cmake/Qt5' + x for x in ['', 'Qml', 'Network', 'Core', 'Quick', 'Gui', 'Widgets', 'Charts', 'QmlModels', 'Svg']]),
'ninja -v'
] + extra_cmds,
}
],
};

// Builds a snapshot .deb on a debian-like system by merging into the debian/* or ubuntu/* branch
local deb_builder(image, distro, distro_branch, arch='amd64', imaginary_repo=true) = {
kind: 'pipeline',
type: 'docker',
name: 'DEB (' + distro + (if arch == 'amd64' then '' else '/' + arch) + ')',
platform: { arch: arch },
environment: { distro_branch: distro_branch, distro: distro },
steps: [
submodules,
{
name: 'build',
image: image,
failure: 'ignore',
environment: { SSH_KEY: { from_secret: "SSH_KEY" } },
commands: [
'echo "man-db man-db/auto-update boolean false" | debconf-set-selections',
'apt-get update',
'apt-get install -y eatmydata',
'eatmydata apt-get install -y git devscripts equivs ccache git-buildpackage python3-dev' + (if imaginary_repo then ' gpg' else'')
] + (if imaginary_repo then [ // Some distros need the imaginary.stream repo for backported sodium, etc.
'echo deb https://deb.imaginary.stream $${distro} main >/etc/apt/sources.list.d/imaginary.stream.list',
'curl -s https://deb.imaginary.stream/public.gpg | apt-key add -',
'eatmydata apt-get update'
] else []) + [
|||
# Look for the debian branch in this repo first, try upstream if that fails.
if ! git checkout $${distro_branch}; then
git remote add --fetch upstream https://github.com/loki-project/loki-network-control-panel.git &&
git checkout $${distro_branch}
fi
|||,
# Ignore merge conflicts in .drone.jsonnet:
'git config merge.ours.driver true',
'echo .drone.jsonnet merge=ours >>.gitattributes',

'git merge ${DRONE_COMMIT}',
'export DEBEMAIL="${DRONE_COMMIT_AUTHOR_EMAIL}" DEBFULLNAME="${DRONE_COMMIT_AUTHOR_NAME}"',
'gbp dch -S -s "HEAD^" --spawn-editor=never -U low',
'eatmydata mk-build-deps --install --remove --tool "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y"',
'export DEB_BUILD_OPTIONS="parallel=$$(nproc)"',
'debuild -e CCACHE_DIR -b',
'pwd',
'find ./contrib/ci',
'./contrib/ci/drone-debs-upload.sh ' + distro,
]
'cp debian/deb.loki.network.gpg /etc/apt/trusted.gpg.d/deb.loki.network.gpg',
'echo deb http://deb.loki.network' + repo_suffix + ' ' + distro + ' main >/etc/apt/sources.list.d/loki.list',
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 ..',
'eatmydata gbp buildpackage --git-no-pbuilder --git-builder=\'debuild --prepend-path=/usr/lib/ccache --preserve-envvar=CCACHE_*\' --git-upstream-tag=HEAD -us -uc -j' + jobs,
'./debian/ci-upload.sh ' + distro + ' ' + debarch,
],
}
]
};

[
// Various debian builds
debian_pipeline("Debian sid (amd64)", "debian:sid"),
debian_pipeline("Debian sid/Debug (amd64)", "debian:sid", build_type='Debug'),
debian_pipeline("Debian sid/clang-10 (amd64)", "debian:sid", deps='clang-10 '+default_deps_nocxx,
cmake_extra='-DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_COMPILER=clang++-10'),
debian_pipeline("Debian sid/gcc-10 (amd64)", "debian:sid", deps='g++-10 '+default_deps_nocxx,
cmake_extra='-DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10'),
debian_pipeline("Debian buster (i386)", "i386/debian:buster"),
debian_pipeline("Ubuntu focal (amd64)", "ubuntu:focal"),

// ARM builds (ARM64 and armhf)
debian_pipeline("Ubuntu bionic (ARM64)", "ubuntu:bionic", arch="arm64", deps='g++-8 ' + default_deps_nocxx,
cmake_extra='-DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8'),
debian_pipeline("Debian buster (armhf)", "arm32v7/debian:buster", arch="arm64"),

windows_cross_pipeline("win32 on alpine (i386)", "i386/alpine:3.12",
toolchain='32', extra_cmds=[
'../contrib/ci/drone-static-upload.sh'
]),

// Deb builds:
deb_builder("debian:sid", "sid", "debian/sid"),
deb_builder("debian:buster", "buster", "debian/buster"),
deb_builder("ubuntu:focal", "focal", "ubuntu/focal"),
deb_builder("debian:sid", "sid", "debian/sid", arch='arm64'),

// Macos builds:
//mac_builder('macOS (Release)'),
//mac_builder('macOS (Debug)', build_type='Debug'),
//mac_builder('macOS (Static)',
// extra_cmds=[
// '../contrib/ci/drone-check-static-libs.sh',
// '../contrib/ci/drone-static-upload.sh'
// ]),
deb_pipeline(distro_docker),
#deb_pipeline("i386/" + distro_docker, buildarch='amd64', debarch='i386'),
deb_pipeline("arm64v8/" + distro_docker, buildarch='arm64', debarch="arm64", jobs=4),
deb_pipeline("arm32v7/" + distro_docker, buildarch='arm64', debarch="armhf", jobs=4),
]
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# build artifacts
build/
/build*

tags
Loading