mirror of https://github.com/oxen-io/lokinet
commit
dce6c1e3b6
@ -1,281 +1,342 @@
|
||||
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='g++ ' + default_deps_nocxx;
|
||||
local default_windows_deps='mingw-w64 zip nsis';
|
||||
local default_deps_base = [
|
||||
'libsystemd-dev',
|
||||
'python3-dev',
|
||||
'libuv1-dev',
|
||||
'libunbound-dev',
|
||||
'nettle-dev',
|
||||
'libssl-dev',
|
||||
'libevent-dev',
|
||||
'libsqlite3-dev',
|
||||
'libcurl4-openssl-dev',
|
||||
'libzmq3-dev',
|
||||
'make',
|
||||
];
|
||||
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_windows_deps = ['mingw-w64', 'zip', 'nsis'];
|
||||
local docker_base = 'registry.oxen.rocks/lokinet-ci-';
|
||||
|
||||
local submodules = {
|
||||
name: 'submodules',
|
||||
image: 'drone/git',
|
||||
commands: ['git fetch --tags', 'git submodule update --init --recursive --depth=1']
|
||||
name: 'submodules',
|
||||
image: 'drone/git',
|
||||
commands: ['git fetch --tags', 'git submodule update --init --recursive --depth=1'],
|
||||
};
|
||||
|
||||
local apt_get_quiet = 'apt-get -o=Dpkg::Use-Pty=0 -q';
|
||||
|
||||
// Regular build on a debian-like system:
|
||||
local debian_pipeline(name, image,
|
||||
arch='amd64',
|
||||
deps=default_deps,
|
||||
build_type='Release',
|
||||
lto=false,
|
||||
werror=true,
|
||||
cmake_extra='',
|
||||
extra_cmds=[],
|
||||
jobs=6,
|
||||
tests=true,
|
||||
loki_repo=false,
|
||||
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" } },
|
||||
commands: [
|
||||
'echo "Building on ${DRONE_STAGE_MACHINE}"',
|
||||
'echo "man-db man-db/auto-update boolean false" | debconf-set-selections',
|
||||
apt_get_quiet + ' update',
|
||||
apt_get_quiet + ' install -y eatmydata',
|
||||
] + (if loki_repo then [
|
||||
'eatmydata ' + apt_get_quiet + ' install -y lsb-release',
|
||||
'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',
|
||||
'eatmydata ' + apt_get_quiet + ' update'
|
||||
] else []
|
||||
local debian_pipeline(name,
|
||||
image,
|
||||
arch='amd64',
|
||||
deps=default_deps,
|
||||
build_type='Release',
|
||||
lto=false,
|
||||
werror=true,
|
||||
cmake_extra='',
|
||||
extra_cmds=[],
|
||||
jobs=6,
|
||||
tests=true,
|
||||
loki_repo=false,
|
||||
allow_fail=false) = {
|
||||
kind: 'pipeline',
|
||||
type: 'docker',
|
||||
name: name,
|
||||
platform: { arch: arch },
|
||||
trigger: { branch: { exclude: ['debian/*', 'ubuntu/*'] } },
|
||||
steps: [
|
||||
submodules,
|
||||
{
|
||||
name: 'build',
|
||||
image: image,
|
||||
pull: 'always',
|
||||
[if allow_fail then 'failure']: 'ignore',
|
||||
environment: { SSH_KEY: { from_secret: 'SSH_KEY' } },
|
||||
commands: [
|
||||
'echo "Building on ${DRONE_STAGE_MACHINE}"',
|
||||
'echo "man-db man-db/auto-update boolean false" | debconf-set-selections',
|
||||
apt_get_quiet + ' update',
|
||||
apt_get_quiet + ' install -y eatmydata',
|
||||
] + (
|
||||
if loki_repo then [
|
||||
'eatmydata ' + apt_get_quiet + ' install --no-install-recommends -y lsb-release',
|
||||
'cp contrib/deb.oxen.io.gpg /etc/apt/trusted.gpg.d',
|
||||
'echo deb http://deb.oxen.io $$(lsb_release -sc) main >/etc/apt/sources.list.d/oxen.list',
|
||||
'eatmydata ' + apt_get_quiet + ' update',
|
||||
] else []
|
||||
) + [
|
||||
'eatmydata ' + apt_get_quiet + ' dist-upgrade -y',
|
||||
'eatmydata ' + apt_get_quiet + ' install -y gdb cmake git pkg-config ccache ' + deps,
|
||||
'mkdir build',
|
||||
'cd build',
|
||||
'cmake .. -DWITH_SETCAP=OFF -DCMAKE_CXX_FLAGS=-fdiagnostics-color=always -DCMAKE_BUILD_TYPE='+build_type+' ' +
|
||||
(if werror then '-DWARNINGS_AS_ERRORS=ON ' else '') +
|
||||
'-DWITH_LTO=' + (if lto then 'ON ' else 'OFF ') +
|
||||
(if tests then '' else '-DWITH_TESTS=OFF ') +
|
||||
cmake_extra,
|
||||
'VERBOSE=1 make -j' + jobs,
|
||||
]
|
||||
+ (if tests then ['../contrib/ci/drone-gdb.sh ./test/testAll --use-colour yes'] else [])
|
||||
+ extra_cmds,
|
||||
}
|
||||
],
|
||||
'eatmydata ' + apt_get_quiet + ' dist-upgrade -y',
|
||||
'eatmydata ' + apt_get_quiet + ' install --no-install-recommends -y gdb cmake git pkg-config ccache ' + std.join(' ', deps),
|
||||
'mkdir build',
|
||||
'cd build',
|
||||
'cmake .. -DWITH_SETCAP=OFF -DCMAKE_CXX_FLAGS=-fdiagnostics-color=always -DCMAKE_BUILD_TYPE=' + build_type + ' ' +
|
||||
(if werror then '-DWARNINGS_AS_ERRORS=ON ' else '') +
|
||||
'-DWITH_LTO=' + (if lto then 'ON ' else 'OFF ') +
|
||||
(if tests then '' else '-DWITH_TESTS=OFF ') +
|
||||
cmake_extra,
|
||||
'VERBOSE=1 make -j' + jobs,
|
||||
]
|
||||
+ (if tests then ['../contrib/ci/drone-gdb.sh ./test/testAll --use-colour yes'] else [])
|
||||
+ extra_cmds,
|
||||
},
|
||||
],
|
||||
};
|
||||
local apk_builder(name, image, extra_cmds=[], allow_fail=false, jobs=6) = {
|
||||
kind: 'pipeline',
|
||||
type: 'docker',
|
||||
name: name,
|
||||
platform: {arch: "amd64"},
|
||||
trigger: { branch: { exclude: ['debian/*', 'ubuntu/*'] } },
|
||||
steps: [
|
||||
submodules,
|
||||
{
|
||||
name: 'build',
|
||||
image: image,
|
||||
[if allow_fail then "failure"]: "ignore",
|
||||
environment: { SSH_KEY: { from_secret: "SSH_KEY" }, ANDROID: "android" },
|
||||
commands: [
|
||||
'VERBOSE=1 JOBS='+jobs+' NDK=/usr/lib/android-ndk ./contrib/android.sh',
|
||||
'git clone https://github.com/oxen-io/lokinet-flutter-app lokinet-mobile',
|
||||
'cp -av lokinet-jni-*/* lokinet-mobile/lokinet_lib/android/src/main/jniLibs/',
|
||||
'cd lokinet-mobile',
|
||||
'flutter build apk --debug',
|
||||
'cd ..',
|
||||
'cp lokinet-mobile/build/app/outputs/apk/debug/app-debug.apk lokinet.apk'
|
||||
] + extra_cmds
|
||||
}
|
||||
]
|
||||
kind: 'pipeline',
|
||||
type: 'docker',
|
||||
name: name,
|
||||
platform: { arch: 'amd64' },
|
||||
trigger: { branch: { exclude: ['debian/*', 'ubuntu/*'] } },
|
||||
steps: [
|
||||
submodules,
|
||||
{
|
||||
name: 'build',
|
||||
image: image,
|
||||
pull: 'always',
|
||||
[if allow_fail then 'failure']: 'ignore',
|
||||
environment: { SSH_KEY: { from_secret: 'SSH_KEY' }, ANDROID: 'android' },
|
||||
commands: [
|
||||
'VERBOSE=1 JOBS=' + jobs + ' NDK=/usr/lib/android-ndk ./contrib/android.sh',
|
||||
'git clone https://github.com/oxen-io/lokinet-flutter-app lokinet-mobile',
|
||||
'cp -av lokinet-jni-*/* lokinet-mobile/lokinet_lib/android/src/main/jniLibs/',
|
||||
'cd lokinet-mobile',
|
||||
'flutter build apk --debug',
|
||||
'cd ..',
|
||||
'cp lokinet-mobile/build/app/outputs/apk/debug/app-debug.apk lokinet.apk',
|
||||
] + extra_cmds,
|
||||
},
|
||||
],
|
||||
};
|
||||
// windows cross compile on debian
|
||||
local windows_cross_pipeline(name, image,
|
||||
arch='amd64',
|
||||
build_type='Release',
|
||||
lto=false,
|
||||
werror=false,
|
||||
cmake_extra='',
|
||||
toolchain='32',
|
||||
extra_cmds=[],
|
||||
jobs=6,
|
||||
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: [
|
||||
'echo "Building on ${DRONE_STAGE_MACHINE}"',
|
||||
'echo "man-db man-db/auto-update boolean false" | debconf-set-selections',
|
||||
apt_get_quiet + ' update',
|
||||
apt_get_quiet + ' install -y eatmydata',
|
||||
'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-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix',
|
||||
'update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix',
|
||||
'VERBOSE=1 JOBS=' + jobs + ' ./contrib/windows.sh'
|
||||
] + extra_cmds,
|
||||
}
|
||||
],
|
||||
local windows_cross_pipeline(name,
|
||||
image,
|
||||
arch='amd64',
|
||||
build_type='Release',
|
||||
lto=false,
|
||||
werror=false,
|
||||
cmake_extra='',
|
||||
toolchain='32',
|
||||
extra_cmds=[],
|
||||
jobs=6,
|
||||
allow_fail=false) = {
|
||||
kind: 'pipeline',
|
||||
type: 'docker',
|
||||
name: name,
|
||||
platform: { arch: arch },
|
||||
trigger: { branch: { exclude: ['debian/*', 'ubuntu/*'] } },
|
||||
steps: [
|
||||
submodules,
|
||||
{
|
||||
name: 'build',
|
||||
image: image,
|
||||
pull: 'always',
|
||||
[if allow_fail then 'failure']: 'ignore',
|
||||
environment: { SSH_KEY: { from_secret: 'SSH_KEY' }, WINDOWS_BUILD_NAME: toolchain + 'bit' },
|
||||
commands: [
|
||||
'echo "Building on ${DRONE_STAGE_MACHINE}"',
|
||||
'echo "man-db man-db/auto-update boolean false" | debconf-set-selections',
|
||||
apt_get_quiet + ' update',
|
||||
apt_get_quiet + ' install -y eatmydata',
|
||||
'eatmydata ' + apt_get_quiet + ' install --no-install-recommends -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-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix',
|
||||
'update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix',
|
||||
'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
|
||||
local deb_builder(image, distro, distro_branch, arch='amd64', loki_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 "Building on ${DRONE_STAGE_MACHINE}"',
|
||||
'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
] + (if loki_repo then [
|
||||
'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'
|
||||
] else []) + [
|
||||
apt_get_quiet + ' update',
|
||||
apt_get_quiet + ' install -y eatmydata',
|
||||
'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.
|
||||
if ! git checkout $${distro_branch}; then
|
||||
git remote add --fetch upstream https://github.com/oxen-io/loki-network.git &&
|
||||
git checkout $${distro_branch}
|
||||
fi
|
||||
|||,
|
||||
# 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).
|
||||
'git config merge.ours.driver true',
|
||||
'echo .drone.jsonnet merge=ours >>.gitattributes',
|
||||
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,
|
||||
pull: 'always',
|
||||
failure: 'ignore',
|
||||
environment: { SSH_KEY: { from_secret: 'SSH_KEY' } },
|
||||
commands: [
|
||||
'echo "Building on ${DRONE_STAGE_MACHINE}"',
|
||||
'echo "man-db man-db/auto-update boolean false" | debconf-set-selections',
|
||||
] + (if loki_repo then [
|
||||
'cp contrib/deb.oxen.io.gpg /etc/apt/trusted.gpg.d',
|
||||
'echo deb http://deb.oxen.io $${distro} main >/etc/apt/sources.list.d/oxen.list',
|
||||
] else []) + [
|
||||
apt_get_quiet + ' update',
|
||||
apt_get_quiet + ' install -y eatmydata',
|
||||
'eatmydata ' + apt_get_quiet + ' install --no-install-recommends -y git devscripts equivs ccache git-buildpackage python3-dev',
|
||||
|||
|
||||
# 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/oxen-io/lokinet.git &&
|
||||
git checkout $${distro_branch}
|
||||
fi
|
||||
|||,
|
||||
// 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).
|
||||
'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_quiet + ' -o Debug::pkgProblemResolver=yes --no-install-recommends -y"',
|
||||
'export DEB_BUILD_OPTIONS="parallel=$$(nproc)"',
|
||||
#'grep -q lib debian/lokinet-bin.install || echo "/usr/lib/lib*.so*" >>debian/lokinet-bin.install',
|
||||
'debuild -e CCACHE_DIR -b',
|
||||
'./contrib/ci/drone-debs-upload.sh ' + distro,
|
||||
]
|
||||
}
|
||||
]
|
||||
'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_quiet + ' -o Debug::pkgProblemResolver=yes --no-install-recommends -y"',
|
||||
'export DEB_BUILD_OPTIONS="parallel=$$(nproc)"',
|
||||
//'grep -q lib debian/lokinet-bin.install || echo "/usr/lib/lib*.so*" >>debian/lokinet-bin.install',
|
||||
'debuild -e CCACHE_DIR -b',
|
||||
'./contrib/ci/drone-debs-upload.sh ' + distro,
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
local clang(version) = debian_pipeline(
|
||||
'Debian sid/clang-' + version + ' (amd64)',
|
||||
docker_base + 'debian-sid-clang',
|
||||
deps=['clang-' + version] + default_deps_nocxx,
|
||||
cmake_extra='-DCMAKE_C_COMPILER=clang-' + version + ' -DCMAKE_CXX_COMPILER=clang++-' + version + ' '
|
||||
);
|
||||
|
||||
local full_llvm(version) = debian_pipeline(
|
||||
'Debian sid/llvm-' + version + ' (amd64)',
|
||||
docker_base + 'debian-sid-clang',
|
||||
deps=['clang-' + version, ' lld-' + version, ' libc++-' + version + '-dev', 'libc++abi-' + version + '-dev']
|
||||
+ default_deps_nocxx,
|
||||
cmake_extra='-DCMAKE_C_COMPILER=clang-' + version +
|
||||
' -DCMAKE_CXX_COMPILER=clang++-' + version +
|
||||
' -DCMAKE_CXX_FLAGS=-stdlib=libc++ ' +
|
||||
std.join(' ', [
|
||||
'-DCMAKE_' + type + '_LINKER_FLAGS=-fuse-ld=lld-' + version
|
||||
for type in ['EXE', 'MODULE', 'SHARED']
|
||||
])
|
||||
);
|
||||
|
||||
// Macos build
|
||||
local mac_builder(name,
|
||||
build_type='Release',
|
||||
werror=true,
|
||||
cmake_extra='',
|
||||
extra_cmds=[],
|
||||
jobs=6,
|
||||
allow_fail=false) = {
|
||||
kind: 'pipeline',
|
||||
type: 'exec',
|
||||
name: name,
|
||||
platform: { os: 'darwin', arch: 'amd64' },
|
||||
steps: [
|
||||
{ name: 'submodules', commands: ['git fetch --tags', 'git submodule update --init --recursive'] },
|
||||
{
|
||||
name: 'build',
|
||||
environment: { SSH_KEY: { from_secret: "SSH_KEY" } },
|
||||
commands: [
|
||||
'echo "Building on ${DRONE_STAGE_MACHINE}"',
|
||||
// If you don't do this then the C compiler doesn't have an include path containing
|
||||
// basic system headers. WTF apple:
|
||||
'export SDKROOT="$(xcrun --sdk macosx --show-sdk-path)"',
|
||||
'ulimit -n 1024', // because macos sets ulimit to 256 for some reason yeah idk
|
||||
'./contrib/mac.sh'
|
||||
] + extra_cmds,
|
||||
}
|
||||
]
|
||||
build_type='Release',
|
||||
werror=true,
|
||||
cmake_extra='',
|
||||
extra_cmds=[],
|
||||
jobs=6,
|
||||
allow_fail=false) = {
|
||||
kind: 'pipeline',
|
||||
type: 'exec',
|
||||
name: name,
|
||||
platform: { os: 'darwin', arch: 'amd64' },
|
||||
steps: [
|
||||
{ name: 'submodules', commands: ['git fetch --tags', 'git submodule update --init --recursive'] },
|
||||
{
|
||||
name: 'build',
|
||||
environment: { SSH_KEY: { from_secret: 'SSH_KEY' } },
|
||||
commands: [
|
||||
'echo "Building on ${DRONE_STAGE_MACHINE}"',
|
||||
// If you don't do this then the C compiler doesn't have an include path containing
|
||||
// basic system headers. WTF apple:
|
||||
'export SDKROOT="$(xcrun --sdk macosx --show-sdk-path)"',
|
||||
'ulimit -n 1024', // because macos sets ulimit to 256 for some reason yeah idk
|
||||
'./contrib/mac.sh',
|
||||
] + extra_cmds,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
[
|
||||
{
|
||||
name: 'lint check',
|
||||
kind: 'pipeline',
|
||||
type: 'docker',
|
||||
steps: [{
|
||||
name: 'build', image: 'registry.oxen.rocks/lokinet-ci-lint',
|
||||
commands: [
|
||||
'echo "Building on ${DRONE_STAGE_MACHINE}"',
|
||||
apt_get_quiet + ' update',
|
||||
apt_get_quiet + ' install -y eatmydata',
|
||||
'eatmydata ' + apt_get_quiet + ' install -y git clang-format-11',
|
||||
'./contrib/ci/drone-format-verify.sh']
|
||||
}]
|
||||
},
|
||||
{
|
||||
name: 'lint check',
|
||||
kind: 'pipeline',
|
||||
type: 'docker',
|
||||
steps: [{
|
||||
name: 'build',
|
||||
image: docker_base + 'lint',
|
||||
pull: 'always',
|
||||
commands: [
|
||||
'echo "Building on ${DRONE_STAGE_MACHINE}"',
|
||||
apt_get_quiet + ' update',
|
||||
apt_get_quiet + ' install -y eatmydata',
|
||||
'eatmydata ' + apt_get_quiet + ' install --no-install-recommends -y git clang-format-11 jsonnet',
|
||||
'./contrib/ci/drone-format-verify.sh',
|
||||
],
|
||||
}],
|
||||
},
|
||||
|
||||
// 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-11 (amd64)", docker_base+'debian-sid', deps='clang-11 '+default_deps_nocxx,
|
||||
cmake_extra='-DCMAKE_C_COMPILER=clang-11 -DCMAKE_CXX_COMPILER=clang++-11 '),
|
||||
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 bionic (amd64)", "ubuntu:bionic", deps='g++-8 ' + default_deps_nocxx,
|
||||
cmake_extra='-DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8', loki_repo=true),
|
||||
// Various debian builds
|
||||
debian_pipeline('Debian sid (amd64)', docker_base + 'debian-sid'),
|
||||
debian_pipeline('Debian sid/Debug (amd64)', docker_base + 'debian-sid', build_type='Debug'),
|
||||
clang(13),
|
||||
full_llvm(13),
|
||||
debian_pipeline('Debian stable (i386)', docker_base + 'debian-stable/i386'),
|
||||
debian_pipeline('Debian buster (amd64)', docker_base + 'debian-buster', cmake_extra='-DDOWNLOAD_SODIUM=ON'),
|
||||
debian_pipeline('Ubuntu latest (amd64)', docker_base + 'ubuntu-rolling'),
|
||||
debian_pipeline('Ubuntu LTS (amd64)', docker_base + 'ubuntu-lts'),
|
||||
debian_pipeline('Ubuntu bionic (amd64)',
|
||||
docker_base + '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)
|
||||
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),
|
||||
// Static armhf build (gets uploaded)
|
||||
debian_pipeline("Static (buster armhf)", "arm32v7/debian:buster", arch="arm64", deps='g++ python3-dev automake libtool',
|
||||
cmake_extra='-DBUILD_STATIC_DEPS=ON -DBUILD_SHARED_LIBS=OFF -DSTATIC_LINK=ON ' +
|
||||
'-DCMAKE_CXX_FLAGS="-march=armv7-a+fp" -DCMAKE_C_FLAGS="-march=armv7-a+fp" -DNATIVE_BUILD=OFF ' +
|
||||
'-DWITH_SYSTEMD=OFF',
|
||||
extra_cmds=[
|
||||
'../contrib/ci/drone-check-static-libs.sh',
|
||||
'UPLOAD_OS=linux-armhf ../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']),
|
||||
// ARM builds (ARM64 and armhf)
|
||||
debian_pipeline('Debian sid (ARM64)', docker_base + 'debian-sid', arch='arm64', jobs=4),
|
||||
debian_pipeline('Debian stable (armhf)', docker_base + 'debian-stable/arm32v7', arch='arm64', jobs=4),
|
||||
// android apk builder
|
||||
apk_builder('android apk', docker_base + 'flutter', extra_cmds=['UPLOAD_OS=android ./contrib/ci/drone-static-upload.sh']),
|
||||
|
||||
// Windows builds (x64)
|
||||
windows_cross_pipeline("Windows (amd64)", docker_base+'debian-win32-cross',
|
||||
toolchain='64', extra_cmds=[
|
||||
'./contrib/ci/drone-static-upload.sh'
|
||||
]),
|
||||
// Windows builds (x64)
|
||||
windows_cross_pipeline('Windows (amd64)',
|
||||
docker_base + 'debian-win32-cross',
|
||||
toolchain='64',
|
||||
extra_cmds=[
|
||||
'./contrib/ci/drone-static-upload.sh',
|
||||
]),
|
||||
|
||||
// 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,
|
||||
cmake_extra='-DBUILD_STATIC_DEPS=ON -DBUILD_SHARED_LIBS=OFF -DSTATIC_LINK=ON -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8 ' +
|
||||
'-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'
|
||||
]),
|
||||
// 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,
|
||||
cmake_extra='-DBUILD_STATIC_DEPS=ON -DBUILD_SHARED_LIBS=OFF -DSTATIC_LINK=ON ' +
|
||||
'-DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8 ' +
|
||||
'-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',
|
||||
]),
|
||||
// Static armhf build (gets uploaded)
|
||||
debian_pipeline('Static (buster armhf)',
|
||||
docker_base + 'debian-buster/arm32v7',
|
||||
arch='arm64',
|
||||
deps=['g++', 'python3-dev', 'automake', 'libtool'],
|
||||
cmake_extra='-DBUILD_STATIC_DEPS=ON -DBUILD_SHARED_LIBS=OFF -DSTATIC_LINK=ON ' +
|
||||
'-DCMAKE_CXX_FLAGS="-march=armv7-a+fp -Wno-psabi" -DCMAKE_C_FLAGS="-march=armv7-a+fp" ' +
|
||||
'-DNATIVE_BUILD=OFF -DWITH_SYSTEMD=OFF',
|
||||
extra_cmds=[
|
||||
'../contrib/ci/drone-check-static-libs.sh',
|
||||
'UPLOAD_OS=linux-armhf ../contrib/ci/drone-static-upload.sh',
|
||||
],
|
||||
jobs=4),
|
||||
|
||||
// integration tests
|
||||
debian_pipeline("Router Hive", "ubuntu:focal", deps='python3-dev python3-pytest python3-pybind11 ' + default_deps,
|
||||
cmake_extra='-DWITH_HIVE=ON'),
|
||||
// integration tests
|
||||
debian_pipeline('Router Hive',
|
||||
docker_base + 'ubuntu-lts',
|
||||
deps=['python3-dev', 'python3-pytest', 'python3-pybind11'] + default_deps,
|
||||
cmake_extra='-DWITH_HIVE=ON'),
|
||||
|
||||
// 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'),
|
||||
// Deb builds:
|
||||
deb_builder(docker_base + 'debian-sid-debhelper', 'sid', 'debian/sid'),
|
||||
deb_builder(docker_base + 'debian-bullseye-debhelper', 'bullseye', 'debian/bullseye'),
|
||||
deb_builder(docker_base + 'ubuntu-impish-debhelper', 'impish', 'ubuntu/impish'),
|
||||
deb_builder(docker_base + 'ubuntu-focal-debhelper', 'focal', 'ubuntu/focal'),
|
||||
deb_builder(docker_base + 'debian-sid-debhelper', 'sid', 'debian/sid', arch='arm64'),
|
||||
|
||||
// Macos builds:
|
||||
mac_builder('macOS (Release)'),
|
||||
mac_builder('macOS (Debug)', build_type='Debug'),
|
||||
// Macos builds:
|
||||
mac_builder('macOS (Release)'),
|
||||
mac_builder('macOS (Debug)', build_type='Debug'),
|
||||
]
|
||||
|
@ -1,49 +1,49 @@
|
||||
function(check_working_cxx_atomics64 varname)
|
||||
set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
||||
if (EMBEDDED_CFG)
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -m32 -march=i486")
|
||||
elseif(MSVC OR MSVC_VERSION)
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -arch:IA32 -std:c++14")
|
||||
else()
|
||||
# CMAKE_CXX_STANDARD does not propagate to cmake compile tests
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=c++14")
|
||||
endif()
|
||||
check_cxx_source_compiles("
|
||||
#include <atomic>
|
||||
#include <cstdint>
|
||||
std::atomic<uint64_t> x (0);
|
||||
int main() {
|
||||
uint64_t i = x.load(std::memory_order_relaxed);
|
||||
return 0;
|
||||
}
|
||||
" ${varname})
|
||||
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
|
||||
endfunction()
|
||||
|
||||
function(link_libatomic)
|
||||
check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITHOUT_LIB)
|
||||
|
||||
if(HAVE_CXX_ATOMICS64_WITHOUT_LIB)
|
||||
message(STATUS "Have working 64bit atomics")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (NOT MSVC AND NOT MSVC_VERSION)
|
||||
check_library_exists(atomic __atomic_load_8 "" HAVE_CXX_LIBATOMICS64)
|
||||
if (HAVE_CXX_LIBATOMICS64)
|
||||
message(STATUS "Have 64bit atomics via library")
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
|
||||
check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITH_LIB)
|
||||
if (HAVE_CXX_ATOMICS64_WITH_LIB)
|
||||
message(STATUS "Can link with libatomic")
|
||||
link_libraries(-latomic)
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if (MSVC OR MSVC_VERSION)
|
||||
message(FATAL_ERROR "Host compiler must support 64-bit std::atomic! (What does MSVC do to inline atomics?)")
|
||||
else()
|
||||
message(FATAL_ERROR "Host compiler must support 64-bit std::atomic!")
|
||||
endif()
|
||||
endfunction()
|
||||
function(check_working_cxx_atomics64 varname)
|
||||
set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
||||
if (EMBEDDED_CFG)
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -m32 -march=i486")
|
||||
elseif(MSVC OR MSVC_VERSION)
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -arch:IA32 -std:c++14")
|
||||
else()
|
||||
# CMAKE_CXX_STANDARD does not propagate to cmake compile tests
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=c++14")
|
||||
endif()
|
||||
check_cxx_source_compiles("
|
||||
#include <atomic>
|
||||
#include <cstdint>
|
||||
std::atomic<uint64_t> x (0);
|
||||
int main() {
|
||||
uint64_t i = x.load(std::memory_order_relaxed);
|
||||
return 0;
|
||||
}
|
||||
" ${varname})
|
||||
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
|
||||
endfunction()
|
||||
|
||||
function(link_libatomic)
|
||||
check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITHOUT_LIB)
|
||||
|
||||
if(HAVE_CXX_ATOMICS64_WITHOUT_LIB)
|
||||
message(STATUS "Have working 64bit atomics")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (NOT MSVC AND NOT MSVC_VERSION)
|
||||
check_library_exists(atomic __atomic_load_8 "" HAVE_CXX_LIBATOMICS64)
|
||||
if (HAVE_CXX_LIBATOMICS64)
|
||||
message(STATUS "Have 64bit atomics via library")
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
|
||||
check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITH_LIB)
|
||||
if (HAVE_CXX_ATOMICS64_WITH_LIB)
|
||||
message(STATUS "Can link with libatomic")
|
||||
link_libraries(-latomic)
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if (MSVC OR MSVC_VERSION)
|
||||
message(FATAL_ERROR "Host compiler must support 64-bit std::atomic! (What does MSVC do to inline atomics?)")
|
||||
else()
|
||||
message(FATAL_ERROR "Host compiler must support 64-bit std::atomic!")
|
||||
endif()
|
||||
endfunction()
|
||||
|
@ -0,0 +1,6 @@
|
||||
ARG ARCH=amd64
|
||||
FROM ${ARCH}/debian:bullseye
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN apt-get -o=Dpkg::Use-Pty=0 -q update \
|
||||
&& apt-get -o=Dpkg::Use-Pty=0 -q dist-upgrade -y \
|
||||
&& apt-get -o=Dpkg::Use-Pty=0 -q autoremove -y
|
@ -0,0 +1,6 @@
|
||||
ARG ARCH=amd64
|
||||
FROM ${ARCH}/debian:buster
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN apt-get -o=Dpkg::Use-Pty=0 -q update \
|
||||
&& apt-get -o=Dpkg::Use-Pty=0 -q dist-upgrade -y \
|
||||
&& apt-get -o=Dpkg::Use-Pty=0 -q autoremove -y
|
@ -0,0 +1,6 @@
|
||||
ARG ARCH=amd64
|
||||
FROM ${ARCH}/debian:sid
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN apt-get -o=Dpkg::Use-Pty=0 -q update \
|
||||
&& apt-get -o=Dpkg::Use-Pty=0 -q dist-upgrade -y \
|
||||
&& apt-get -o=Dpkg::Use-Pty=0 -q autoremove -y
|
@ -0,0 +1,6 @@
|
||||
ARG ARCH=amd64
|
||||
FROM ${ARCH}/debian:stable
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN apt-get -o=Dpkg::Use-Pty=0 -q update \
|
||||
&& apt-get -o=Dpkg::Use-Pty=0 -q dist-upgrade -y \
|
||||
&& apt-get -o=Dpkg::Use-Pty=0 -q autoremove -y
|
@ -0,0 +1,6 @@
|
||||
ARG ARCH=amd64
|
||||
FROM ${ARCH}/debian:testing
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN apt-get -o=Dpkg::Use-Pty=0 -q update \
|
||||
&& apt-get -o=Dpkg::Use-Pty=0 -q dist-upgrade -y \
|
||||
&& apt-get -o=Dpkg::Use-Pty=0 -q autoremove -y
|
@ -0,0 +1,39 @@
|
||||
ARG ARCH=amd64
|
||||
FROM registry.oxen.rocks/lokinet-ci-debian-bullseye-base/${ARCH}
|
||||
RUN apt-get -o=Dpkg::Use-Pty=0 -q install --no-install-recommends -y \
|
||||
automake \
|
||||
ccache \
|
||||
cmake \
|
||||
eatmydata \
|
||||
g++ \
|
||||
gdb \
|
||||
git \
|
||||
libboost-program-options-dev \
|
||||
libboost-serialization-dev \
|
||||
libboost-thread-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libevent-dev \
|
||||
libgtest-dev \
|
||||
libhidapi-dev \
|
||||
libjemalloc-dev \
|
||||
libminiupnpc-dev \
|
||||
libreadline-dev \
|
||||
libsodium-dev \
|
||||
libsqlite3-dev \
|
||||
libssl-dev \
|
||||
libsystemd-dev \
|
||||
libtool \
|
||||
libunbound-dev \
|
||||
libunwind8-dev \
|
||||
libusb-1.0.0-dev \
|
||||
libuv1-dev \
|
||||
libzmq3-dev \
|
||||
lsb-release \
|
||||
make \
|
||||
nettle-dev \
|
||||
ninja-build \
|
||||
openssh-client \
|
||||
patch \
|
||||
pkg-config \
|
||||
python3-dev \
|
||||
qttools5-dev
|
@ -0,0 +1,40 @@
|
||||
ARG ARCH=amd64
|
||||
FROM registry.oxen.rocks/lokinet-ci-debian-buster-base/${ARCH}
|
||||
RUN apt-get -o=Dpkg::Use-Pty=0 -q install --no-install-recommends -y \
|
||||
automake \
|
||||
ccache \
|
||||
cmake \
|
||||
eatmydata \
|
||||
g++ \
|
||||
gdb \
|
||||
git \
|
||||
libboost-program-options-dev \
|
||||
libboost-serialization-dev \
|
||||
libboost-thread-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libevent-dev \
|
||||
libgtest-dev \
|
||||
libhidapi-dev \
|
||||
libjemalloc-dev \
|
||||
libminiupnpc-dev \
|
||||
libreadline-dev \
|
||||
libsodium-dev \
|
||||
libsqlite3-dev \
|
||||
libssl-dev \
|
||||
libsystemd-dev \
|
||||
libtool \
|
||||
libunbound-dev \
|
||||
libunwind8-dev \
|
||||
libusb-1.0.0-dev \
|
||||
libuv1-dev \
|
||||
libzmq3-dev \
|
||||
lsb-release \
|
||||
make \
|
||||
nettle-dev \
|
||||
ninja-build \
|
||||
openssh-client \
|
||||
patch \
|
||||
pkg-config \
|
||||
python3-dev \
|
||||
qttools5-dev \
|
||||
xz-utils
|
@ -0,0 +1,39 @@
|
||||
ARG ARCH=amd64
|
||||
FROM registry.oxen.rocks/lokinet-ci-debian-sid-base/${ARCH}
|
||||
RUN apt-get -o=Dpkg::Use-Pty=0 --no-install-recommends -q install -y \
|
||||
automake \
|
||||
ccache \
|
||||
cmake \
|
||||
eatmydata \
|
||||
g++ \
|
||||
gdb \
|
||||
git \
|
||||
libboost-program-options-dev \
|
||||
libboost-serialization-dev \
|
||||
libboost-thread-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libevent-dev \
|
||||
libgtest-dev \
|
||||
libhidapi-dev \
|
||||
libjemalloc-dev \
|
||||
libminiupnpc-dev \
|
||||
libreadline-dev \
|
||||
libsodium-dev \
|
||||
libsqlite3-dev \
|
||||
libssl-dev \
|
||||
libsystemd-dev \
|
||||
libtool \
|
||||
libunbound-dev \
|
||||
libunwind8-dev \
|
||||
libusb-1.0.0-dev \
|
||||
libuv1-dev \
|
||||
libzmq3-dev \
|
||||
lsb-release \
|
||||
make \
|
||||
nettle-dev \
|
||||
ninja-build \
|
||||
openssh-client \
|
||||
patch \
|
||||
pkg-config \
|
||||
python3-dev \
|
||||
qttools5-dev
|
@ -0,0 +1,39 @@
|
||||
ARG ARCH=amd64
|
||||
FROM registry.oxen.rocks/lokinet-ci-debian-stable-base/${ARCH}
|
||||
RUN apt-get -o=Dpkg::Use-Pty=0 -q install --no-install-recommends -y \
|
||||
automake \
|
||||
ccache \
|
||||
cmake \
|
||||
eatmydata \
|
||||
g++ \
|
||||
gdb \
|
||||
git \
|
||||
libboost-program-options-dev \
|
||||
libboost-serialization-dev \
|
||||
libboost-thread-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libevent-dev \
|
||||
libgtest-dev \
|
||||
libhidapi-dev \
|
||||
libjemalloc-dev \
|
||||
libminiupnpc-dev \
|
||||
libreadline-dev \
|
||||
libsodium-dev \
|
||||
libsqlite3-dev \
|
||||
libssl-dev \
|
||||
libsystemd-dev \
|
||||
libtool \
|
||||
libunbound-dev \
|
||||
libunwind8-dev \
|
||||
libusb-1.0.0-dev \
|
||||
libuv1-dev \
|
||||
libzmq3-dev \
|
||||
lsb-release \
|
||||
make \
|
||||
nettle-dev \
|
||||
ninja-build \
|
||||
openssh-client \
|
||||
patch \
|
||||
pkg-config \
|
||||
python3-dev \
|
||||
qttools5-dev
|
@ -0,0 +1,31 @@
|
||||
ARG ARCH=amd64
|
||||
FROM ${ARCH}/ubuntu:bionic
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN apt-get -o=Dpkg::Use-Pty=0 -q update \
|
||||
&& apt-get -o=Dpkg::Use-Pty=0 -q dist-upgrade -y \
|
||||
&& apt-get -o=Dpkg::Use-Pty=0 -q --no-install-recommends install -y \
|
||||
autoconf \
|
||||
automake \
|
||||
ccache \
|
||||
cmake \
|
||||
eatmydata \
|
||||
file \
|
||||
g++-8 \
|
||||
gdb \
|
||||
git \
|
||||
gperf \
|
||||
libjemalloc-dev \
|
||||
libpgm-dev \
|
||||
libtool \
|
||||
libuv1-dev \
|
||||
libzmq3-dev \
|
||||
lsb-release \
|
||||
make \
|
||||
ninja-build \
|
||||
openssh-client \
|
||||
openssh-client \
|
||||
patch \
|
||||
pkg-config \
|
||||
python3-dev \
|
||||
qttools5-dev \
|
||||
&& mkdir -p /usr/lib/x86_64-linux-gnu/pgm-5.2/include
|
@ -0,0 +1,42 @@
|
||||
ARG ARCH=amd64
|
||||
FROM ${ARCH}/ubuntu:focal
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN apt-get -o=Dpkg::Use-Pty=0 -q update \
|
||||
&& apt-get -o=Dpkg::Use-Pty=0 -q dist-upgrade -y \
|
||||
&& apt-get -o=Dpkg::Use-Pty=0 --no-install-recommends -q install -y \
|
||||
automake \
|
||||
ccache \
|
||||
cmake \
|
||||
eatmydata \
|
||||
g++ \
|
||||
gdb \
|
||||
git \
|
||||
libboost-program-options-dev \
|
||||
libboost-serialization-dev \
|
||||
libboost-thread-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libevent-dev \
|
||||
libgtest-dev \
|
||||
libhidapi-dev \
|
||||
libjemalloc-dev \
|
||||
libminiupnpc-dev \
|
||||
libreadline-dev \
|
||||
libsodium-dev \
|
||||
libsqlite3-dev \
|
||||
libssl-dev \
|
||||
libsystemd-dev \
|
||||
libtool \
|
||||
libunbound-dev \
|
||||
libunwind8-dev \
|
||||
libusb-1.0.0-dev \
|
||||
libuv1-dev \
|
||||
libzmq3-dev \
|
||||
lsb-release \
|
||||
make \
|
||||
nettle-dev \
|
||||
ninja-build \
|
||||
openssh-client \
|
||||
patch \
|
||||
pkg-config \
|
||||
python3-dev \
|
||||
qttools5-dev
|
@ -0,0 +1,42 @@
|
||||
ARG ARCH=amd64
|
||||
FROM ${ARCH}/ubuntu:impish
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN apt-get -o=Dpkg::Use-Pty=0 -q update \
|
||||
&& apt-get -o=Dpkg::Use-Pty=0 -q dist-upgrade -y \
|
||||
&& apt-get -o=Dpkg::Use-Pty=0 --no-install-recommends -q install -y \
|
||||
automake \
|
||||
ccache \
|
||||
cmake \
|
||||
eatmydata \
|
||||
g++ \
|
||||
gdb \
|
||||
git \
|
||||
libboost-program-options-dev \
|
||||
libboost-serialization-dev \
|
||||
libboost-thread-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libevent-dev \
|
||||
libgtest-dev \
|
||||
libhidapi-dev \
|
||||
libjemalloc-dev \
|
||||
libminiupnpc-dev \
|
||||
libreadline-dev \
|
||||
libsodium-dev \
|
||||
libsqlite3-dev \
|
||||
libssl-dev \
|
||||
libsystemd-dev \
|
||||
libtool \
|
||||
libunbound-dev \
|
||||
libunwind8-dev \
|
||||
libusb-1.0.0-dev \
|
||||
libuv1-dev \
|
||||
libzmq3-dev \
|
||||
lsb-release \
|
||||
make \
|
||||
nettle-dev \
|
||||
ninja-build \
|
||||
openssh-client \
|
||||
patch \
|
||||
pkg-config \
|
||||
python3-dev \
|
||||
qttools5-dev
|
@ -0,0 +1,42 @@
|
||||
ARG ARCH=amd64
|
||||
FROM ${ARCH}/ubuntu:latest
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN apt-get -o=Dpkg::Use-Pty=0 -q update \
|
||||
&& apt-get -o=Dpkg::Use-Pty=0 -q dist-upgrade -y \
|
||||
&& apt-get -o=Dpkg::Use-Pty=0 --no-install-recommends -q install -y \
|
||||
automake \
|
||||
ccache \
|
||||
cmake \
|
||||
eatmydata \
|
||||
g++ \
|
||||
gdb \
|
||||
git \
|
||||
libboost-program-options-dev \
|
||||
libboost-serialization-dev \
|
||||
libboost-thread-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libevent-dev \
|
||||
libgtest-dev \
|
||||
libhidapi-dev \
|
||||
libjemalloc-dev \
|
||||
libminiupnpc-dev \
|
||||
libreadline-dev \
|
||||
libsodium-dev \
|
||||
libsqlite3-dev \
|
||||
libssl-dev \
|
||||
libsystemd-dev \
|
||||
libtool \
|
||||
libunbound-dev \
|
||||
libunwind8-dev \
|
||||
libusb-1.0.0-dev \
|
||||
libuv1-dev \
|
||||
libzmq3-dev \
|
||||
lsb-release \
|
||||
make \
|
||||
nettle-dev \
|
||||
ninja-build \
|
||||
openssh-client \
|
||||
patch \
|
||||
pkg-config \
|
||||
python3-dev \
|
||||
qttools5-dev
|
@ -0,0 +1,42 @@
|
||||
ARG ARCH=amd64
|
||||
FROM ${ARCH}/ubuntu:rolling
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN apt-get -o=Dpkg::Use-Pty=0 -q update \
|
||||
&& apt-get -o=Dpkg::Use-Pty=0 -q dist-upgrade -y \
|
||||
&& apt-get -o=Dpkg::Use-Pty=0 --no-install-recommends -q install -y \
|
||||
automake \
|
||||
ccache \
|
||||
cmake \
|
||||
eatmydata \
|
||||
g++ \
|
||||
gdb \
|
||||
git \
|
||||
libboost-program-options-dev \
|
||||
libboost-serialization-dev \
|
||||
libboost-thread-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libevent-dev \
|
||||
libgtest-dev \
|
||||
libhidapi-dev \
|
||||
libjemalloc-dev \
|
||||
libminiupnpc-dev \
|
||||
libreadline-dev \
|
||||
libsodium-dev \
|
||||
libsqlite3-dev \
|
||||
libssl-dev \
|
||||
libsystemd-dev \
|
||||
libtool \
|
||||
libunbound-dev \
|
||||
libunwind8-dev \
|
||||
libusb-1.0.0-dev \
|
||||
libuv1-dev \
|
||||
libzmq3-dev \
|
||||
lsb-release \
|
||||
make \
|
||||
nettle-dev \
|
||||
ninja-build \
|
||||
openssh-client \
|
||||
patch \
|
||||
pkg-config \
|
||||
python3-dev \
|
||||
qttools5-dev
|
@ -0,0 +1,10 @@
|
||||
ARG ARCH=amd64
|
||||
FROM registry.oxen.rocks/lokinet-ci-debian-bullseye/${ARCH}
|
||||
RUN apt-get -o=Dpkg::Use-Pty=0 --no-install-recommends -q install -y \
|
||||
ccache \
|
||||
debhelper \
|
||||
devscripts \
|
||||
equivs \
|
||||
git \
|
||||
git-buildpackage \
|
||||
python3-dev
|
@ -0,0 +1,10 @@
|
||||
ARG ARCH=amd64
|
||||
FROM registry.oxen.rocks/lokinet-ci-debian-sid/${ARCH}
|
||||
RUN apt-get -o=Dpkg::Use-Pty=0 --no-install-recommends -q install -y \
|
||||
ccache \
|
||||
debhelper \
|
||||
devscripts \
|
||||
equivs \
|
||||
git \
|
||||
git-buildpackage \
|
||||
python3-dev
|
@ -0,0 +1,10 @@
|
||||
ARG ARCH=amd64
|
||||
FROM registry.oxen.rocks/lokinet-ci-ubuntu-focal/${ARCH}
|
||||
RUN apt-get -o=Dpkg::Use-Pty=0 --no-install-recommends -q install -y \
|
||||
ccache \
|
||||
debhelper \
|
||||
devscripts \
|
||||
equivs \
|
||||
git \
|
||||
git-buildpackage \
|
||||
python3-dev
|
@ -0,0 +1,10 @@
|
||||
ARG ARCH=amd64
|
||||
FROM registry.oxen.rocks/lokinet-ci-ubuntu-impish/${ARCH}
|
||||
RUN apt-get -o=Dpkg::Use-Pty=0 --no-install-recommends -q install -y \
|
||||
ccache \
|
||||
debhelper \
|
||||
devscripts \
|
||||
equivs \
|
||||
git \
|
||||
git-buildpackage \
|
||||
python3-dev
|
@ -0,0 +1,23 @@
|
||||
ARG ARCH=amd64
|
||||
FROM registry.oxen.rocks/lokinet-ci-debian-testing-base/${ARCH}
|
||||
RUN /bin/bash -c 'sed -i "s/main/main contrib/g" /etc/apt/sources.list'
|
||||
RUN apt-get -o=Dpkg::Use-Pty=0 -q update \
|
||||
&& apt-get -o=Dpkg::Use-Pty=0 -q install --no-install-recommends -y \
|
||||
android-sdk \
|
||||
automake \
|
||||
ccache \
|
||||
cmake \
|
||||
curl \
|
||||
git \
|
||||
google-android-ndk-installer \
|
||||
libtool \
|
||||
make \
|
||||
openssh-client \
|
||||
patch \
|
||||
pkg-config \
|
||||
wget \
|
||||
xz-utils \
|
||||
zip \
|
||||
&& git clone https://github.com/Shadowstyler/android-sdk-licenses.git /tmp/android-sdk-licenses \
|
||||
&& cp -a /tmp/android-sdk-licenses/*-license /usr/lib/android-sdk/licenses \
|
||||
&& rm -rf /tmp/android-sdk-licenses
|
@ -1,7 +0,0 @@
|
||||
FROM debian:testing
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN /bin/bash -c 'sed -i "s/main/main contrib/g" /etc/apt/sources.list'
|
||||
RUN /bin/bash -c 'apt-get -o=Dpkg::Use-Pty=0 -q update && apt-get -o=Dpkg::Use-Pty=0 -q dist-upgrade -y && apt-get -o=Dpkg::Use-Pty=0 -q install -y android-sdk google-android-ndk-installer wget git pkg-config automake libtool cmake ccache curl zip'
|
||||
RUN /bin/bash -c 'git clone https://github.com/Shadowstyler/android-sdk-licenses.git /tmp/android-sdk-licenses && cp -a /tmp/android-sdk-licenses/*-license /usr/lib/android-sdk/licenses && rm -rf /tmp/android-sdk-licenses'
|
||||
RUN /bin/bash -c 'wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_2.2.2-stable.tar.xz -O /tmp/flutter.tar.xz && cd /opt && tar -xJvf /tmp/flutter.tar.xz && rm /tmp/flutter.tar.xz && ln -s /opt/flutter/bin/flutter /usr/local/bin/'
|
||||
RUN /bin/bash -c 'flutter precache'
|
@ -0,0 +1 @@
|
||||
../00-debian-buster-base.dockerfile
|
@ -0,0 +1 @@
|
||||
../00-debian-stable-base.dockerfile
|
@ -0,0 +1 @@
|
||||
../10-debian-buster.dockerfile
|
@ -0,0 +1 @@
|
||||
../10-debian-stable.dockerfile
|
@ -0,0 +1 @@
|
||||
../00-debian-sid-base.dockerfile
|
@ -0,0 +1 @@
|
||||
../10-debian-sid.dockerfile
|
@ -0,0 +1 @@
|
||||
../40-debian-sid-debhelper.dockerfile
|
@ -0,0 +1,7 @@
|
||||
ARG ARCH=amd64
|
||||
FROM registry.oxen.rocks/lokinet-ci-debian-sid/${ARCH}
|
||||
RUN apt-get -o=Dpkg::Use-Pty=0 -q install --no-install-recommends -y \
|
||||
clang-13 \
|
||||
libc++-13-dev \
|
||||
libc++abi-13-dev \
|
||||
lld-13
|
@ -1,3 +0,0 @@
|
||||
FROM debian:sid
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN /bin/bash -c 'apt-get -o=Dpkg::Use-Pty=0 -q update && apt-get -o=Dpkg::Use-Pty=0 -q dist-upgrade -y && apt-get -o=Dpkg::Use-Pty=0 -q install -y eatmydata gdb cmake git ninja-build pkg-config ccache clang-11 libsodium-dev libsystemd-dev python3-dev libuv1-dev libunbound-dev nettle-dev libssl-dev libevent-dev libsqlite3-dev libboost-thread-dev libboost-serialization-dev libboost-program-options-dev libgtest-dev libminiupnpc-dev libunwind8-dev libreadline-dev libhidapi-dev libusb-1.0.0-dev qttools5-dev libcurl4-openssl-dev'
|
@ -1,3 +0,0 @@
|
||||
FROM debian:stable
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN /bin/bash -c 'apt-get -o=Dpkg::Use-Pty=0 -q update && apt-get -o=Dpkg::Use-Pty=0 -q dist-upgrade -y && apt-get -o=Dpkg::Use-Pty=0 -q install -y eatmydata gdb cmake git ninja-build pkg-config ccache g++ libsodium-dev libsystemd-dev python3-dev libuv1-dev libunbound-dev nettle-dev libssl-dev libevent-dev libsqlite3-dev libboost-thread-dev libboost-serialization-dev libboost-program-options-dev libgtest-dev libminiupnpc-dev libunwind8-dev libreadline-dev libhidapi-dev libusb-1.0.0-dev qttools5-dev libcurl4-openssl-dev'
|
@ -1,4 +1,24 @@
|
||||
FROM debian:testing
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN /bin/bash -c 'apt-get -o=Dpkg::Use-Pty=0 -q update && apt-get -o=Dpkg::Use-Pty=0 -q dist-upgrade -y && apt-get -o=Dpkg::Use-Pty=0 -q install -y eatmydata build-essential cmake git ninja-build pkg-config ccache g++-mingw-w64-x86-64-posix nsis zip automake libtool autoconf make qttools5-dev file gperf patch openssh-client'
|
||||
RUN /bin/bash -c 'update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix && update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix'
|
||||
ARG ARCH=amd64
|
||||
FROM registry.oxen.rocks/lokinet-ci-debian-testing-base/${ARCH}
|
||||
RUN apt-get -o=Dpkg::Use-Pty=0 -q install --no-install-recommends -y \
|
||||
autoconf \
|
||||
automake \
|
||||
build-essential \
|
||||
ccache \
|
||||
cmake \
|
||||
eatmydata \
|
||||
file \
|
||||
g++-mingw-w64-x86-64-posix \
|
||||
git \
|
||||
gperf \
|
||||
libtool \
|
||||
make \
|
||||
ninja-build \
|
||||
nsis \
|
||||
openssh-client \
|
||||
patch \
|
||||
pkg-config \
|
||||
qttools5-dev \
|
||||
zip \
|
||||
&& update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix \
|
||||
&& update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
|
||||
|
@ -0,0 +1,7 @@
|
||||
ARG ARCH=amd64
|
||||
FROM registry.oxen.rocks/lokinet-ci-android/${ARCH}
|
||||
RUN cd /opt \
|
||||
&& curl https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_2.2.2-stable.tar.xz \
|
||||
| tar xJv \
|
||||
&& ln -s /opt/flutter/bin/flutter /usr/local/bin/ \
|
||||
&& flutter precache
|
@ -0,0 +1 @@
|
||||
../00-debian-stable-base.dockerfile
|
@ -0,0 +1 @@
|
||||
../10-debian-stable.dockerfile
|
@ -1,3 +1,7 @@
|
||||
FROM debian:sid
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN /bin/bash -c 'apt-get -o=Dpkg::Use-Pty=0 -q update && apt-get -o=Dpkg::Use-Pty=0 -q install -y eatmydata git clang-format-11'
|
||||
ARG ARCH=amd64
|
||||
FROM registry.oxen.rocks/lokinet-ci-debian-sid-base/${ARCH}
|
||||
RUN apt-get -o=Dpkg::Use-Pty=0 -q install --no-install-recommends -y \
|
||||
clang-format-11 \
|
||||
eatmydata \
|
||||
git \
|
||||
jsonnet
|
||||
|
@ -1,3 +1,17 @@
|
||||
FROM node:14.16.1
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN /bin/bash -c 'apt-get -o=Dpkg::Use-Pty=0 -q update && apt-get -o=Dpkg::Use-Pty=0 -q dist-upgrade -y && apt-get -o=Dpkg::Use-Pty=0 -q install -y eatmydata gdb cmake git ninja-build pkg-config ccache g++ wine'
|
||||
RUN apt-get -o=Dpkg::Use-Pty=0 -q update \
|
||||
&& apt-get -o=Dpkg::Use-Pty=0 -q dist-upgrade -y \
|
||||
&& apt-get -o=Dpkg::Use-Pty=0 -q install --no-install-recommends -y \
|
||||
ccache \
|
||||
cmake \
|
||||
eatmydata \
|
||||
g++ \
|
||||
gdb \
|
||||
git \
|
||||
make \
|
||||
ninja-build \
|
||||
openssh-client \
|
||||
patch \
|
||||
pkg-config \
|
||||
wine
|
||||
|
@ -1,8 +1,13 @@
|
||||
## drone-ci docker jizz
|
||||
|
||||
To rebuild all ci images and push them to a registry server do:
|
||||
To rebuild all ci images and push them to the oxen registry server do:
|
||||
|
||||
$ docker login your.registry.here
|
||||
$ ./rebuild-docker-images.sh your.registry.here *.dockerfile
|
||||
$ docker login registry.oxen.rocks
|
||||
$ ./rebuild-docker-images.sh
|
||||
|
||||
The docker images will be `your.registry.here/lokinet-ci-*`for each *.dockerfile in this directory
|
||||
If you aren't part of the Oxen team, you'll likely need to set up your own registry and change
|
||||
registry.oxen.rocks to your own domain name in order to do anything useful with this.
|
||||
|
||||
The docker images will be `registry.oxen.rocks/lokinet-ci-*`for each \*.dockerfile in this
|
||||
directory, with the leading numeric `NN-` removed, if present (so that you can ensure proper
|
||||
ordering using two-digit numeric prefixes).
|
||||
|
@ -1,13 +1,44 @@
|
||||
#!/bin/bash
|
||||
|
||||
# the registry server to use
|
||||
registry=$1
|
||||
set -o errexit
|
||||
|
||||
test "x$registry" != "x" || exit 1
|
||||
trap 'echo -e "\n\n\n\e[31;1mAn error occurred!\e[1m\n\n"' ERR
|
||||
|
||||
for file in ${@:2} ; do
|
||||
name="$(echo $file | cut -d'.' -f1)"
|
||||
echo "rebuild $name"
|
||||
docker build -f $file -t $registry/lokinet-ci-$name .
|
||||
docker push $registry/lokinet-ci-$name
|
||||
registry=registry.oxen.rocks
|
||||
|
||||
if [[ $# -eq 0 ]]; then
|
||||
files=(*.dockerfile i386/*.dockerfile arm64v8/*.dockerfile arm32v7/*.dockerfile)
|
||||
else
|
||||
files=("$@")
|
||||
fi
|
||||
|
||||
declare -A manifests
|
||||
|
||||
for file in "${files[@]}"; do
|
||||
if [[ "$file" == */* ]]; then
|
||||
arch="${file%%/*}"
|
||||
name="${file#*/}"
|
||||
else
|
||||
arch="amd64"
|
||||
name="$file"
|
||||
fi
|
||||
|
||||
name="${name#[0-9][0-9]-}" # s/^\d\d-//
|
||||
name="${name%.dockerfile}" # s/\.dockerfile$//
|
||||
namearch=$registry/lokinet-ci-$name/$arch
|
||||
latest=$registry/lokinet-ci-$name:latest
|
||||
echo -e "\e[32;1mrebuilding \e[35;1m$namearch\e[0m"
|
||||
docker build --pull -f $file -t $namearch --build-arg ARCH=$arch .
|
||||
docker push $namearch
|
||||
|
||||
manifests[$latest]="${manifests[$latest]} $namearch"
|
||||
done
|
||||
|
||||
for latest in "${!manifests[@]}"; do
|
||||
echo -e "\e[32;1mpushing new manifest for \e[33;1m$latest[\e[35;1m${manifests[$latest]} \e[33;1m]\e[0m"
|
||||
docker manifest rm $latest 2>/dev/null || true
|
||||
docker manifest create $latest ${manifests[$latest]}
|
||||
docker manifest push $latest
|
||||
done
|
||||
|
||||
echo -e "\n\n\n\e[32;1mAll done!\e[1m\n\n"
|
||||
|
@ -1,3 +0,0 @@
|
||||
FROM ubuntu:bionic
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN /bin/bash -c 'apt-get -o=Dpkg::Use-Pty=0 -q update && apt-get -o=Dpkg::Use-Pty=0 -q dist-upgrade -y && apt-get -o=Dpkg::Use-Pty=0 -q --no-install-recommends install -y eatmydata gdb cmake git ninja-build pkg-config ccache g++-8 python3-dev automake libtool autoconf make qttools5-dev file gperf patch openssh-client'
|
@ -1,3 +0,0 @@
|
||||
FROM ubuntu:focal
|
||||
RUN /bin/bash -c 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections'
|
||||
RUN /bin/bash -c 'apt-get -o=Dpkg::Use-Pty=0 -q update && apt-get -o=Dpkg::Use-Pty=0 -q dist-upgrade -y && apt-get -o=Dpkg::Use-Pty=0 --no-install-recommends -q install -y eatmydata gdb cmake git ninja-build pkg-config ccache g++ libsodium-dev libsystemd-dev python3-dev libuv1-dev libunbound-dev nettle-dev libssl-dev libevent-dev libsqlite3-dev libboost-thread-dev libboost-serialization-dev libboost-program-options-dev libgtest-dev libminiupnpc-dev libunwind8-dev libreadline-dev libhidapi-dev libusb-1.0.0-dev qttools5-dev libcurl4-openssl-dev'
|
@ -1 +1 @@
|
||||
Subproject commit 81d52c4a5ffc1e527ce158c7570aa94dadc8c002
|
||||
Subproject commit dba29b60d639bf8d206a9a12c223e6ed4284fb13
|
Loading…
Reference in New Issue