-
Notifications
You must be signed in to change notification settings - Fork 5
/
gdev.cfg
101 lines (89 loc) · 4.3 KB
/
gdev.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
[apt]
# These dependencies are added here to avoid specialized building of
# images for only those types of builds that need these. Instead,
# we add them for all images here to avoid that specialization and
# to save time and space on building images.
git
debhelper
rpm
# Normal dependencies
flatbuffers-compiler
libcap-dev
openjdk-8-jdk
python3-dev
shellcheck
[gaia]
# FIXME production/sql/src has a dependency on demos/airport_q1.
production/cmake
production/sql
third_party/production/backward
third_party/production/bison
third_party/production/cmake
third_party/production/daemonize
third_party/production/flatbuffers
third_party/production/googletest
third_party/production/libexplain
third_party/production/json
third_party/production/postgresql
third_party/production/pybind11
third_party/production/rocksdb
third_party/production/cpptoml
third_party/production/tabulate
third_party/production/liburing
# The bundle directory contains opensource project modified by Gaia.
third_party/bundle/gaia_spdlog
third_party/bundle/gaia_spdlog_setup
# The third third_party projects build and wrap into a library
# the content of the corresponding bundle folder.
third_party/production/gaia_spdlog
third_party/production/gaia_spdlog_setup
{enable_if_any('GaiaSDK','GaiaLLVMTests','Coverage')}third_party/production/TranslationEngineLLVM
third_party/production/CPackDebHelper
dev_tools/github-actions
[pip]
{enable_if('GaiaLLVMTests')}psutil
pre-commit
[pre_run]
# This ensures that Python scripts work as expected.
update-alternatives --install "/usr/bin/python" "python" "/usr/bin/python3.8" 10
update-alternatives --install "/usr/bin/python3" "python3" "/usr/bin/python3.8" 10
# Enable the Postgres FDW to run under AddressSanitizer.
# We can't put this in third_party/production/postgresql/gdev.cfg because clang-13 isn't yet available when that is run.
mkdir -p /etc/postgresql/12/main
echo "LD_PRELOAD = '$(clang-13 -print-file-name=libclang_rt.asan-$(uname -m).so)'" >> /etc/postgresql/12/main/environment
echo "ASAN_OPTIONS = 'detect_leaks=0'" >> /etc/postgresql/12/main/environment
# Default persistent store location.
mkdir -p /var/lib/gaia/db
# The cmake generator is set in the third_party/production/cmake subproject via the CMAKE_GENERATOR env.
{enable_if_not('SkipBuild')}[run]
mkdir -p /build/production
cd /build/production
CC=$CC CPP=$CPP CXX=$CXX LDFLAGS="$LDFLAGS" \
cmake \
--log-level=VERBOSE -Wno-dev \
{enable_if('CI_GitHub')}-DGIT_HEAD_HASH=$GITHUB_SHA -DGIT_MASTER_HASH=not-found \
{enable_if('CI_GitHub')}-DENABLE_CLANG_TIDY=ON \
{enable_if('CI_GitHub')}-DCMAKE_EXPORT_COMPILE_COMMANDS=OFF \
{enable_if('Coverage')}-DCMAKE_BUILD_TYPE=RelWithDebInfo \
{enable_if('Coverage')}-DCMAKE_CXX_FLAGS="-fprofile-instr-generate -fcoverage-mapping" \
{enable_if('Coverage')}-DCMAKE_C_FLAGS="-fprofile-instr-generate -fcoverage-mapping" \
{enable_if('Debug')}-DCMAKE_BUILD_TYPE=Debug \
{enable_if('Release')}-DCMAKE_BUILD_TYPE=Release \
{enable_if('RelWithDebInfo')}-DCMAKE_BUILD_TYPE=RelWithDebInfo \
{enable_if_any('GaiaSDK','Coverage')}-DCMAKE_MODULE_PATH=/usr/local/lib/cmake/CPackDebHelper \
{enable_if('GaiaLLVMTests')}-DBUILD_GAIA_LLVM_TESTS=ON \
{enable_if_any('GaiaSDK','GaiaLLVMTests','Coverage')}-DBUILD_GAIA_SDK=ON \
{source_dir('production')}
# LSAN will cause failures during docker build time since we cannot allow the
# build context to have privileged information about the host system. Doing so
# would make it impossible to make these builds repeatable. It only needs to be
# disabled during `gdev build` (`docker build` under the hood), but the same is
# not true while inside a container built by `gdev run` (`docker run` under the
# hood) since we do enable privileged information about the host system in that
# context.
export ASAN_OPTIONS=detect_leaks=0
# Using $(nproc) to define the number of jobs to avoid OOM in TeamCity.
{enable_if_not('GaiaLLVMTests')}bash -c "cmake --build . --target all --parallel $(nproc) 1> >(tee /build/production/make-out.log) 2> >(tee /build/production/make-err.log >&2)"
{enable_if('GaiaLLVMTests')}bash -c "cmake --build . --target check-all --parallel $(nproc) 1> >(tee /build/production/make-out.log) 2> >(tee /build/production/make-err.log >&2)"
# Database needs to be in well-known path for tests to pass.
{enable_if_not('GaiaLLVMTests')}cmake --install db/core