Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions configuration/builders/definitions/connectors/conodbc.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
deb_pkg_tests,
get_source_package,
git_clone_sq,
macos,
rpm,
rpm_pkg_tests,
save_packages,
Expand Down Expand Up @@ -271,3 +272,8 @@ def generate_deb_release_sq(ops, version):
get_source_from_git=True,
),
)

MACOS_BUILDER = GenericBuilder(
name="codbc-aarch64-macos",
sequences=[macos(jobs=util.Property("jobs"))],
)
71 changes: 71 additions & 0 deletions configuration/builders/sequences/connectors/conodbc.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,3 +805,74 @@ def save_packages(config: DockerConfig, packages: list[str], user: str = "buildb
)
)
return sequence


def macos(jobs: int):
sequence = BuildSequence()
sequence.add_step(ShellStep(command=PrintEnvironmentDetails()))

sequence.add_step(git_clone_step())

sequence.add_step(
ShellStep(
command=ConfigureMariaDBCMake(
name="RelWithDebugInfo",
cmake_generator=CMakeGenerator(
flags=[
CMakeOption(CMAKE.BUILD_TYPE, BuildType.RELWITHDEBUG),
CMakeOption(WITH.OPENSSL, True),
CMakeOption(WITH.SIGNCODE, False),
CMakeOption(WITH.EXTERNAL_ZLIB, True),
CMakeOption(OTHER.CONC_WITH_UNIT_TESTS, False),
CMakeOption(
OTHER.ODBC_INCLUDE_DIR, "/opt/homebrew/opt/libiodbc/include"
),
CMakeOption(
OTHER.ODBC_LIB_DIR, "/opt/homebrew/opt/libiodbc/lib"
),
],
),
),
options=StepOptions(
description="Configure CMake",
descriptionDone="CMake configured",
),
),
)

sequence.add_step(
ShellStep(
command=CompileCMakeCommand(
jobs=jobs,
config=BuildType.RELWITHDEBUG,
),
options=StepOptions(
description="Build package",
descriptionDone="Package built",
),
),
)

sequence.add_step(
ShellStep(
command=BashCommand(
name="ODBC ctest",
cmd="export TEST_DRIVER=$(find $(pwd) -name 'libmaodbc.dylib' -maxdepth 2 -print -quit) && cd test && ctest --output-on-failure",
),
env_vars=[
("ODBCINI", "odbc.ini"),
("ODBCINSTINI", "odbcinst.ini"),
("TEST_UID", "root"),
("TEST_PASSWORD", "test"),
("TEST_PORT", "3306"),
("TEST_SCHEMA", "test"),
("TEST_DSN", "maodbc_test"),
("TEST_SOCKET", ""),
],
options=StepOptions(
description="Run ODBC ctest",
descriptionDone="ODBC ctest done",
),
),
)
return sequence
2 changes: 1 addition & 1 deletion configuration/schedulers/connectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
for builder in builders
)
]
+ [odbc_builders.UBASAN_BUILDER.name],
+ [odbc_builders.UBASAN_BUILDER.name, odbc_builders.MACOS_BUILDER.name],
),
]

Expand Down
8 changes: 8 additions & 0 deletions configuration/steps/commands/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from buildbot.plugins import util
from configuration.steps.commands.base import Command
from configuration.steps.generators.cmake.options import BuildType


class MAKE(Enum):
Expand Down Expand Up @@ -72,6 +73,8 @@ class CompileCMakeCommand(Command):
builddir (str): The directory where the build files are located.
verbose (bool): Whether to enable verbose output.
workdir (PurePath): The working directory for the command.
target (MAKE): The Make target to build.
config (BuildType): The build configuration type.
"""

def __init__(
Expand All @@ -81,6 +84,7 @@ def __init__(
verbose: bool = False,
workdir: PurePath = PurePath("."),
target: MAKE = None,
config: BuildType = None,
):
self.verbose = verbose
self.builddir = builddir
Expand All @@ -89,6 +93,7 @@ def __init__(
super().__init__(
name=f"Compile {target.value if target else ''}", workdir=workdir
)
self.config = config

def as_cmd_arg(self) -> list[str]:
r_list = [
Expand All @@ -103,6 +108,9 @@ def as_cmd_arg(self) -> list[str]:
if self.target:
r_list.append("--target")
r_list.append(self.target.value)
if self.config:
r_list.append("--config")
r_list.append(self.config.value)
return r_list


Expand Down
4 changes: 4 additions & 0 deletions configuration/steps/generators/cmake/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ class WITH(StrEnum):
WSREP = "WSREP"
ZLIB = "ZLIB"
OPENSSL = "OPENSSL"
SIGNCODE = "SIGNCODE"
EXTERNAL_ZLIB = "EXTERNAL_ZLIB"

def __str__(self):
return f"WITH_{self.value}"
Expand Down Expand Up @@ -137,6 +139,8 @@ class OTHER(StrEnum):
CPACK_GENERATOR = "CPACK_GENERATOR"
MARIADB_LINK_DYNAMIC = "MARIADB_LINK_DYNAMIC"
USE_SYSTEM_INSTALLED_LIB = "USE_SYSTEM_INSTALLED_LIB"
ODBC_INCLUDE_DIR = "ODBC_INCLUDE_DIR"
ODBC_LIB_DIR = "ODBC_LIB_DIR"


# Flag values use CapitalCase
Expand Down
9 changes: 9 additions & 0 deletions master-migration/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,15 @@ c["builders"].append(
)
)

# Connector/ODBC macOS builder
c["builders"].append(
conc_odbc_builders.MACOS_BUILDER.get_config(
workers=WORKER_POOL.get_workers_for_arch(arch="aarch64", names=["bbw3-mac"]),
tags=["connector", "odbc", "macos"],
jobs=1,
)
)

## ------------------------------------------------------------------- ##
## REPORTERS ##
## ------------------------------------------------------------------- ##
Expand Down