-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
112 lines (99 loc) · 3.54 KB
/
.gitlab-ci.yml
File metadata and controls
112 lines (99 loc) · 3.54 KB
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
102
103
104
105
106
107
108
109
110
111
112
#################################################################
# #
# Copyright (c) 2020-2021 Peter Goss All rights reserved. #
# #
# Copyright (c) 2020-2025 YottaDB LLC and/or its subsidiaries. #
# All rights reserved. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
stages:
- formatting-checks
- test
.ubuntu:
before_script:
- apt update
- apt install -y python3-setuptools python3-dev libffi-dev python3-pip pkg-config python3-venv
- source $(pkg-config --variable=prefix yottadb)/ydb_env_set
- python3 -m venv .venv
- source .venv/bin/activate
- python3 -m pip install pytest-runner
- python3 -m pip install .
.rocky:
before_script:
- yum install -y python3 gcc python3-devel libffi-devel pkg-config
- source $(pkg-config --variable=prefix yottadb)/ydb_env_set
- python3 -m pip install .
# https://stackoverflow.com/questions/692000/how-do-i-write-standard-error-to-a-file-while-using-tee-with-a-pipe
.test_ubuntu:
script:
- python3 -m pip install pytest pytest-order psutil requests
- python3 -m pytest tests/ -vs
.test_rocky:
script:
- python3 -m pip install pytest pytest-order psutil requests
- python3 -m pytest tests/ -vs
.debug:
script:
# Enable Debug build be uncommenting undef_macros compiler line in setup.py
- sed -i 's/# undef_macros/undef_macros/' setup.py
test_ubuntu_default:
image: yottadb/yottadb-base:latest-master
stage: test
extends:
- .ubuntu
- .test_ubuntu
test_ubuntu_asan:
image: yottadb/yottadb-asan-base:latest-master
stage: test
extends:
- .ubuntu
script:
- apt update
- apt install -y gcc
- export ASAN_OPTIONS="detect_leaks=0:disable_coredump=0:unmap_shadow_on_exit=1:abort_on_error=1"
- export LD_PRELOAD=$(gcc -print-file-name=libasan.so)
- !reference [.test_ubuntu, script]
test_ubuntu_debug:
image: yottadb/yottadb-base:latest-master
stage: test
extends:
- .ubuntu
- .debug
- .test_ubuntu
test_rocky_default:
image: yottadb/yottadb-rocky-base:latest-master
stage: test
extends:
- .rocky
- .test_rocky
commit-verify:
image: ubuntu:24.04
stage: formatting-checks
before_script:
- apt update -qq && apt-get install -y -qq git wget gnupg
script:
# Copy commit gpg key verify script to build directory and execute
- wget https://gitlab.com/YottaDB/DB/YDB/-/raw/master/ci/commit_verify.sh
- chmod +x commit_verify.sh
- chmod +x ./tools/ci/needs_copyright.sh
- ./commit_verify.sh ./tools/ci/needs_copyright.sh https://gitlab.com/YottaDB/Lang/YDBPython
code-format-check:
image: yottadb/yottadb-base:latest-master
stage: formatting-checks
extends:
- .ubuntu
artifacts:
paths:
- temp_warnings.txt
- clang_tidy_warnings.txt
- sorted_warnings.txt
when: always
script:
- apt update -qq && apt-get install -y -qq git wget gnupg pkg-config clang-format-15 clang-tidy-15
- python3 -m pip install black
- LC_ALL=C.UTF-8 bash ./tools/ci/check_code_format.sh