mirror of https://github.com/oxen-io/oxen-mq.git
Update ci to use our pre-built images
Also tweak some of the builds a bit, and reformat.
This commit is contained in:
parent
09f3de2232
commit
f0bb2c3d3f
161
.drone.jsonnet
161
.drone.jsonnet
|
@ -1,92 +1,99 @@
|
||||||
|
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'],
|
||||||
|
};
|
||||||
|
|
||||||
local apt_get_quiet = 'apt-get -o=Dpkg::Use-Pty=0 -q ';
|
local apt_get_quiet = 'apt-get -o=Dpkg::Use-Pty=0 -q ';
|
||||||
|
|
||||||
local debian_pipeline(name, image, arch='amd64', deps='g++ libsodium-dev libzmq3-dev', cmake_extra='', build_type='Release', extra_cmds=[], allow_fail=false) = {
|
local debian_pipeline(name, image, arch='amd64', deps='g++ libsodium-dev libzmq3-dev', cmake_extra='', build_type='Release', extra_cmds=[], allow_fail=false) = {
|
||||||
kind: 'pipeline',
|
kind: 'pipeline',
|
||||||
type: 'docker',
|
type: 'docker',
|
||||||
name: name,
|
name: name,
|
||||||
platform: { arch: arch },
|
platform: { arch: arch },
|
||||||
environment: { CLICOLOR_FORCE: '1' }, // Lets color through ninja (1.9+)
|
environment: { CLICOLOR_FORCE: '1' }, // Lets color through ninja (1.9+)
|
||||||
steps: [
|
steps: [
|
||||||
{
|
submodules,
|
||||||
name: 'build',
|
{
|
||||||
image: image,
|
name: 'build',
|
||||||
[if allow_fail then 'failure']: 'ignore',
|
image: image,
|
||||||
commands: [
|
pull: 'always',
|
||||||
'echo "Building on ${DRONE_STAGE_MACHINE}"',
|
[if allow_fail then 'failure']: 'ignore',
|
||||||
'echo "man-db man-db/auto-update boolean false" | debconf-set-selections',
|
commands: [
|
||||||
apt_get_quiet + 'update',
|
'echo "Building on ${DRONE_STAGE_MACHINE}"',
|
||||||
apt_get_quiet + 'install -y eatmydata',
|
'echo "man-db man-db/auto-update boolean false" | debconf-set-selections',
|
||||||
'eatmydata ' + apt_get_quiet + 'dist-upgrade -y',
|
apt_get_quiet + 'update',
|
||||||
'eatmydata ' + apt_get_quiet + 'install -y cmake git ninja-build pkg-config ccache ' + deps,
|
apt_get_quiet + 'install -y eatmydata',
|
||||||
'git submodule update --init --recursive',
|
'eatmydata ' + apt_get_quiet + 'dist-upgrade -y',
|
||||||
'mkdir build',
|
'eatmydata ' + apt_get_quiet + 'install -y cmake git ninja-build pkg-config ccache ' + deps,
|
||||||
'cd build',
|
'git submodule update --init --recursive',
|
||||||
'cmake .. -G Ninja -DCMAKE_CXX_FLAGS=-fdiagnostics-color=always -DCMAKE_BUILD_TYPE=' + build_type + ' -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ' + cmake_extra,
|
'mkdir build',
|
||||||
'ninja -v',
|
'cd build',
|
||||||
'./tests/tests --use-colour yes',
|
'cmake .. -G Ninja -DCMAKE_CXX_FLAGS=-fdiagnostics-color=always -DCMAKE_BUILD_TYPE=' + build_type + ' -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ' + cmake_extra,
|
||||||
] + extra_cmds,
|
'ninja -v',
|
||||||
},
|
'./tests/tests --use-colour yes',
|
||||||
],
|
] + extra_cmds,
|
||||||
|
},
|
||||||
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
local clang(version) = debian_pipeline(
|
local clang(version) = debian_pipeline(
|
||||||
'Debian sid/clang-' + version + ' (amd64)',
|
'Debian sid/clang-' + version + ' (amd64)',
|
||||||
'debian:sid',
|
docker_base + 'debian-sid-clang',
|
||||||
deps='clang-' + version + ' libsodium-dev libzmq3-dev',
|
deps='clang-' + version + ' libsodium-dev libzmq3-dev',
|
||||||
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',
|
docker_base + 'debian-sid-clang',
|
||||||
deps='clang-' + version + ' lld-' + version + ' libc++-' + version + '-dev libc++abi-' + version + '-dev libsodium-dev libzmq3-dev',
|
deps='clang-' + version + ' lld-' + version + ' libc++-' + version + '-dev libc++abi-' + version + '-dev libsodium-dev libzmq3-dev',
|
||||||
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', 'STATIC']
|
for type in ['EXE', 'MODULE', 'SHARED', 'STATIC']
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
[
|
[
|
||||||
debian_pipeline('Ubuntu focal (amd64)', 'ubuntu:focal'),
|
debian_pipeline('Ubuntu focal (amd64)', docker_base + 'ubuntu-focal'),
|
||||||
debian_pipeline('Ubuntu bionic (amd64)',
|
debian_pipeline('Ubuntu bionic (amd64)',
|
||||||
'ubuntu:bionic',
|
docker_base + 'ubuntu-bionic',
|
||||||
deps='libsodium-dev g++-8',
|
deps='libsodium-dev g++-8',
|
||||||
cmake_extra='-DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8'),
|
cmake_extra='-DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8'),
|
||||||
debian_pipeline('Debian sid (amd64)', 'debian:sid'),
|
debian_pipeline('Debian sid (amd64)', docker_base + 'debian-sid'),
|
||||||
debian_pipeline('Debian sid/Debug (amd64)', 'debian:sid', build_type='Debug'),
|
debian_pipeline('Debian sid/Debug (amd64)', docker_base + 'debian-sid', build_type='Debug'),
|
||||||
clang(13),
|
clang(13),
|
||||||
full_llvm(13),
|
full_llvm(13),
|
||||||
debian_pipeline('Debian buster (amd64)', 'debian:buster'),
|
debian_pipeline('Debian buster (amd64)', docker_base + 'debian-buster'),
|
||||||
debian_pipeline('Debian buster (i386)', 'i386/debian:buster'),
|
debian_pipeline('Debian stable (i386)', docker_base + 'debian-stable/i386'),
|
||||||
debian_pipeline('Ubuntu bionic (ARM64)',
|
debian_pipeline('Debian sid (ARM64)', docker_base + 'debian-sid', arch='arm64'),
|
||||||
'ubuntu:bionic',
|
debian_pipeline('Debian stable (armhf)', docker_base + 'debian-stable/arm32v7', arch='arm64'),
|
||||||
arch='arm64',
|
debian_pipeline('Debian buster (armhf)', docker_base + 'debian-buster/arm32v7', arch='arm64'),
|
||||||
deps='libsodium-dev g++-8',
|
{
|
||||||
cmake_extra='-DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8'),
|
kind: 'pipeline',
|
||||||
debian_pipeline('Debian sid (ARM64)', 'debian:sid', arch='arm64'),
|
type: 'exec',
|
||||||
debian_pipeline('Debian buster (armhf)', 'arm32v7/debian:buster', arch='arm64'),
|
name: 'macOS (Catalina w/macports)',
|
||||||
{
|
platform: { os: 'darwin', arch: 'amd64' },
|
||||||
kind: 'pipeline',
|
environment: { CLICOLOR_FORCE: '1' }, // Lets color through ninja (1.9+)
|
||||||
type: 'exec',
|
steps: [
|
||||||
name: 'macOS (Catalina w/macports)',
|
{ name: 'submodules', commands: ['git fetch --tags', 'git submodule update --init --recursive'] },
|
||||||
platform: { os: 'darwin', arch: 'amd64' },
|
{
|
||||||
environment: { CLICOLOR_FORCE: '1' }, // Lets color through ninja (1.9+)
|
name: 'build',
|
||||||
steps: [
|
commands: [
|
||||||
{
|
'git submodule update --init --recursive',
|
||||||
name: 'build',
|
'mkdir build',
|
||||||
commands: [
|
'cd build',
|
||||||
'git submodule update --init --recursive',
|
'cmake .. -G Ninja -DCMAKE_CXX_FLAGS=-fcolor-diagnostics -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache',
|
||||||
'mkdir build',
|
'ninja -v',
|
||||||
'cd build',
|
'./tests/tests --use-colour yes',
|
||||||
'cmake .. -G Ninja -DCMAKE_CXX_FLAGS=-fcolor-diagnostics -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache',
|
|
||||||
'ninja -v',
|
|
||||||
'./tests/tests --use-colour yes',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue