mirror of https://github.com/oxen-io/oxen-mq.git
CI tweaks
- extract submodule commands (so that macOS gets the `--depth=1`) - put deps into a list instead of a string - remove extraneous submodule update from build steps - move focal to after sid
This commit is contained in:
parent
39b6d89037
commit
a53e1f1786
|
@ -1,14 +1,18 @@
|
|||
local docker_base = 'registry.oxen.rocks/lokinet-ci-';
|
||||
|
||||
local default_deps_nocxx = ['libsodium-dev', 'libzmq3-dev'];
|
||||
|
||||
local submodule_commands = ['git fetch --tags', 'git submodule update --init --recursive --depth=1'];
|
||||
|
||||
local submodules = {
|
||||
name: 'submodules',
|
||||
image: 'drone/git',
|
||||
commands: ['git fetch --tags', 'git submodule update --init --recursive --depth=1'],
|
||||
commands: submodule_commands,
|
||||
};
|
||||
|
||||
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++'] + default_deps_nocxx, cmake_extra='', build_type='Release', extra_cmds=[], allow_fail=false) = {
|
||||
kind: 'pipeline',
|
||||
type: 'docker',
|
||||
name: name,
|
||||
|
@ -27,8 +31,7 @@ local debian_pipeline(name, image, arch='amd64', deps='g++ libsodium-dev libzmq3
|
|||
apt_get_quiet + 'update',
|
||||
apt_get_quiet + 'install -y eatmydata',
|
||||
'eatmydata ' + apt_get_quiet + 'dist-upgrade -y',
|
||||
'eatmydata ' + apt_get_quiet + 'install -y cmake git ninja-build pkg-config ccache ' + deps,
|
||||
'git submodule update --init --recursive',
|
||||
'eatmydata ' + apt_get_quiet + 'install -y cmake git ninja-build pkg-config ccache ' + std.join(' ', deps),
|
||||
'mkdir build',
|
||||
'cd build',
|
||||
'cmake .. -G Ninja -DCMAKE_CXX_FLAGS=-fdiagnostics-color=always -DCMAKE_BUILD_TYPE=' + build_type + ' -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ' + cmake_extra,
|
||||
|
@ -42,14 +45,15 @@ local debian_pipeline(name, image, arch='amd64', deps='g++ libsodium-dev libzmq3
|
|||
local clang(version) = debian_pipeline(
|
||||
'Debian sid/clang-' + version + ' (amd64)',
|
||||
docker_base + 'debian-sid-clang',
|
||||
deps='clang-' + version + ' libsodium-dev libzmq3-dev',
|
||||
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 libsodium-dev libzmq3-dev',
|
||||
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++ ' +
|
||||
|
@ -61,11 +65,6 @@ local full_llvm(version) = debian_pipeline(
|
|||
|
||||
|
||||
[
|
||||
debian_pipeline('Ubuntu focal (amd64)', docker_base + 'ubuntu-focal'),
|
||||
debian_pipeline('Ubuntu bionic (amd64)',
|
||||
docker_base + 'ubuntu-bionic',
|
||||
deps='libsodium-dev g++-8',
|
||||
cmake_extra='-DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8'),
|
||||
debian_pipeline('Debian sid (amd64)', docker_base + 'debian-sid'),
|
||||
debian_pipeline('Debian sid/Debug (amd64)', docker_base + 'debian-sid', build_type='Debug'),
|
||||
clang(13),
|
||||
|
@ -75,18 +74,22 @@ local full_llvm(version) = debian_pipeline(
|
|||
debian_pipeline('Debian sid (ARM64)', docker_base + 'debian-sid', arch='arm64'),
|
||||
debian_pipeline('Debian stable (armhf)', docker_base + 'debian-stable/arm32v7', arch='arm64'),
|
||||
debian_pipeline('Debian buster (armhf)', docker_base + 'debian-buster/arm32v7', arch='arm64'),
|
||||
debian_pipeline('Ubuntu focal (amd64)', docker_base + 'ubuntu-focal'),
|
||||
debian_pipeline('Ubuntu bionic (amd64)',
|
||||
docker_base + 'ubuntu-bionic',
|
||||
deps=default_deps_nocxx,
|
||||
cmake_extra='-DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8'),
|
||||
{
|
||||
kind: 'pipeline',
|
||||
type: 'exec',
|
||||
name: 'macOS (Catalina w/macports)',
|
||||
name: 'macOS (w/macports)',
|
||||
platform: { os: 'darwin', arch: 'amd64' },
|
||||
environment: { CLICOLOR_FORCE: '1' }, // Lets color through ninja (1.9+)
|
||||
steps: [
|
||||
{ name: 'submodules', commands: ['git fetch --tags', 'git submodule update --init --recursive'] },
|
||||
{ name: 'submodules', commands: submodule_commands },
|
||||
{
|
||||
name: 'build',
|
||||
commands: [
|
||||
'git submodule update --init --recursive',
|
||||
'mkdir build',
|
||||
'cd build',
|
||||
'cmake .. -G Ninja -DCMAKE_CXX_FLAGS=-fcolor-diagnostics -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache',
|
||||
|
|
Loading…
Reference in New Issue