-
Notifications
You must be signed in to change notification settings - Fork 27
MDBF-1214: Connector C builders #964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
RazvanLiviuVarzaru
wants to merge
7
commits into
MariaDB:dev
Choose a base branch
from
RazvanLiviuVarzaru:MDBF-1214
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c0d99d4
MDBF-1214: Connector C builders
RazvanLiviuVarzaru 1e58c03
to squash 1
RazvanLiviuVarzaru 0a7603a
to squash 2
RazvanLiviuVarzaru 69be4f9
to squash 3
RazvanLiviuVarzaru 7f82be7
to squash 4
RazvanLiviuVarzaru 90b7b32
to squash 5
RazvanLiviuVarzaru b09d02b
to squash 6
RazvanLiviuVarzaru File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,201 @@ | ||
| import os | ||
| from pathlib import PurePath | ||
|
|
||
| from buildbot.plugins import util | ||
| from configuration.builders.base import GenericBuilder | ||
| from configuration.builders.sequences.connectors.conc import deb, rpm, tarball | ||
| from configuration.builders.common import docker_config | ||
| from configuration.builders.infra.runtime import DockerConfig, Sidecar | ||
| from configuration.builders.sequences.connectors.conc import ( | ||
| bintar, | ||
| get_source_package, | ||
| git_clone_sq, | ||
| save_packages, | ||
| tarball, | ||
| windows, | ||
| ) | ||
|
|
||
| PACKAGES_DIR = f"{os.environ['CONNECTORS_PACKAGES_DIR']}/c" | ||
| BUILD_BASE_PATH = "build" | ||
| BINTAR_PATH = f"{BUILD_BASE_PATH}/bintar" | ||
| SOURCE_PATH = f"{BUILD_BASE_PATH}/source" | ||
| BINTAR_PACKAGES_TO_SAVE = [f"{BINTAR_PATH}/*.tar.gz"] | ||
|
|
||
|
|
||
| # MariaDB Server used for C/C++ tests | ||
| SIDECAR = Sidecar( | ||
| repository="docker.io/library/", | ||
| image_tag="mariadb:lts", | ||
| env_vars=[("MARIADB_ROOT_PASSWORD", "test"), ("MARIADB_DATABASE", "test")], | ||
| tmpfs=PurePath("/var/lib/mysql"), | ||
| ) | ||
|
|
||
|
|
||
| TARBALL = GenericBuilder( | ||
| name="cc-tarball-docker", | ||
| sequences=[ | ||
| tarball( | ||
| config=docker_config( | ||
| image="debian13", | ||
| packages_dir=PACKAGES_DIR, | ||
| artifacts_url=f"{os.environ['ARTIFACTS_URL']}/connector-c/", | ||
| ), | ||
| ) | ||
| ], | ||
| ) | ||
|
|
||
|
|
||
| def generate_bintar_sqs( | ||
| ops, | ||
| version, | ||
| build_environment: DockerConfig = None, | ||
| upload_packages_to_ci=True, | ||
| get_source_from_git=False, | ||
| with_asan_ubsan=False, | ||
| with_msan=False, | ||
| ): | ||
| if not build_environment: | ||
| build_environment = docker_config( | ||
| image=f"{ops}{version}", | ||
| packages_dir=PACKAGES_DIR, | ||
| artifacts_url=f"{os.environ['ARTIFACTS_URL']}/connector-c/", | ||
| ) | ||
|
|
||
| alma_linux_environment = None | ||
| rockylinux_environment = None | ||
| if ops == "rhel": | ||
| alma_linux_environment = DockerConfig( | ||
| repository="docker.io/library/", | ||
| image_tag=f"almalinux:{version}", | ||
| ) | ||
| rockylinux_environment = DockerConfig( | ||
| repository="rockylinux/", | ||
| image_tag=f"rockylinux:{version}", | ||
| ) | ||
|
|
||
| test_environments = [ | ||
| build_environment, | ||
| alma_linux_environment, | ||
| rockylinux_environment, | ||
| ] | ||
|
|
||
| source_sq = [ | ||
| get_source_package( | ||
| config=build_environment, | ||
| source_path=SOURCE_PATH, | ||
| ), | ||
| ] | ||
|
|
||
| if get_source_from_git: | ||
| source_sq = [ | ||
| git_clone_sq( | ||
| config=build_environment, | ||
| source_path=SOURCE_PATH, | ||
| ) | ||
| ] | ||
|
|
||
| return ( | ||
| source_sq | ||
| + [ | ||
| bintar( | ||
| config=build_environment, | ||
| test_environments=test_environments, | ||
| source_path=SOURCE_PATH, | ||
| bintar_path=BINTAR_PATH, | ||
| package_platform_suffix=f"{ops}{version}", | ||
| jobs=util.Property("jobs"), | ||
| with_asan_ubsan=with_asan_ubsan, | ||
| with_msan=with_msan, | ||
| ), | ||
| ] | ||
| + ( | ||
| [ | ||
| save_packages( | ||
| packages=BINTAR_PACKAGES_TO_SAVE, | ||
| config=build_environment, | ||
| ) | ||
| ] | ||
| if upload_packages_to_ci | ||
| else [] | ||
| ) | ||
| ) | ||
|
|
||
|
|
||
| TARBALL = GenericBuilder(name="cc-tarball-docker", sequences=[tarball()]) | ||
| RELEASE_BUILDERS_BY_ARCH = {"amd64": [], "aarch64": []} | ||
| for arch in ["amd64", "aarch64"]: | ||
| for ops, version in [ | ||
| ("fedora", "43"), | ||
| ("fedora", "44"), | ||
| ("sles", "1507"), | ||
| ("sles", "1600"), | ||
| ("rhel", "8"), | ||
| ("rhel", "9"), | ||
| ("rhel", "10"), | ||
| ]: | ||
| if ops == "sles" and arch != "amd64": | ||
| continue | ||
| builder = GenericBuilder( | ||
| name=f"cc-{arch}-{ops}-{version}", | ||
| sidecar=SIDECAR, | ||
| sequences=generate_bintar_sqs(ops=ops, version=version), | ||
| ) | ||
| RELEASE_BUILDERS_BY_ARCH[arch].append(builder) | ||
|
|
||
| for ops, version in [ | ||
| ("debian", "11"), | ||
| ("debian", "12"), | ||
| ("debian", "13"), | ||
| ("ubuntu", "22.04"), | ||
| ("ubuntu", "24.04"), | ||
| ("ubuntu", "26.04"), | ||
| ]: | ||
| builder = GenericBuilder( | ||
| name=f"cc-{arch}-{ops}-{version}", | ||
| sidecar=SIDECAR, | ||
| sequences=generate_bintar_sqs(ops=ops, version=version), | ||
| ) | ||
| RELEASE_BUILDERS_BY_ARCH[arch].append(builder) | ||
|
|
||
| # UBASAN_BUILDER = GenericBuilder( | ||
| # name="cc-debian-13-ubasan-clang-22", | ||
| # sidecar=SIDECAR, | ||
| # sequences=generate_bintar_sqs( | ||
| # build_environment=docker_config( | ||
| # image="debian13-msan-clang-22", | ||
| # artifacts_url=f"{os.environ['ARTIFACTS_URL']}/connector-c/", | ||
| # ), | ||
| # ops="debian", | ||
| # version="13", | ||
| # upload_packages_to_ci=False, | ||
| # with_asan_ubsan=True, | ||
| # get_source_from_git=True, | ||
| # ), | ||
| # ) | ||
|
|
||
| WINDOWS_64_BUILDER = GenericBuilder( | ||
| name="cc-amd64-windows", | ||
| sequences=[ | ||
| windows(jobs=util.Property("jobs"), target_platform="64-bit"), | ||
| ], | ||
| ) | ||
|
|
||
| WINDOWS_32_BUILDER = GenericBuilder( | ||
| name="cc-x86-windows", | ||
| sequences=[ | ||
| windows(jobs=util.Property("jobs"), target_platform="32-bit"), | ||
| ], | ||
| ) | ||
|
|
||
| # MSAN_BUILDER = GenericBuilder( | ||
| # name="cc-debian-13-msan-clang-22", | ||
| # sidecar=SIDECAR, | ||
| # sequences=generate_bintar_sqs( | ||
| # build_environment=docker_config( | ||
| # image="debian13-msan-clang-22", | ||
| # artifacts_url=f"{os.environ['ARTIFACTS_URL']}/connector-c/", | ||
| # ), | ||
| # with_msan=True, | ||
| # ops="debian", | ||
| # version="13", | ||
| # upload_packages_to_ci=False, | ||
| # ), | ||
| # ) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you want to build/test amd64v3 like server MDBF-1156/ #922?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
win asan and v3 not in plan for this current iteration. I must ask Georg/Lawrin if they need this kind of extended coverage.