@@ -40,10 +40,10 @@ default:
40
40
# submodules (a commit in this repo does not affect their builds anyway) and
41
41
# many components that are otherwise slow to build.
42
42
variables :
43
- CMAKE_FLAGS : " -DWITH_SSL=system -DPLUGIN_COLUMNSTORE=NO -DPLUGIN_ROCKSDB=NO -DPLUGIN_S3=NO -DPLUGIN_MROONGA=NO -DPLUGIN_CONNECT=NO -DPLUGIN_TOKUDB=NO -DWITH_WSREP=OFF"
43
+ CMAKE_FLAGS : " -DCPACK_RPM_DEBUGINFO_PACKAGE=OFF - DWITH_SSL=system -DPLUGIN_COLUMNSTORE=NO -DPLUGIN_ROCKSDB=NO -DPLUGIN_S3=NO -DPLUGIN_MROONGA=NO -DPLUGIN_CONNECT=NO -DPLUGIN_TOKUDB=NO -DWITH_WSREP=OFF"
44
44
# Major version dictates which branches share the same ccache. E.g. 10.6-abc
45
45
# and 10.6-xyz will have the same cache.
46
- MARIADB_MAJOR_VERSION : " 11.1 "
46
+ MARIADB_MAJOR_VERSION : " 11.8 "
47
47
# NOTE! Currently ccache is only used on the Centos 9 build. As each job has
48
48
# sufficiently different environments they are unable to benefit from each
49
49
# other's ccaches. As each build generates about 1 GB of ccache, having
@@ -59,9 +59,6 @@ variables:
59
59
#
60
60
# Most steps don't need the source code, only artifacts
61
61
GIT_STRATEGY : none
62
- # Hack to satisfy directory name length requirement by CPackRPM in CMake 3.x
63
- # https://cmake.org/cmake/help/v3.7/module/CPackRPM.html#variable:CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX
64
- GIT_CLONE_PATH : $CI_BUILDS_DIR/CPACK_BUILD_SOURCE_DIRS_LONG_NAME_REQUIREMENT
65
62
66
63
# Define once, use many times
67
64
.rpm_listfiles : &rpm_listfiles
@@ -183,7 +180,7 @@ fedora-sanitizer:
183
180
GIT_SUBMODULE_STRATEGY : normal
184
181
script :
185
182
- yum install -y yum-utils rpm-build openssl-devel clang
186
- - yum install -y libasan libtsan libubsan
183
+ - yum install -y libasan libtsan
187
184
# This repository does not have any .spec files, so install dependencies based on Fedora spec file
188
185
- yum-builddep -y mariadb-server
189
186
- mkdir builddir; cd builddir
@@ -207,7 +204,9 @@ fedora-sanitizer:
207
204
- builddir/_CPack_Packages/Linux/RPM/SPECS/
208
205
parallel :
209
206
matrix :
210
- - SANITIZER : [-DWITH_ASAN=YES, -DWITH_TSAN=YES, -DWITH_UBSAN=YES]
207
+ - SANITIZER : [-DWITH_ASAN=YES, -DWITH_TSAN=YES]
208
+ # Removed in 2025 due to failing build: -DWITH_UBSAN=YES
209
+ # Removed in 2023 commit f4ce1e4: -DWITH_MSAN=YES
211
210
212
211
centos9 :
213
212
stage : build
@@ -249,19 +248,20 @@ centos9:
249
248
paths :
250
249
- .ccache
251
250
252
- centos7 :
251
+ amazonlinux2 :
253
252
stage : build
254
- image : centos:7
253
+ image : amazonlinux:2
255
254
variables :
256
255
GIT_STRATEGY : fetch
257
256
GIT_SUBMODULE_STRATEGY : normal
258
257
script :
259
- # This repository does not have any .spec files, so install dependencies based on Fedora spec file
258
+ # This repository does not have any .spec files, so install dependencies
259
+ # based on Amazon Linux spec file with a few extra ones, as Amazon Linux 2
260
+ # is quite old and these are added in newer MariaDB releases.
261
+ - yum install -y yum-utils rpm-build gcc gcc-c++ bison libxml2-devel libevent-devel openssl-devel pcre2-devel cmake3
260
262
- yum-builddep -y mariadb-server
261
- # ..with a few extra ones, as CentOS 7 is very old and these are added in newer MariaDB releases
262
- - yum install -y yum-utils rpm-build gcc gcc-c++ bison libxml2-devel libevent-devel openssl-devel pcre2-devel
263
263
- mkdir builddir; cd builddir
264
- - cmake -DRPM=$CI_JOB_NAME $CMAKE_FLAGS .. 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
264
+ - cmake3 -DRPM=$CI_JOB_NAME $CMAKE_FLAGS .. 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
265
265
- make package -j 2 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log
266
266
# @TODO: Don't use -j without the limit of 2 on Gitlab.com as builds just
267
267
# get stuck when running multi-proc and out of memory, see https://jira.mariadb.org/browse/MDEV-25968
@@ -285,17 +285,20 @@ centos7:
285
285
cd /usr/share/mariadb-test
286
286
# Skip failing tests
287
287
echo "
288
- main.mysqldump : Field separator argument is not what is expected; check the manual when executing 'SELECT INTO OUTFILE'
289
288
main.flush_logs_not_windows : query 'flush logs' succeeded - should have failed with error ER_CANT_CREATE_FILE (1004)
290
- main.mysql_upgrade_noengine : upgrade output order does not match the expected
291
289
main.func_math : MDEV-20966 - Wrong error code
290
+ main.mysql_upgrade_noengine : upgrade output order does not match the expected
291
+ main.mysqldump : Field separator argument is not what is expected; check the manual when executing 'SELECT INTO OUTFILE'
292
+ main.rpl_mysql_upgrade_slave_repo_check : skip for now as regression has gone unnoticed for a long time
293
+ main.rpl_mysqldump_slave : skip for now as regression has gone unnoticed for a long time
294
+ main.ssl_timeout : skip for now as regression has gone unnoticed for a long time
295
+ main.upgrade_MDEV-23102-1 : skip for now as regression has gone unnoticed for a long time
296
+ main.upgrade_MDEV-23102-2 : skip for now as regression has gone unnoticed for a long time
292
297
" > skiplist
293
298
$SIMULATE_TIME ./mtr --suite=main --force --parallel=auto --xml-report=$CI_PROJECT_DIR/junit.xml --skip-test-list=skiplist $MTR_FLAGS
294
299
295
300
mysql-test-run:
296
301
stage: test
297
- dependencies:
298
- - fedora
299
302
needs:
300
303
- fedora
301
304
script:
@@ -310,16 +313,14 @@ mysql-test-run:
310
313
# sanitizer errors separate from functional test failures. Currently, there is no way to run the same
311
314
# job for different dependencies.
312
315
#
313
- # Additionally, for each sanitizer MTR job, we enable --force-restart so that
314
- # sanitizer errors can be traced to individual tests. The difference in test
316
+ # Additionally, for each sanitizer MTR job, we enable --force-restart so that
317
+ # sanitizer errors can be traced to individual tests. The difference in test
315
318
# suite runtime as a result of this flag is negligable (~30s for the entire test suite).
316
319
# (see https://dev.mysql.com/doc/dev/mysql-server/latest/PAGE_MYSQL_TEST_RUN_PL.html)
317
320
mysql-test-run-asan:
318
321
stage: test
319
322
variables:
320
323
MTR_FLAGS: " --force-restart"
321
- dependencies :
322
- - " fedora-sanitizer: [-DWITH_ASAN=YES]"
323
324
needs :
324
325
- " fedora-sanitizer: [-DWITH_ASAN=YES]"
325
326
script :
@@ -335,8 +336,6 @@ mysql-test-run-tsan:
335
336
stage : test
336
337
variables :
337
338
MTR_FLAGS : " --force-restart"
338
- dependencies :
339
- - " fedora-sanitizer: [-DWITH_TSAN=YES]"
340
339
needs :
341
340
- " fedora-sanitizer: [-DWITH_TSAN=YES]"
342
341
script :
@@ -348,49 +347,8 @@ mysql-test-run-tsan:
348
347
junit :
349
348
- junit.xml
350
349
351
- mysql-test-run-ubsan :
352
- stage : test
353
- variables :
354
- MTR_FLAGS : " --force-restart"
355
- dependencies :
356
- - " fedora-sanitizer: [-DWITH_UBSAN=YES]"
357
- needs :
358
- - " fedora-sanitizer: [-DWITH_UBSAN=YES]"
359
- script :
360
- - *mysql-test-run-def
361
- allow_failure : true
362
- artifacts :
363
- when : always # Also show results when tests fail
364
- reports :
365
- junit :
366
- - junit.xml
367
-
368
- mysql-test-run-future :
369
- stage : test
370
- variables :
371
- MTR_FLAGS : " --max-test-fail=0"
372
- dependencies :
373
- - fedora
374
- needs :
375
- - fedora
376
- script :
377
- - yum install -y faketime
378
- - *mysql-test-run-def
379
- artifacts :
380
- when : always # Also show results when tests fail
381
- reports :
382
- junit :
383
- - junit.xml
384
- parallel :
385
- matrix :
386
- # The reason we test in two different future times is for the ability to separate between
387
- # failures pertaining to general time expiry issues and failures specific to the 32-bit time/Y2038 problem
388
- - SIMULATE_TIME : ["faketime 2038-01-20", "faketime 2038-01-18"]
389
-
390
350
rpmlint :
391
351
stage : test
392
- dependencies :
393
- - fedora
394
352
needs :
395
353
- fedora
396
354
script :
@@ -408,8 +366,6 @@ rpmlint:
408
366
409
367
fedora install :
410
368
stage : test
411
- dependencies :
412
- - fedora
413
369
needs :
414
370
- fedora
415
371
script :
@@ -453,15 +409,18 @@ cppcheck:
453
409
# --template: output format
454
410
# --force: check large directories without warning
455
411
# -i<directory>: ignore this directory when scanning
456
- # -I<directory>: include path, reduces false positives
412
+ # -I<directory>: include path, reduces false positives
457
413
# related to inability to resolve symbols
458
414
# -j: run multiple cppcheck threads
415
+ #
416
+ # Note: Scope reduced heavily with -i to keep cppcheck run under 3h
417
+ #
459
418
# Use newline to escape colon in yaml
460
419
- >
461
420
cppcheck --template="{file}:{line}\n{code}\n{severity}: {message}" --force --check-level=exhaustive
462
421
client dbug extra include libmariadb libmysqld libservices mysql-test mysys mysys_ssl pcre plugin
463
422
strings tests unittest vio wsrep-lib sql sql-common storage
464
- -istorage/mroonga -istorage/tokudb -istorage/spider -istorage/rocksdb -iextra/ -ilibmariadb/ -istorage/columnstore
423
+ -istorage/mroonga -istorage/tokudb -istorage/spider -istorage/rocksdb -iextra/ -ilibmariadb/ -istorage/columnstore -istorage/connect -istorage/myisam -istorage/perfschema
465
424
-Iinclude -Istorage/innobase/include
466
425
--output-file=initial-cppcheck_output.txt -j $(nproc)
467
426
# when including {code} in the cppcheck template, some more pre-processing needs to be done
@@ -483,9 +442,9 @@ cppcheck:
483
442
cat preprocessed-cppcheck_sorted.txt | grep -v "There is an unknown macro here somewhere" > results-cppcheck_all_findings.txt
484
443
sed 's/:[0-9]\+//' results-cppcheck_all_findings.txt > preprocessed_final-cppcheck_no_line_nums.txt
485
444
# Only print new issues not found in ignore list
486
- - echo "Problems found in ignore list that were not discovered by cppcheck (may have been fixed). "
445
+ - echo "Problems found in ignore list that were not discovered by cppcheck (may have been fixed): "
487
446
- diff --changed-group-format='%>' --unchanged-group-format='' preprocessed_final-cppcheck_no_line_nums.txt tests/code_quality/cppcheck_ignorelist.txt || true
488
- - echo "Problems found by cppcheck that were not in ignore list. "
447
+ - echo "Problems found by cppcheck that were not in ignore list: "
489
448
- diff --changed-group-format='%<' --unchanged-group-format='' preprocessed_final-cppcheck_no_line_nums.txt tests/code_quality/cppcheck_ignorelist.txt > results-cppcheck_new_findings.txt || true
490
449
- cat results-cppcheck_new_findings.txt && test ! -s results-cppcheck_new_findings.txt
491
450
artifacts :
@@ -499,7 +458,7 @@ cppcheck:
499
458
- results-cppcheck_all_findings.txt
500
459
- results-cppcheck_new_findings.txt
501
460
502
- flawfinder :
461
+ flawfinder :
503
462
allow_failure : true
504
463
stage : sast
505
464
needs : []
@@ -530,11 +489,9 @@ flawfinder:
530
489
- flawfinder_new_findings.txt
531
490
- flawfinder-all-vulnerabilities.html
532
491
- flawfinder-min-level5.json
533
-
492
+
534
493
mini-benchmark :
535
494
stage : test
536
- dependencies :
537
- - fedora
538
495
needs :
539
496
- fedora
540
497
script :
@@ -562,91 +519,25 @@ mini-benchmark:
562
519
metrics :
563
520
- metrics.txt
564
521
565
- cppcheck :
566
- stage : sast
567
- needs : []
568
- variables :
569
- GIT_STRATEGY : fetch
570
- GIT_SUBMODULE_STRATEGY : normal
571
- script :
572
- - yum install -y cppcheck diffutils
573
- # --template: use a single-line template
574
- # --force: check large directories without warning
575
- # -i<directory>: ignore this directory when scanning
576
- # -j: run multiple cppcheck threads
577
- # Use newline to escape colon in yaml
578
- - >
579
- cppcheck --template="{file}:{line}: {severity}: {message}" --force
580
- client dbug extra include libmariadb libmysqld libservices mysql-test mysys mysys_ssl pcre plugin
581
- strings tests unittest vio wsrep-lib sql sql-common storage
582
- -istorage/mroonga -istorage/tokudb -istorage/spider -istorage/rocksdb -iextra/ -ilibmariadb/ -istorage/columnstore
583
- --output-file=cppcheck.txt -j $(nproc)
584
- # Parallel jobs may output findings in an nondeterministic order. Sort to match ignorelist.
585
- - cat cppcheck.txt | sort > cppcheck_sorted.txt
586
- # Remove line numbers for diff
587
- - sed 's/:[^:]*:/:/' cppcheck_sorted.txt > cppcheck_sorted_no_line_numbers.txt
588
- # Only print new issues not found in ignore list
589
- - echo "Problems found in ignore list that were not discovered by cppcheck (may have been fixed)."
590
- - diff --changed-group-format='%>' --unchanged-group-format='' cppcheck_sorted_no_line_numbers.txt tests/code_quality/cppcheck_ignorelist.txt || true
591
- - echo "Problems found by cppcheck that were not in ignore list."
592
- - diff --changed-group-format='%<' --unchanged-group-format='' cppcheck_sorted_no_line_numbers.txt tests/code_quality/cppcheck_ignorelist.txt > lines_not_ignored.txt || true
593
- - cat lines_not_ignored.txt && test ! -s lines_not_ignored.txt
594
- artifacts :
595
- when : always
596
- paths :
597
- - cppcheck_sorted.txt
598
-
599
- flawfinder :
600
- stage : sast
601
- needs : []
602
- variables :
603
- GIT_STRATEGY : fetch
604
- GIT_SUBMODULE_STRATEGY : normal
605
- script :
606
- - yum install -y python3 python3-pip jq diffutils git
607
- - pip install flawfinder
608
- - flawfinder --falsepositive --quiet --html . > flawfinder-all-vulnerabilities.html
609
- - cat flawfinder-all-vulnerabilities.html | grep "Hits ="
610
- - flawfinder --falsepositive --quiet --minlevel=5 --sarif . > flawfinder-output.json
611
- # FlawFinder's --sarif output will display all vulnerabilities despite having --minlevel=5 specified.
612
- # Therefore, we postprocess the results with jq and filter out findings where the vulnerability level is less than 5.
613
- # Also in the SARIF output format, the vulnerabilities are ranked as 0.2/0.4/0.6/0.8/1.0 which correspond to the --minlevel=1/2/3/4/5 of FlawFinder.
614
- # Additionally, we sort the results because individual findings are consistent across different runs, but their ordering may not be.
615
- # Vulnerabilities can also be ignored in-line (/* Flawfinder: ignore */), but this option was chosen as to not clutter the codebase.
616
- - jq 'del(.runs[] | .tool | .driver | .rules) | del(.runs[] | .results[] | select(.rank < 1)) | del(.runs[] | .results[] | .locations[] | .physicalLocation | .region | .startLine) | .runs[0].results|=sort_by(.fingerprints)' flawfinder-output.json > flawfinder-min-level5.json
617
- # Diff against known vulnerabilities, but ignore the line number.
618
- - echo "Problems found in ignore list that were not discovered by flawfinder (may have been fixed)."
619
- - diff --changed-group-format='%>' --unchanged-group-format='' flawfinder-min-level5.json tests/code_quality/flawfinder_ignorelist.json || true
620
- - echo "Problems found by flawfinder that were not in ignore list."
621
- - diff --changed-group-format='%<' --unchanged-group-format='' flawfinder-min-level5.json tests/code_quality/flawfinder_ignorelist.json > lines_not_ignored.txt || true
622
- - cat lines_not_ignored.txt && test ! -s lines_not_ignored.txt
623
- artifacts :
624
- when : always
625
- paths :
626
- - flawfinder-all-vulnerabilities.html
627
- - flawfinder-min-level5.json
628
-
629
522
fedora upgrade-from :
630
523
stage : test
631
524
image : fedora:latest
632
525
variables :
633
526
GIT_STRATEGY : pull
634
- dependencies :
635
- - fedora
636
527
needs :
637
528
- fedora
638
529
parallel :
639
530
matrix :
640
531
# Get latest versions of all major versions
641
- - UPGRADE_PATH :
642
- - " 10.6>11.0 "
532
+ - UPGRADE_PATH :
533
+ - " 10.6>11.4 "
643
534
- " 10.3"
644
535
- " 10.4"
645
536
- " 10.4.8" # Test unexpected table rebuilds as in https://jira.mariadb.org/browse/MDEV-28727
646
537
- " 10.5"
647
538
- " 10.6"
648
539
- " 10.11"
649
- - " 11.0 "
540
+ - " 11.4 "
650
541
script :
651
542
- |
652
543
if [[ $UPGRADE_PATH == *">"* ]]; then
0 commit comments