Skip to content

Commit

Permalink
Bump nuraft to latest HEAD.
Browse files Browse the repository at this point in the history
  • Loading branch information
szmyd committed May 7, 2024
1 parent 1124c03 commit 234477e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand Down
14 changes: 14 additions & 0 deletions 3rd_party/nuraft/conandata.yml
Original file line number Diff line number Diff line change
@@ -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"
12 changes: 6 additions & 6 deletions 3rd_party/nuraft/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@
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"


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"
Expand All @@ -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:
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 234477e

Please sign in to comment.