-
Notifications
You must be signed in to change notification settings - Fork 149
/
.cirrus.yml
271 lines (261 loc) · 12.3 KB
/
.cirrus.yml
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
env: # Global defaults
PARENT_BRANCH: 8.0
MOUNT_POINT: "/data"
CCACHE_SIZE: "500M"
CCACHE_NOHASHDIR: "1" # Debug info might contain a stale path if the build dir changes, but this is fine
CCACHE_DIR: "${MOUNT_POINT}/ccache_dir"
BOOST_DIR: "${MOUNT_POINT}/boost_dir"
BOOST_VERSION: "boost_1_77_0"
WORKING_DIR: "${MOUNT_POINT}/cirrus-ci-build"
RESULTS_FILE: "MTR_results"
BUILD_PARAMS_TYPE: normal
# https://cirrus-ci.org/guide/tips-and-tricks/#sharing-configuration-between-tasks
filter_template: &FILTER_TEMPLATE
stateful: false # https://cirrus-ci.org/guide/writing-tasks/#stateful-tasks
timeout_in: 60m # https://cirrus-ci.org/faq/#instance-timed-out
script_template: &SCRIPT_TEMPLATE
system_info_script: |
uname -r
uname -i
df -Th
free -m
pwd
ls -l ..
nproc --all
cat /proc/cpuinfo
install_dependencies_script: |
export DEBIAN_FRONTEND=noninteractive
PACKAGES_TO_INSTALL="lz4 unzip ca-certificates git pkg-config dpkg-dev make cmake cmake-curses-gui ccache bison npm"
PACKAGES_LIBS="libtirpc-dev libgflags-dev libxml-simple-perl libeatmydata1 libfido2-dev libicu-dev libevent-dev libudev-dev libaio-dev libmecab-dev libnuma-dev liblz4-dev libzstd-dev liblzma-dev libreadline-dev libpam-dev libssl-dev libcurl4-openssl-dev libldap2-dev libkrb5-dev libsasl2-dev libsasl2-modules-gssapi-mit"
PACKAGES_PROTOBUF="protobuf-compiler libprotobuf-dev libprotoc-dev"
apt update
apt -yq --no-install-suggests --no-install-recommends --allow-unauthenticated install $PACKAGES_TO_INSTALL $PACKAGES_LIBS $PACKAGES_PROTOBUF $SELECTED_CXX
compiler_info_script: |
echo "SELECTED_CC=$SELECTED_CC (`which $SELECTED_CC`) SELECTED_CXX=$SELECTED_CXX (`which $SELECTED_CXX`) BUILD_TYPE=$BUILD_TYPE BUILD_PARAMS_TYPE=$BUILD_PARAMS_TYPE"
$SELECTED_CC -v
$SELECTED_CXX -v
ccache --version
ccache -p
ccache --zero-stats
df -Th
clone_script: |
if [ -d "$WORKING_DIR" ]; then
cd $WORKING_DIR
git fetch origin
if [[ "${CIRRUS_REPO_FULL_NAME}" != "percona/percona-server" ]]; then
git remote add forked_repo https://github.com/${CIRRUS_REPO_FULL_NAME}.git
git fetch forked_repo
fi
if [ -n "$CIRRUS_PR" ]; then
git fetch origin pull/$CIRRUS_PR/head:pull/$CIRRUS_PR
fi
else
mkdir -p $WORKING_DIR
cd $WORKING_DIR
if [ -z "$CIRRUS_PR" ]; then
git clone --recursive --branch=$CIRRUS_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $WORKING_DIR
else
git clone --recursive https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $WORKING_DIR
git fetch origin pull/$CIRRUS_PR/head:pull/$CIRRUS_PR
fi
fi
git reset --hard $CIRRUS_CHANGE_IN_REPO
git submodule update --init
git submodule
df -Th
ccache_cache:
folder: "$CCACHE_DIR"
fingerprint_key: "$PARENT_BRANCH-$OS_TYPE-$SELECTED_CC-$BUILD_TYPE-$BUILD_PARAMS_TYPE"
reupload_on_changes: true
boost_cache:
folder: "$BOOST_DIR"
fingerprint_key: "$BOOST_VERSION"
reupload_on_changes: true
cmake_script: |
echo "SELECTED_CC=$SELECTED_CC (`which $SELECTED_CC`) SELECTED_CXX=$SELECTED_CXX (`which $SELECTED_CXX`) BUILD_TYPE=$BUILD_TYPE BUILD_PARAMS_TYPE=$BUILD_PARAMS_TYPE"
cd $WORKING_DIR; mkdir bin; cd bin
OPTIONS_DEBUG="-DCMAKE_C_FLAGS_DEBUG=-g1 -DCMAKE_CXX_FLAGS_DEBUG=-g1"
OPTIONS_BUILD="-DMYSQL_MAINTAINER_MODE=ON -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_CONFIG=mysql_release -DWITH_PACKAGE_FLAGS=OFF -DDOWNLOAD_BOOST=1 -DWITH_BOOST=$BOOST_DIR"
OPTIONS_COMPILER="-DCMAKE_C_COMPILER=$SELECTED_CC -DCMAKE_CXX_COMPILER=$SELECTED_CXX -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
OPTIONS_COMPONENTS="-DWITH_ROCKSDB=ON -DWITH_COREDUMPER=ON -DWITH_KEYRING_VAULT=ON -DWITH_KEYRING_VAULT_TEST=ON -DWITH_PAM=ON"
OPTIONS_LIBS="-DWITH_MECAB=system -DWITH_NUMA=ON -DWITH_READLINE=system -DWITH_SYSTEM_LIBS=ON -DWITH_ZLIB=bundled"
OPTIONS_INVERTED="-DWITH_NDB=ON -DWITH_NDBCLUSTER=ON -DWITH_NDB_JAVA=OFF -DWITH_ROUTER=OFF -DWITH_UNIT_TESTS=OFF -DWITH_NUMA=OFF -DROCKSDB_PLUGINS=zenfs -DWITH_ZENFS_UTILITY=ON"
OPTIONS_LIBS_BUNDLED="-DWITH_EDITLINE=bundled -DWITH_FIDO=bundled -DWITH_ICU=bundled -DWITH_LIBEVENT=bundled -DWITH_LZ4=bundled -DWITH_PROTOBUF=bundled -DWITH_RAPIDJSON=bundled -DWITH_ZLIB=bundled -DWITH_ZSTD=bundled"
OPTIONS_SE_INVERTED="-DWITH_ARCHIVE_STORAGE_ENGINE=OFF -DWITH_BLACKHOLE_STORAGE_ENGINE=OFF -DWITH_EXAMPLE_STORAGE_ENGINE=ON -DWITH_FEDERATED_STORAGE_ENGINE=OFF -DWITHOUT_PERFSCHEMA_STORAGE_ENGINE=ON -DWITH_INNODB_MEMCACHED=ON"
if [[ "$BUILD_PARAMS_TYPE" == "normal" ]]; then
SELECTED_OPTIONS="$OPTIONS_DEBUG $OPTIONS_BUILD $OPTIONS_COMPILER $OPTIONS_COMPONENTS $OPTIONS_LIBS"
else
SELECTED_OPTIONS="$OPTIONS_DEBUG $OPTIONS_BUILD $OPTIONS_COMPILER $OPTIONS_COMPONENTS $OPTIONS_INVERTED $OPTIONS_LIBS_BUNDLED $OPTIONS_SE_INVERTED"
fi
echo "SELECTED_OPTIONS=$SELECTED_OPTIONS"
cmake .. $SELECTED_OPTIONS
cmake -L .
rm -f $BOOST_DIR/$BOOST_VERSION.tar.gz
df -Th
compile_script: |
echo "SELECTED_CC=$SELECTED_CC (`which $SELECTED_CC`) SELECTED_CXX=$SELECTED_CXX (`which $SELECTED_CXX`) BUILD_TYPE=$BUILD_TYPE BUILD_PARAMS_TYPE=$BUILD_PARAMS_TYPE"
cd $WORKING_DIR/bin
NPROC=`nproc --all`
NTHREADS=$(( $NPROC > 16 ? 16 : $NPROC ))
echo "Using $NTHREADS/$NPROC"
make -j${NTHREADS}
ccache --show-stats
df -Th
mysql_test_run_script: |
cd $WORKING_DIR/bin
NPROC=`nproc --all`
NTHREADS=$(( $NPROC > 16 ? 16 : $NPROC ))
if [[ "$BUILD_TYPE" == "RelWithDebInfo" ]]; then
MTR_TESTS="--suite=main"
else
MTR_TESTS="main.1st"
fi
echo "Start testing with $NTHREADS/$NPROC threads; MTR_TESTS=$MTR_TESTS"
LIBEATMYDATA=`whereis libeatmydata.so`
mysql-test/mysql-test-run.pl $MTR_TESTS --parallel=$NTHREADS --junit-output=$CIRRUS_WORKING_DIR/${RESULTS_FILE}.xml --mysqld-env=LD_PRELOAD=${LIBEATMYDATA##* } --force --max-test-fail=0 --retry-failure=0 --debug-server || echo Ignore mysql_test_run.pl errorcode
echo "Finished testing with $NTHREADS/$NPROC threads"
df -Th
rm -rf mysql-test/var
df -Th
npm install -g xunit-viewer
xunit-viewer --results $CIRRUS_WORKING_DIR/${RESULTS_FILE}.xml --output $CIRRUS_WORKING_DIR/${RESULTS_FILE}.html
html_artifacts:
path: ${RESULTS_FILE}.html
task:
<< : *FILTER_TEMPLATE
# run only on "percona/percona-server" but not on "8.0" as we have nightly cron builds for "8.0" branch
only_if: "$CIRRUS_CRON != '' || $CIRRUS_REPO_FULL_NAME == 'percona/percona-server' && $CIRRUS_BRANCH != '8.0' && !changesIncludeOnly('doc/*', 'build-ps/*', 'man/*', 'mysql-test/*', 'packaging/*', 'policy/*', 'scripts/*', 'support-files/*')"
aws_credentials: ENCRYPTED[!f57794979d3ed96943cd39073b66a4fffbdc3ee6366b265e68c5aae890961d171bddca50bf169cc07db56c8c68172b84!]
ec2_instance:
# aws ec2 describe-images --filters "Name=name,Values=ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-arm64-server-202307*"
image: ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-arm64-server-20230728
# image: ami-0e2b332e63c56bcb5 # Ubuntu Server 22.04 LTS ARM 64-bit
type: c6gd.4xlarge # 16 vCPUs, 32 GB, 950 GB SSD, 0.6144 USD/H
region: us-east-1
architecture: arm64 # defaults to amd64
spot: true
env:
OS_TYPE: ubuntu-22.04-arm64
matrix:
- name: (arm64) gcc Debug [Ubuntu 22.04 Jammy]
env:
SELECTED_CC: gcc
SELECTED_CXX: g++
BUILD_TYPE: Debug
- name: (arm64) gcc RelWithDebInfo [Ubuntu 22.04 Jammy]
skip: $CIRRUS_PR != "" # skip PRs
env:
SELECTED_CC: gcc
SELECTED_CXX: g++
BUILD_TYPE: RelWithDebInfo
mount_disk_script: |
lsblk
lsblk -f
df -Th
sudo mkfs -t xfs /dev/nvme1n1
sudo mkdir $MOUNT_POINT
sudo mount /dev/nvme1n1 $MOUNT_POINT
df -Th
<< : *SCRIPT_TEMPLATE
task:
<< : *FILTER_TEMPLATE
# run only on "percona/percona-server" but not on "8.0" as we have nightly cron builds for "8.0" branch
only_if: "$CIRRUS_CRON != '' || $CIRRUS_REPO_FULL_NAME == 'percona/percona-server' && $CIRRUS_BRANCH != '8.0' && !changesIncludeOnly('doc/*', 'build-ps/*', 'man/*', 'mysql-test/*', 'packaging/*', 'policy/*', 'scripts/*', 'support-files/*')"
aws_credentials: ENCRYPTED[!f57794979d3ed96943cd39073b66a4fffbdc3ee6366b265e68c5aae890961d171bddca50bf169cc07db56c8c68172b84!]
ec2_instance:
# aws ec2 describe-images --filters "Name=name,Values=ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-2024061*"
image: ami-0d3d400c0ff21c982 # Ubuntu 24.04 x86-64 with gcc-14
type: c6i.4xlarge # 16 vCPUs, 32 GB, no SSD
region: us-east-1
architecture: amd64 # defaults to amd64
spot: true
env:
OS_TYPE: ubuntu-24.04-x86_64
matrix:
- name: (x86_64) gcc-14 Debug [Ubuntu 24.04 Noble]
env:
SELECTED_CC: gcc-14
SELECTED_CXX: g++-14
BUILD_TYPE: Debug
BUILD_PARAMS_TYPE: normal
- name: (x86_64) gcc-14 RelWithDebInfo [Ubuntu 24.04 Noble]
skip: $CIRRUS_PR != "" # skip PRs
env:
SELECTED_CC: gcc-14
SELECTED_CXX: g++-14
BUILD_TYPE: RelWithDebInfo
BUILD_PARAMS_TYPE: normal
mount_disk_script: |
lsblk
lsblk -f
<< : *SCRIPT_TEMPLATE
task:
<< : *FILTER_TEMPLATE
# run only on "percona/percona-server" but not on "8.0" as we have nightly cron builds for "8.0" branch
only_if: "$CIRRUS_CRON != '' || $CIRRUS_REPO_FULL_NAME == 'percona/percona-server' && $CIRRUS_BRANCH != '8.0' && !changesIncludeOnly('doc/*', 'build-ps/*', 'man/*', 'mysql-test/*', 'packaging/*', 'policy/*', 'scripts/*', 'support-files/*')"
aws_credentials: ENCRYPTED[!f57794979d3ed96943cd39073b66a4fffbdc3ee6366b265e68c5aae890961d171bddca50bf169cc07db56c8c68172b84!]
ec2_instance:
# aws ec2 describe-images --filters "Name=name,Values=ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-202302*"
image: ami-0f9f8d3ed33d7cb88 # Ubuntu 22.04.1 x86-64 with 40 GB gp2 and percona-server gcc-13 gcc-12 gcc-11 gcc-10 gcc-9 clang-15 clang-14 clang-13 node-12
type: c6a.4xlarge # 16 vCPUs, 32 GB, no SSD, 0.612 USD/H
#type: c5a.4xlarge # 16 vCPUs, 32 GB, no SSD, 0.616 USD/H
#type: c5.4xlarge # 16 vCPUs, 32 GB, no SSD, 0.68 USD/H
#type: c6i.4xlarge # 16 vCPUs, 32 GB, no SSD, 0.68 USD/H
region: us-east-1
architecture: amd64 # defautls to amd64
spot: true
env:
OS_TYPE: ubuntu-22.04-x86_64
matrix:
- name: (x86_64) gcc-13 Debug INVERTED [Ubuntu 22.04 Jammy]
env:
SELECTED_CC: gcc-13
SELECTED_CXX: g++-13
BUILD_TYPE: Debug
BUILD_PARAMS_TYPE: inverted
- name: (x86_64) gcc-13 RelWithDebInfo INVERTED [Ubuntu 22.04 Jammy]
skip: $CIRRUS_PR != "" # skip PRs
env:
SELECTED_CC: gcc-13
SELECTED_CXX: g++-13
BUILD_TYPE: RelWithDebInfo
BUILD_PARAMS_TYPE: inverted
mount_disk_script: |
lsblk
lsblk -f
<< : *SCRIPT_TEMPLATE
task:
<< : *FILTER_TEMPLATE
aws_credentials: ENCRYPTED[!92ac22d2430cf40dfcec42f739513a65c8b368c822cb397e95f799d41c0ba4498c3a1c337ab14a25cc47b2d4b53c46c5!]
# run only on "inikep/percona-server" when a branch name contains "cirrus-arm"
only_if: "$CIRRUS_BRANCH =~ '.*cirrus-arm.*' && $CIRRUS_REPO_FULL_NAME == 'inikep/percona-server' && !changesIncludeOnly('doc/*', 'build-ps/*', 'man/*', 'mysql-test/*', 'packaging/*', 'policy/*', 'scripts/*', 'support-files/*')" # we have nightly cron builds for "8.0" branch
ec2_instance:
# aws ec2 describe-images --filters "Name=name,Values=ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-arm64-server-202212*"
image: ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-arm64-server-20221206
# image: ami-0e2b332e63c56bcb5 # Ubuntu Server 22.04 LTS ARM 64-bit
type: c6gd.4xlarge # 16 vCPUs, 32 GB, 950 GB SSD, 0.6144 USD/H
region: us-east-1
architecture: arm64 # defautls to amd64
spot: true
env:
OS_TYPE: ubuntu-22.04-arm64
matrix:
- name: (arm64) gcc Debug [Ubuntu 22.04 Jammy]
env:
SELECTED_CC: gcc
SELECTED_CXX: g++
BUILD_TYPE: Debug
- name: (arm64) gcc RelWithDebInfo [Ubuntu 22.04 Jammy]
env:
SELECTED_CC: gcc
SELECTED_CXX: g++
BUILD_TYPE: RelWithDebInfo
mount_disk_script: |
lsblk
lsblk -f
df -Th
sudo mkfs -t xfs /dev/nvme1n1
sudo mkdir $MOUNT_POINT
sudo mount /dev/nvme1n1 $MOUNT_POINT
df -Th
<< : *SCRIPT_TEMPLATE