make format

pull/1774/head
Jason Rhinelander 3 years ago
parent 9b0b9fe67b
commit 52492c6253

@ -1,301 +1,320 @@
local default_deps_base='libsystemd-dev python3-dev libuv1-dev libunbound-dev nettle-dev libssl-dev libevent-dev libsqlite3-dev libcurl4-openssl-dev make'; local default_deps_base = 'libsystemd-dev python3-dev libuv1-dev libunbound-dev nettle-dev libssl-dev libevent-dev libsqlite3-dev libcurl4-openssl-dev make';
local default_deps_nocxx='libsodium-dev ' + default_deps_base; // libsodium-dev needs to be >= 1.0.18 local default_deps_nocxx = 'libsodium-dev ' + default_deps_base; // libsodium-dev needs to be >= 1.0.18
local default_deps='g++ ' + default_deps_nocxx; local default_deps = 'g++ ' + default_deps_nocxx;
local default_windows_deps='mingw-w64 zip nsis'; local default_windows_deps = 'mingw-w64 zip nsis';
local docker_base = 'registry.oxen.rocks/lokinet-ci-'; local docker_base = 'registry.oxen.rocks/lokinet-ci-';
local submodules = { local submodules = {
name: 'submodules', name: 'submodules',
image: 'drone/git', image: 'drone/git',
commands: ['git fetch --tags', 'git submodule update --init --recursive --depth=1'] commands: ['git fetch --tags', 'git submodule update --init --recursive --depth=1'],
}; };
local apt_get_quiet = 'apt-get -o=Dpkg::Use-Pty=0 -q'; local apt_get_quiet = 'apt-get -o=Dpkg::Use-Pty=0 -q';
// Regular build on a debian-like system: // Regular build on a debian-like system:
local debian_pipeline(name, image, local debian_pipeline(name,
arch='amd64', image,
deps=default_deps, arch='amd64',
build_type='Release', deps=default_deps,
lto=false, build_type='Release',
werror=true, lto=false,
cmake_extra='', werror=true,
extra_cmds=[], cmake_extra='',
jobs=6, extra_cmds=[],
tests=true, jobs=6,
loki_repo=false, tests=true,
allow_fail=false) = { loki_repo=false,
kind: 'pipeline', allow_fail=false) = {
type: 'docker', kind: 'pipeline',
name: name, type: 'docker',
platform: { arch: arch }, name: name,
trigger: { branch: { exclude: ['debian/*', 'ubuntu/*'] } }, platform: { arch: arch },
steps: [ trigger: { branch: { exclude: ['debian/*', 'ubuntu/*'] } },
submodules, steps: [
{ submodules,
name: 'build', {
image: image, name: 'build',
[if allow_fail then "failure"]: "ignore", image: image,
environment: { SSH_KEY: { from_secret: "SSH_KEY" } }, [if allow_fail then 'failure']: 'ignore',
commands: [ environment: { SSH_KEY: { from_secret: 'SSH_KEY' } },
'echo "Building on ${DRONE_STAGE_MACHINE}"', commands: [
'echo "man-db man-db/auto-update boolean false" | debconf-set-selections', 'echo "Building on ${DRONE_STAGE_MACHINE}"',
apt_get_quiet + ' update', 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections',
apt_get_quiet + ' install -y eatmydata', apt_get_quiet + ' update',
] + (if loki_repo then [ apt_get_quiet + ' install -y eatmydata',
] + (
if loki_repo then [
'eatmydata ' + apt_get_quiet + ' install -y lsb-release', 'eatmydata ' + apt_get_quiet + ' install -y lsb-release',
'cp contrib/deb.loki.network.gpg /etc/apt/trusted.gpg.d', 'cp contrib/deb.loki.network.gpg /etc/apt/trusted.gpg.d',
'echo deb http://deb.loki.network $$(lsb_release -sc) main >/etc/apt/sources.list.d/loki.network.list', 'echo deb http://deb.loki.network $$(lsb_release -sc) main >/etc/apt/sources.list.d/loki.network.list',
'eatmydata ' + apt_get_quiet + ' update' 'eatmydata ' + apt_get_quiet + ' update',
] else [] ] else []
) + [ ) + [
'eatmydata ' + apt_get_quiet + ' dist-upgrade -y', 'eatmydata ' + apt_get_quiet + ' dist-upgrade -y',
'eatmydata ' + apt_get_quiet + ' install -y gdb cmake git pkg-config ccache ' + deps, 'eatmydata ' + apt_get_quiet + ' install -y gdb cmake git pkg-config ccache ' + deps,
'mkdir build', 'mkdir build',
'cd build', 'cd build',
'cmake .. -DWITH_SETCAP=OFF -DCMAKE_CXX_FLAGS=-fdiagnostics-color=always -DCMAKE_BUILD_TYPE='+build_type+' ' + 'cmake .. -DWITH_SETCAP=OFF -DCMAKE_CXX_FLAGS=-fdiagnostics-color=always -DCMAKE_BUILD_TYPE=' + build_type + ' ' +
(if werror then '-DWARNINGS_AS_ERRORS=ON ' else '') + (if werror then '-DWARNINGS_AS_ERRORS=ON ' else '') +
'-DWITH_LTO=' + (if lto then 'ON ' else 'OFF ') + '-DWITH_LTO=' + (if lto then 'ON ' else 'OFF ') +
(if tests then '' else '-DWITH_TESTS=OFF ') + (if tests then '' else '-DWITH_TESTS=OFF ') +
cmake_extra, cmake_extra,
'VERBOSE=1 make -j' + jobs, 'VERBOSE=1 make -j' + jobs,
] ]
+ (if tests then ['../contrib/ci/drone-gdb.sh ./test/testAll --use-colour yes'] else []) + (if tests then ['../contrib/ci/drone-gdb.sh ./test/testAll --use-colour yes'] else [])
+ extra_cmds, + extra_cmds,
} },
], ],
}; };
local apk_builder(name, image, extra_cmds=[], allow_fail=false, jobs=6) = { local apk_builder(name, image, extra_cmds=[], allow_fail=false, jobs=6) = {
kind: 'pipeline', kind: 'pipeline',
type: 'docker', type: 'docker',
name: name, name: name,
platform: {arch: "amd64"}, platform: { arch: 'amd64' },
trigger: { branch: { exclude: ['debian/*', 'ubuntu/*'] } }, trigger: { branch: { exclude: ['debian/*', 'ubuntu/*'] } },
steps: [ steps: [
submodules, submodules,
{ {
name: 'build', name: 'build',
image: image, image: image,
[if allow_fail then "failure"]: "ignore", [if allow_fail then 'failure']: 'ignore',
environment: { SSH_KEY: { from_secret: "SSH_KEY" }, ANDROID: "android" }, environment: { SSH_KEY: { from_secret: 'SSH_KEY' }, ANDROID: 'android' },
commands: [ commands: [
'VERBOSE=1 JOBS='+jobs+' NDK=/usr/lib/android-ndk ./contrib/android.sh', 'VERBOSE=1 JOBS=' + jobs + ' NDK=/usr/lib/android-ndk ./contrib/android.sh',
'git clone https://github.com/oxen-io/lokinet-flutter-app lokinet-mobile', 'git clone https://github.com/oxen-io/lokinet-flutter-app lokinet-mobile',
'cp -av lokinet-jni-*/* lokinet-mobile/lokinet_lib/android/src/main/jniLibs/', 'cp -av lokinet-jni-*/* lokinet-mobile/lokinet_lib/android/src/main/jniLibs/',
'cd lokinet-mobile', 'cd lokinet-mobile',
'flutter build apk --debug', 'flutter build apk --debug',
'cd ..', 'cd ..',
'cp lokinet-mobile/build/app/outputs/apk/debug/app-debug.apk lokinet.apk' 'cp lokinet-mobile/build/app/outputs/apk/debug/app-debug.apk lokinet.apk',
] + extra_cmds ] + extra_cmds,
} },
] ],
}; };
// windows cross compile on debian // windows cross compile on debian
local windows_cross_pipeline(name, image, local windows_cross_pipeline(name,
arch='amd64', image,
build_type='Release', arch='amd64',
lto=false, build_type='Release',
werror=false, lto=false,
cmake_extra='', werror=false,
toolchain='32', cmake_extra='',
extra_cmds=[], toolchain='32',
jobs=6, extra_cmds=[],
allow_fail=false) = { jobs=6,
kind: 'pipeline', allow_fail=false) = {
type: 'docker', kind: 'pipeline',
name: name, type: 'docker',
platform: { arch: arch }, name: name,
trigger: { branch: { exclude: ['debian/*', 'ubuntu/*'] } }, platform: { arch: arch },
steps: [ trigger: { branch: { exclude: ['debian/*', 'ubuntu/*'] } },
submodules, steps: [
{ submodules,
name: 'build', {
image: image, name: 'build',
[if allow_fail then "failure"]: "ignore", image: image,
environment: { SSH_KEY: { from_secret: "SSH_KEY" }, WINDOWS_BUILD_NAME: toolchain+"bit" }, [if allow_fail then 'failure']: 'ignore',
commands: [ environment: { SSH_KEY: { from_secret: 'SSH_KEY' }, WINDOWS_BUILD_NAME: toolchain + 'bit' },
'echo "Building on ${DRONE_STAGE_MACHINE}"', commands: [
'echo "man-db man-db/auto-update boolean false" | debconf-set-selections', 'echo "Building on ${DRONE_STAGE_MACHINE}"',
apt_get_quiet + ' update', 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections',
apt_get_quiet + ' install -y eatmydata', apt_get_quiet + ' update',
'eatmydata ' + apt_get_quiet + ' install -y build-essential cmake git pkg-config ccache g++-mingw-w64-x86-64-posix nsis zip automake libtool', apt_get_quiet + ' install -y eatmydata',
'update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix', 'eatmydata ' + apt_get_quiet + ' install -y build-essential cmake git pkg-config ccache g++-mingw-w64-x86-64-posix nsis zip automake libtool',
'update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix', 'update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix',
'VERBOSE=1 JOBS=' + jobs + ' ./contrib/windows.sh' 'update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix',
] + extra_cmds, 'VERBOSE=1 JOBS=' + jobs + ' ./contrib/windows.sh',
} ] + extra_cmds,
], },
],
}; };
// Builds a snapshot .deb on a debian-like system by merging into the debian/* or ubuntu/* branch // 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', loki_repo=true) = { local deb_builder(image, distro, distro_branch, arch='amd64', loki_repo=true) = {
kind: 'pipeline', kind: 'pipeline',
type: 'docker', type: 'docker',
name: 'DEB (' + distro + (if arch == 'amd64' then '' else '/' + arch) + ')', name: 'DEB (' + distro + (if arch == 'amd64' then '' else '/' + arch) + ')',
platform: { arch: arch }, platform: { arch: arch },
environment: { distro_branch: distro_branch, distro: distro }, environment: { distro_branch: distro_branch, distro: distro },
steps: [ steps: [
submodules, submodules,
{ {
name: 'build', name: 'build',
image: image, image: image,
failure: 'ignore', failure: 'ignore',
environment: { SSH_KEY: { from_secret: "SSH_KEY" } }, environment: { SSH_KEY: { from_secret: 'SSH_KEY' } },
commands: [ commands: [
'echo "Building on ${DRONE_STAGE_MACHINE}"', 'echo "Building on ${DRONE_STAGE_MACHINE}"',
'echo "man-db man-db/auto-update boolean false" | debconf-set-selections' 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections',
] + (if loki_repo then [ ] + (if loki_repo then [
'cp contrib/deb.loki.network.gpg /etc/apt/trusted.gpg.d', 'cp contrib/deb.loki.network.gpg /etc/apt/trusted.gpg.d',
'echo deb http://deb.loki.network $${distro} main >/etc/apt/sources.list.d/loki.network.list' 'echo deb http://deb.loki.network $${distro} main >/etc/apt/sources.list.d/loki.network.list',
] else []) + [ ] else []) + [
apt_get_quiet + ' update', apt_get_quiet + ' update',
apt_get_quiet + ' install -y eatmydata', apt_get_quiet + ' install -y eatmydata',
'eatmydata ' + apt_get_quiet + ' install -y git devscripts equivs ccache git-buildpackage python3-dev', 'eatmydata ' + apt_get_quiet + ' install -y git devscripts equivs ccache git-buildpackage python3-dev',
||| |||
# Look for the debian branch in this repo first, try upstream if that fails. # Look for the debian branch in this repo first, try upstream if that fails.
if ! git checkout $${distro_branch}; then if ! git checkout $${distro_branch}; then
git remote add --fetch upstream https://github.com/oxen-io/loki-network.git && git remote add --fetch upstream https://github.com/oxen-io/loki-network.git &&
git checkout $${distro_branch} git checkout $${distro_branch}
fi fi
|||, |||,
# Tell the merge how to resolve conflicts in the source .drone.jsonnet (we don't // Tell the merge how to resolve conflicts in the source .drone.jsonnet (we don't
# care about it at all since *this* .drone.jsonnet is already loaded). // care about it at all since *this* .drone.jsonnet is already loaded).
'git config merge.ours.driver true', 'git config merge.ours.driver true',
'echo .drone.jsonnet merge=ours >>.gitattributes', 'echo .drone.jsonnet merge=ours >>.gitattributes',
'git merge ${DRONE_COMMIT}', 'git merge ${DRONE_COMMIT}',
'export DEBEMAIL="${DRONE_COMMIT_AUTHOR_EMAIL}" DEBFULLNAME="${DRONE_COMMIT_AUTHOR_NAME}"', 'export DEBEMAIL="${DRONE_COMMIT_AUTHOR_EMAIL}" DEBFULLNAME="${DRONE_COMMIT_AUTHOR_NAME}"',
'gbp dch -S -s "HEAD^" --spawn-editor=never -U low', 'gbp dch -S -s "HEAD^" --spawn-editor=never -U low',
'eatmydata mk-build-deps --install --remove --tool "' + apt_get_quiet + ' -o Debug::pkgProblemResolver=yes --no-install-recommends -y"', 'eatmydata mk-build-deps --install --remove --tool "' + apt_get_quiet + ' -o Debug::pkgProblemResolver=yes --no-install-recommends -y"',
'export DEB_BUILD_OPTIONS="parallel=$$(nproc)"', 'export DEB_BUILD_OPTIONS="parallel=$$(nproc)"',
#'grep -q lib debian/lokinet-bin.install || echo "/usr/lib/lib*.so*" >>debian/lokinet-bin.install', //'grep -q lib debian/lokinet-bin.install || echo "/usr/lib/lib*.so*" >>debian/lokinet-bin.install',
'debuild -e CCACHE_DIR -b', 'debuild -e CCACHE_DIR -b',
'./contrib/ci/drone-debs-upload.sh ' + distro, './contrib/ci/drone-debs-upload.sh ' + distro,
] ],
} },
] ],
}; };
local clang(version) = debian_pipeline( local clang(version) = debian_pipeline(
'Debian sid/clang-' + version + ' (amd64)', 'Debian sid/clang-' + version + ' (amd64)',
docker_base + 'debian-sid', docker_base + 'debian-sid',
deps='clang-' + version + ' ' + default_deps_nocxx, deps='clang-' + version + ' ' + default_deps_nocxx,
cmake_extra='-DCMAKE_C_COMPILER=clang-' + version + ' -DCMAKE_CXX_COMPILER=clang++-' + version + ' ' cmake_extra='-DCMAKE_C_COMPILER=clang-' + version + ' -DCMAKE_CXX_COMPILER=clang++-' + version + ' '
); );
local full_llvm(version) = debian_pipeline( local full_llvm(version) = debian_pipeline(
'Debian sid/llvm-' + version + ' (amd64)', 'Debian sid/llvm-' + version + ' (amd64)',
'debian:sid', 'debian:sid',
deps='clang-' + version + ' lld-' + version + ' libc++-' + version + '-dev libc++abi-' + version + '-dev ' deps='clang-' + version + ' lld-' + version + ' libc++-' + version + '-dev libc++abi-' + version + '-dev '
+ default_deps_nocxx, + default_deps_nocxx,
cmake_extra='-DCMAKE_C_COMPILER=clang-' + version + cmake_extra='-DCMAKE_C_COMPILER=clang-' + version +
' -DCMAKE_CXX_COMPILER=clang++-' + version + ' -DCMAKE_CXX_COMPILER=clang++-' + version +
' -DCMAKE_CXX_FLAGS=-stdlib=libc++ ' + ' -DCMAKE_CXX_FLAGS=-stdlib=libc++ ' +
std.join(' ', [ std.join(' ', [
'-DCMAKE_' + type + '_LINKER_FLAGS=-fuse-ld=lld-' + version '-DCMAKE_' + type + '_LINKER_FLAGS=-fuse-ld=lld-' + version
for type in ['EXE', 'MODULE', 'SHARED'] for type in ['EXE', 'MODULE', 'SHARED']
]) ])
); );
// Macos build // Macos build
local mac_builder(name, local mac_builder(name,
build_type='Release', build_type='Release',
werror=true, werror=true,
cmake_extra='', cmake_extra='',
extra_cmds=[], extra_cmds=[],
jobs=6, jobs=6,
allow_fail=false) = { allow_fail=false) = {
kind: 'pipeline', kind: 'pipeline',
type: 'exec', type: 'exec',
name: name, name: name,
platform: { os: 'darwin', arch: 'amd64' }, platform: { os: 'darwin', arch: 'amd64' },
steps: [ steps: [
{ name: 'submodules', commands: ['git fetch --tags', 'git submodule update --init --recursive'] }, { name: 'submodules', commands: ['git fetch --tags', 'git submodule update --init --recursive'] },
{ {
name: 'build', name: 'build',
environment: { SSH_KEY: { from_secret: "SSH_KEY" } }, environment: { SSH_KEY: { from_secret: 'SSH_KEY' } },
commands: [ commands: [
'echo "Building on ${DRONE_STAGE_MACHINE}"', 'echo "Building on ${DRONE_STAGE_MACHINE}"',
// If you don't do this then the C compiler doesn't have an include path containing // If you don't do this then the C compiler doesn't have an include path containing
// basic system headers. WTF apple: // basic system headers. WTF apple:
'export SDKROOT="$(xcrun --sdk macosx --show-sdk-path)"', 'export SDKROOT="$(xcrun --sdk macosx --show-sdk-path)"',
'ulimit -n 1024', // because macos sets ulimit to 256 for some reason yeah idk 'ulimit -n 1024', // because macos sets ulimit to 256 for some reason yeah idk
'./contrib/mac.sh' './contrib/mac.sh',
] + extra_cmds, ] + extra_cmds,
} },
] ],
}; };
[ [
{ {
name: 'lint check', name: 'lint check',
kind: 'pipeline', kind: 'pipeline',
type: 'docker', type: 'docker',
steps: [{ steps: [{
name: 'build', image: 'registry.oxen.rocks/lokinet-ci-lint', name: 'build',
commands: [ image: 'registry.oxen.rocks/lokinet-ci-lint',
'echo "Building on ${DRONE_STAGE_MACHINE}"', commands: [
apt_get_quiet + ' update', 'echo "Building on ${DRONE_STAGE_MACHINE}"',
apt_get_quiet + ' install -y eatmydata', apt_get_quiet + ' update',
'eatmydata ' + apt_get_quiet + ' install -y git clang-format-11', apt_get_quiet + ' install -y eatmydata',
'./contrib/ci/drone-format-verify.sh'] 'eatmydata ' + apt_get_quiet + ' install -y git clang-format-11 jsonnet',
}] './contrib/ci/drone-format-verify.sh',
}, ],
}],
},
// Various debian builds // Various debian builds
debian_pipeline("Debian sid (amd64)", "debian:sid"), debian_pipeline('Debian sid (amd64)', 'debian:sid'),
debian_pipeline("Debian sid/Debug (amd64)", "debian:sid", build_type='Debug'), debian_pipeline('Debian sid/Debug (amd64)', 'debian:sid', build_type='Debug'),
clang(13), clang(13),
full_llvm(13), full_llvm(13),
debian_pipeline("Debian buster (i386)", "i386/debian:buster", cmake_extra='-DDOWNLOAD_SODIUM=ON'), debian_pipeline('Debian buster (i386)', 'i386/debian:buster', cmake_extra='-DDOWNLOAD_SODIUM=ON'),
debian_pipeline("Ubuntu focal (amd64)", docker_base+'ubuntu-focal'), debian_pipeline('Ubuntu focal (amd64)', docker_base + 'ubuntu-focal'),
debian_pipeline("Ubuntu bionic (amd64)", "ubuntu:bionic", deps='g++-8 ' + default_deps_nocxx, debian_pipeline('Ubuntu bionic (amd64)',
cmake_extra='-DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8', loki_repo=true), 'ubuntu:bionic',
deps='g++-8 ' + default_deps_nocxx,
cmake_extra='-DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8',
loki_repo=true),
// ARM builds (ARM64 and armhf) // ARM builds (ARM64 and armhf)
debian_pipeline("Debian sid (ARM64)", "debian:sid", arch="arm64", jobs=4), debian_pipeline('Debian sid (ARM64)', 'debian:sid', arch='arm64', jobs=4),
debian_pipeline("Debian buster (armhf)", "arm32v7/debian:buster", arch="arm64", cmake_extra='-DDOWNLOAD_SODIUM=ON', jobs=4), debian_pipeline('Debian buster (armhf)', 'arm32v7/debian:buster', arch='arm64', cmake_extra='-DDOWNLOAD_SODIUM=ON', jobs=4),
// Static armhf build (gets uploaded) // Static armhf build (gets uploaded)
debian_pipeline("Static (buster armhf)", "arm32v7/debian:buster", arch="arm64", deps='g++ python3-dev automake libtool', debian_pipeline('Static (buster armhf)',
cmake_extra='-DBUILD_STATIC_DEPS=ON -DBUILD_SHARED_LIBS=OFF -DSTATIC_LINK=ON ' + 'arm32v7/debian:buster',
'-DCMAKE_CXX_FLAGS="-march=armv7-a+fp" -DCMAKE_C_FLAGS="-march=armv7-a+fp" -DNATIVE_BUILD=OFF ' + arch='arm64',
'-DWITH_SYSTEMD=OFF', deps='g++ python3-dev automake libtool',
extra_cmds=[ cmake_extra='-DBUILD_STATIC_DEPS=ON -DBUILD_SHARED_LIBS=OFF -DSTATIC_LINK=ON ' +
'../contrib/ci/drone-check-static-libs.sh', '-DCMAKE_CXX_FLAGS="-march=armv7-a+fp" -DCMAKE_C_FLAGS="-march=armv7-a+fp" -DNATIVE_BUILD=OFF ' +
'UPLOAD_OS=linux-armhf ../contrib/ci/drone-static-upload.sh' '-DWITH_SYSTEMD=OFF',
], extra_cmds=[
jobs=4), '../contrib/ci/drone-check-static-libs.sh',
// android apk builder 'UPLOAD_OS=linux-armhf ../contrib/ci/drone-static-upload.sh',
apk_builder("android apk", "registry.oxen.rocks/lokinet-ci-android", extra_cmds=['UPLOAD_OS=android ./contrib/ci/drone-static-upload.sh']), ],
jobs=4),
// android apk builder
apk_builder('android apk', 'registry.oxen.rocks/lokinet-ci-android', extra_cmds=['UPLOAD_OS=android ./contrib/ci/drone-static-upload.sh']),
// Windows builds (x64) // Windows builds (x64)
windows_cross_pipeline("Windows (amd64)", docker_base+'debian-win32-cross', windows_cross_pipeline('Windows (amd64)',
toolchain='64', extra_cmds=[ docker_base + 'debian-win32-cross',
'./contrib/ci/drone-static-upload.sh' toolchain='64',
]), extra_cmds=[
'./contrib/ci/drone-static-upload.sh',
]),
// Static build (on bionic) which gets uploaded to builds.lokinet.dev: // Static build (on bionic) which gets uploaded to builds.lokinet.dev:
debian_pipeline("Static (bionic amd64)", docker_base+'ubuntu-bionic', deps='g++-8 python3-dev automake libtool', lto=true, tests=false, debian_pipeline('Static (bionic amd64)',
cmake_extra='-DBUILD_STATIC_DEPS=ON -DBUILD_SHARED_LIBS=OFF -DSTATIC_LINK=ON -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8 ' + docker_base + 'ubuntu-bionic',
'-DCMAKE_CXX_FLAGS="-march=x86-64 -mtune=haswell" -DCMAKE_C_FLAGS="-march=x86-64 -mtune=haswell" -DNATIVE_BUILD=OFF ' + deps='g++-8 python3-dev automake libtool',
'-DWITH_SYSTEMD=OFF', lto=true,
extra_cmds=[ tests=false,
'../contrib/ci/drone-check-static-libs.sh', cmake_extra='-DBUILD_STATIC_DEPS=ON -DBUILD_SHARED_LIBS=OFF -DSTATIC_LINK=ON -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8 ' +
'../contrib/ci/drone-static-upload.sh' '-DCMAKE_CXX_FLAGS="-march=x86-64 -mtune=haswell" -DCMAKE_C_FLAGS="-march=x86-64 -mtune=haswell" -DNATIVE_BUILD=OFF ' +
]), '-DWITH_SYSTEMD=OFF',
extra_cmds=[
'../contrib/ci/drone-check-static-libs.sh',
'../contrib/ci/drone-static-upload.sh',
]),
// integration tests // integration tests
debian_pipeline("Router Hive", "ubuntu:focal", deps='python3-dev python3-pytest python3-pybind11 ' + default_deps, debian_pipeline('Router Hive',
cmake_extra='-DWITH_HIVE=ON'), 'ubuntu:focal',
deps='python3-dev python3-pytest python3-pybind11 ' + default_deps,
cmake_extra='-DWITH_HIVE=ON'),
// Deb builds: // Deb builds:
deb_builder("debian:sid", "sid", "debian/sid"), deb_builder('debian:sid', 'sid', 'debian/sid'),
deb_builder("debian:buster", "buster", "debian/buster"), deb_builder('debian:buster', 'buster', 'debian/buster'),
deb_builder("ubuntu:focal", "focal", "ubuntu/focal"), deb_builder('ubuntu:focal', 'focal', 'ubuntu/focal'),
deb_builder("debian:sid", "sid", "debian/sid", arch='arm64'), deb_builder('debian:sid', 'sid', 'debian/sid', arch='arm64'),
// Macos builds: // Macos builds:
mac_builder('macOS (Release)'), mac_builder('macOS (Release)'),
mac_builder('macOS (Debug)', build_type='Debug'), mac_builder('macOS (Debug)', build_type='Debug'),
] ]

@ -36,7 +36,8 @@ namespace llarp
explicit NetID(const byte_t* val); explicit NetID(const byte_t* val);
NetID(const NetID& other) = default; NetID(const NetID& other) = default;
NetID& operator=(const NetID& other) = default; NetID&
operator=(const NetID& other) = default;
bool bool
operator==(const NetID& other) const; operator==(const NetID& other) const;

Loading…
Cancel
Save