mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-01 11:32:10 +00:00
Compare commits
12 Commits
dependabot
...
a1q123456/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1e7fdf329 | ||
|
|
3add486782 | ||
|
|
39b208f902 | ||
|
|
436b18ff82 | ||
|
|
1c812e4b9d | ||
|
|
af5417d772 | ||
|
|
5d5124010c | ||
|
|
52b79e3ab6 | ||
|
|
81c896cc3c | ||
|
|
27da3fd0ad | ||
|
|
365a829d4d | ||
|
|
69aadde85c |
6
.github/actions/build-deps/action.yml
vendored
6
.github/actions/build-deps/action.yml
vendored
@@ -22,6 +22,10 @@ inputs:
|
||||
description: "The sanitizers to enable."
|
||||
required: false
|
||||
default: ""
|
||||
compiler_version:
|
||||
description: "Override the Conan compiler.version (e.g. msvc '194' or '195'). Leave empty to auto-detect."
|
||||
required: false
|
||||
default: ""
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
@@ -34,9 +38,11 @@ runs:
|
||||
BUILD_TYPE: ${{ inputs.build_type }}
|
||||
LOG_VERBOSITY: ${{ inputs.log_verbosity }}
|
||||
SANITIZERS: ${{ inputs.sanitizers }}
|
||||
COMPILER_VERSION_SETTING: ${{ inputs.compiler_version != '' && format('--settings:all compiler.version={0}', inputs.compiler_version) || '' }}
|
||||
run: |
|
||||
conan install \
|
||||
--profile:all ci \
|
||||
${COMPILER_VERSION_SETTING} \
|
||||
--build="${BUILD_OPTION}" \
|
||||
--options:host='&:tests=True' \
|
||||
--options:host='&:xrpld=True' \
|
||||
|
||||
41
.github/scripts/strategy-matrix/generate.py
vendored
41
.github/scripts/strategy-matrix/generate.py
vendored
@@ -102,6 +102,23 @@ class PlatformConfig:
|
||||
self.build_type = [self.build_type]
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class Toolset:
|
||||
"""One entry in windows.json's 'toolsets' array (Windows only).
|
||||
|
||||
Each toolset selects a Visual Studio version: the CMake generator drives
|
||||
the configure step, and compiler_version pins the matching Conan msvc
|
||||
toolset so dependencies are built against the same compiler.
|
||||
"""
|
||||
|
||||
name: str # short config-name suffix, e.g. "vs2022"
|
||||
generator: str # CMake generator, e.g. "Visual Studio 17 2022"
|
||||
compiler_version: str = "" # Conan msvc compiler.version, e.g. "194"
|
||||
# If true, the toolset is skipped entirely. Useful to disable a toolset
|
||||
# until the runners have the matching Visual Studio version installed.
|
||||
exclude: bool = False
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
class PlatformFile:
|
||||
"""Shape of macos.json and windows.json."""
|
||||
@@ -109,6 +126,7 @@ class PlatformFile:
|
||||
platform: str # e.g. "macos/arm64" or "windows/amd64"
|
||||
runner: list[str] # GitHub Actions runner labels
|
||||
configs: list[PlatformConfig]
|
||||
toolsets: list[Toolset] = dataclasses.field(default_factory=list)
|
||||
|
||||
@classmethod
|
||||
def load(cls, path: Path) -> "PlatformFile":
|
||||
@@ -117,6 +135,7 @@ class PlatformFile:
|
||||
platform=data["platform"],
|
||||
runner=data["runner"],
|
||||
configs=[PlatformConfig(**c) for c in data["configs"]],
|
||||
toolsets=[Toolset(**t) for t in data.get("toolsets", [])],
|
||||
)
|
||||
|
||||
|
||||
@@ -144,6 +163,8 @@ class MatrixEntry:
|
||||
sanitizers: str
|
||||
image: str = "" # container image; empty for macOS/Windows (runs natively)
|
||||
compiler: str = "" # compiler name ("gcc" or "clang"); empty for macOS/Windows
|
||||
generator: str = "Ninja" # CMake generator; defaults to Ninja (Linux/macOS)
|
||||
compiler_version: str = "" # Conan MSVC compiler.version; empty auto-detects
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
@@ -247,25 +268,39 @@ def expand_platform_matrix(
|
||||
) -> list[MatrixEntry]:
|
||||
"""Expand a PlatformFile (macOS or Windows) into matrix entries.
|
||||
|
||||
Configs that exclude the current event are skipped.
|
||||
Configs that exclude the current event are skipped, as are toolsets that
|
||||
are marked as excluded.
|
||||
|
||||
When toolsets are defined (Windows), the configs are expanded over the
|
||||
cross-product with the toolsets so each config is built against every
|
||||
Visual Studio version. Platforms without toolsets (macOS) use a single
|
||||
implicit toolset that builds with the Ninja generator.
|
||||
"""
|
||||
platform_name, arch = pf.platform.split("/")
|
||||
is_windows = platform_name == "windows"
|
||||
|
||||
active_toolsets = [t for t in pf.toolsets if not t.exclude] if pf.toolsets else []
|
||||
toolsets = (
|
||||
active_toolsets if active_toolsets else [Toolset(name="", generator="Ninja")]
|
||||
)
|
||||
|
||||
entries: list[MatrixEntry] = []
|
||||
for cfg in pf.configs:
|
||||
for toolset, cfg in itertools.product(toolsets, pf.configs):
|
||||
if not runs_on_event(cfg.exclude_event_types, event):
|
||||
continue
|
||||
for build_type in cfg.build_type:
|
||||
name_parts = [platform_name, arch, toolset.name, build_type.lower()]
|
||||
entries.append(
|
||||
MatrixEntry(
|
||||
config_name=f"{platform_name}-{arch}-{build_type.lower()}",
|
||||
config_name="-".join(p for p in name_parts if p),
|
||||
cmake_args=get_cmake_args(build_type, cfg.extra_cmake_args),
|
||||
cmake_target="install" if is_windows else "all",
|
||||
build_only=cfg.build_only,
|
||||
build_type=build_type,
|
||||
architecture=Architecture(platform=pf.platform, runner=pf.runner),
|
||||
sanitizers="",
|
||||
generator=toolset.generator,
|
||||
compiler_version=toolset.compiler_version,
|
||||
)
|
||||
)
|
||||
return entries
|
||||
|
||||
13
.github/scripts/strategy-matrix/windows.json
vendored
13
.github/scripts/strategy-matrix/windows.json
vendored
@@ -1,6 +1,19 @@
|
||||
{
|
||||
"platform": "windows/amd64",
|
||||
"runner": ["self-hosted", "Windows", "devbox"],
|
||||
"toolsets": [
|
||||
{
|
||||
"name": "vs2022",
|
||||
"generator": "Visual Studio 17 2022",
|
||||
"compiler_version": "194"
|
||||
},
|
||||
{
|
||||
"name": "vs2026",
|
||||
"generator": "Visual Studio 18 2026",
|
||||
"compiler_version": "195",
|
||||
"exclude": true
|
||||
}
|
||||
],
|
||||
"configs": [
|
||||
{ "build_type": "Release" },
|
||||
{
|
||||
|
||||
15
.github/workflows/reusable-build-test-config.yml
vendored
15
.github/workflows/reusable-build-test-config.yml
vendored
@@ -63,6 +63,17 @@ on:
|
||||
type: string
|
||||
default: ""
|
||||
|
||||
generator:
|
||||
description: "The CMake generator to use (Linux/macOS use Ninja)."
|
||||
required: true
|
||||
type: string
|
||||
|
||||
compiler_version:
|
||||
description: "Override the Conan compiler.version (Windows Visual Studio toolset). Leave empty to auto-detect."
|
||||
required: false
|
||||
type: string
|
||||
default: ""
|
||||
|
||||
secrets:
|
||||
CODECOV_TOKEN:
|
||||
description: "The Codecov token to use for uploading coverage reports."
|
||||
@@ -150,15 +161,17 @@ jobs:
|
||||
# amount of logs. For other OSes, the "verbose" logs are more useful.
|
||||
log_verbosity: ${{ runner.os == 'Windows' && 'quiet' || 'verbose' }}
|
||||
sanitizers: ${{ inputs.sanitizers }}
|
||||
compiler_version: ${{ inputs.compiler_version }}
|
||||
|
||||
- name: Configure CMake
|
||||
working-directory: ${{ env.BUILD_DIR }}
|
||||
env:
|
||||
BUILD_TYPE: ${{ inputs.build_type }}
|
||||
CMAKE_ARGS: ${{ inputs.cmake_args }}
|
||||
GENERATOR: ${{ inputs.generator }}
|
||||
run: |
|
||||
cmake \
|
||||
-G '${{ runner.os == 'Windows' && 'Visual Studio 17 2022' || 'Ninja' }}' \
|
||||
-G "$GENERATOR" \
|
||||
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
|
||||
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
|
||||
${CMAKE_ARGS} \
|
||||
|
||||
2
.github/workflows/reusable-build-test.yml
vendored
2
.github/workflows/reusable-build-test.yml
vendored
@@ -50,5 +50,7 @@ jobs:
|
||||
config_name: ${{ matrix.config_name }}
|
||||
sanitizers: ${{ matrix.sanitizers }}
|
||||
compiler: ${{ matrix.compiler || '' }}
|
||||
generator: ${{ matrix.generator }}
|
||||
compiler_version: ${{ matrix.compiler_version || '' }}
|
||||
secrets:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
1
.github/workflows/upload-conan-deps.yml
vendored
1
.github/workflows/upload-conan-deps.yml
vendored
@@ -105,6 +105,7 @@ jobs:
|
||||
# amount of logs. For other OSes, the "verbose" logs are more useful.
|
||||
log_verbosity: ${{ runner.os == 'Windows' && 'quiet' || 'verbose' }}
|
||||
sanitizers: ${{ matrix.sanitizers }}
|
||||
compiler_version: ${{ matrix.compiler_version || '' }}
|
||||
|
||||
- name: Log into Conan remote
|
||||
if: ${{ github.repository == 'XRPLF/rippled' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') }}
|
||||
|
||||
Reference in New Issue
Block a user