Skip to content
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

Update setuputils to deduce cugraph minor/major version from cmakelists to allow dynamic pinning of RAFT #4

Merged
Merged
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
3 changes: 2 additions & 1 deletion cpp/cmake/thirdparty/get_raft.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,14 @@ function(find_and_configure_raft)
endfunction()

set(CUGRAPH_MIN_VERSION_raft "${CUGRAPH_VERSION_MAJOR}.${CUGRAPH_VERSION_MINOR}.00")
set(CUGRAPH_BRANCH_VERSION_raft "${CUGRAPH_VERSION_MAJOR}.${CUGRAPH_VERSION_MINOR}")


# Change pinned tag and fork here to test a commit in CI
# To use a different RAFT locally, set the CMake variable
# RPM_raft_SOURCE=/path/to/local/raft
find_and_configure_raft(VERSION ${CUGRAPH_MIN_VERSION_raft}
FORK rapidsai
PINNED_TAG branch-21.06
PINNED_TAG branch-${CUGRAPH_BRANCH_VERSION_raft}
)

10 changes: 10 additions & 0 deletions python/setuputils.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,16 @@ def get_repo_cmake_info(names, file_path):
tag = re.findall(r'\s.*PINNED_TAG.*', s)
tag = tag[-1].split()[-1]
results[name] = [repo, tag]
if tag == 'branch-${CUGRAPH_BRANCH_VERSION_raft}':
loc = _get_repo_path() + '/cpp/CMakeLists.txt'
with open(loc) as f:
cmakelists = f.read()
tag = re.findall(r'\s.*project\(CUGRAPH VERSION.*', cmakelists)
print(tag)
tag = tag[-1].split()[2].split('.')
tag = 'branch-{}.{}'.format(tag[0], tag[1])

results[name] = [repo, tag]

return results

Expand Down