From 726d1b0d9b6ace4cddcbd7efe22fc4ca5ae5a72d Mon Sep 17 00:00:00 2001 From: Mac L Date: Fri, 19 Aug 2022 04:27:20 +0000 Subject: [PATCH] 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 --- .../src/build_utils.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/testing/execution_engine_integration/src/build_utils.rs b/testing/execution_engine_integration/src/build_utils.rs index 966a3bfb4..15e7fdc0f 100644 --- a/testing/execution_engine_integration/src/build_utils.rs +++ b/testing/execution_engine_integration/src/build_utils.rs @@ -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}", + ) + })?, + |_| {}, ) }