Unblock CI by updating git submodules directly in execution integration tests (#3479)

## Issue Addressed

Recent changes to the Nethermind codebase removed the `rocksdb` git submodule in favour of a `nuget` package.
This appears to have broken our ability to build the latest release of Nethermind inside our integration tests.

## Proposed Changes

~Temporarily pin the version used for the Nethermind integration tests to `master`. This ensures we use the packaged version of `rocksdb`. This is only necessary until a new release of Nethermind is available.~

Use `git submodule update --init --recursive` to ensure the required submodules are pulled before building.

Co-authored-by: Diva M <divma@protonmail.com>
This commit is contained in:
Mac L 2022-08-19 04:27:20 +00:00
parent c2604c47d6
commit 726d1b0d9b

View File

@ -20,7 +20,6 @@ pub fn clone_repo(repo_dir: &Path, repo_url: &str) -> Result<(), String> {
Command::new("git")
.arg("clone")
.arg(repo_url)
.arg("--recursive")
.current_dir(repo_dir)
.output()
.map_err(|_| format!("failed to clone repo at {repo_url}"))?,
@ -41,6 +40,21 @@ pub fn checkout(repo_dir: &Path, revision_or_branch: &str) -> Result<(), String>
)
})?,
|_| {},
)?;
output_to_result(
Command::new("git")
.arg("submodule")
.arg("update")
.arg("--init")
.arg("--recursive")
.current_dir(repo_dir)
.output()
.map_err(|_| {
format!(
"failed to update submodules on branch or revision at {repo_dir:?}/{revision_or_branch}",
)
})?,
|_| {},
)
}