From 234477e7f2eac793dc3a76fc403559b0483cf50c Mon Sep 17 00:00:00 2001 From: Brian Szmyd Date: Tue, 7 May 2024 09:52:38 -0700 Subject: [PATCH] Bump nuraft to latest HEAD. --- .github/workflows/build_dependencies.yml | 2 +- 3rd_party/nuraft/conandata.yml | 14 ++++++++++++++ 3rd_party/nuraft/conanfile.py | 12 ++++++------ conanfile.py | 2 +- 4 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 3rd_party/nuraft/conandata.yml diff --git a/.github/workflows/build_dependencies.yml b/.github/workflows/build_dependencies.yml index 83fd5e3..21ef6f3 100644 --- a/.github/workflows/build_dependencies.yml +++ b/.github/workflows/build_dependencies.yml @@ -130,7 +130,7 @@ jobs: - name: Export Recipes run: | conan export import/sisl oss/master - conan export 3rd_party/nuraft + conan export 3rd_party/nuraft nuraft/2.4.0@ cached_pkgs=$(ls -1d ~/.conan/data/*/*/*/*/package | sed 's,.*data/,,' | cut -d'/' -f1,2 | paste -sd',' - -) echo "::info:: Pre-cached: ${cached_pkgs}" if: ${{ inputs.testing == 'True' || steps.restore-cache.outputs.cache-hit != 'true' }} diff --git a/3rd_party/nuraft/conandata.yml b/3rd_party/nuraft/conandata.yml new file mode 100644 index 0000000..2d93edf --- /dev/null +++ b/3rd_party/nuraft/conandata.yml @@ -0,0 +1,14 @@ +sources: + "2.4.0": + url: "https://github.com/eBay/nuraft/archive/929132f5a0e86ab3070055c63b485a512f82bcb0.tar.gz" + "2.3.0": + url: "https://github.com/eBay/nuraft/archive/f42b12c3ec9f20a085de61e1294e8167fa747c7d.tar.gz" +patches: + "2.4.0": + - patch_file: "patches/patch.diff" + patch_description: "Dependency discovery" + patch_type: "conan" + "2.3.0": + - patch_file: "patches/patch.diff" + patch_description: "Dependency discovery" + patch_type: "conan" diff --git a/3rd_party/nuraft/conanfile.py b/3rd_party/nuraft/conanfile.py index 28437f4..5f389c6 100644 --- a/3rd_party/nuraft/conanfile.py +++ b/3rd_party/nuraft/conanfile.py @@ -2,7 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import patch, copy, get +from conan.tools.files import patch, copy, get, export_conandata_patches import os required_conan_version = ">=1.53.0" @@ -10,12 +10,11 @@ class NuRaftConan(ConanFile): name = "nuraft" - homepage = "https://github.corp.ebay.com/sds/NuRaft" + homepage = "https://github.com/eBay/nuraft" description = """Cornerstone based RAFT library.""" topics = ("raft",) - url = "https://github.com/conan-io/conan-center-index" + url = "https://github.com/eBay/nuraft" license = "Apache-2.0" - version = "2.3.0" package_type = "library" settings = "os", "arch", "compiler", "build_type" @@ -30,7 +29,8 @@ class NuRaftConan(ConanFile): "asio": "boost", } - exports_sources = "patches/*" + def export_sources(self): + export_conandata_patches(self) def configure(self): if self.options.shared: @@ -55,7 +55,7 @@ def validate(self): check_min_cppstd(self, 11) def source(self): - get(self, "https://github.com/eBay/nuraft/archive/f42b12c3ec9f20a085de61e1294e8167fa747c7d.tar.gz", strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) diff --git a/conanfile.py b/conanfile.py index 19243e7..37a24af 100644 --- a/conanfile.py +++ b/conanfile.py @@ -67,7 +67,7 @@ def build_requirements(self): def requirements(self): self.requires("boost/1.83.0", transitive_headers=True) self.requires("sisl/[~12.2, include_prerelease=True]@oss/master", transitive_headers=True) - self.requires("nuraft/2.3.0", transitive_headers=True) + self.requires("nuraft/2.4.0", transitive_headers=True) def layout(self): cmake_layout(self)