-
Notifications
You must be signed in to change notification settings - Fork 811
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
[Merged by Bors] - Fix broken Nethermind integration tests #4836
Changes from all commits
48a57c4
a05228f
57900aa
d743448
aee58b0
b83ed10
9e22c61
488f923
bc75adb
284d831
f44b9a5
e4b53a9
6fc4266
cce7ccf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -2,7 +2,7 @@ use crate::build_utils; | |||||||||||||
use crate::execution_engine::GenericExecutionEngine; | ||||||||||||||
use crate::genesis_json::nethermind_genesis_json; | ||||||||||||||
use std::env; | ||||||||||||||
use std::fs::File; | ||||||||||||||
use std::fs; | ||||||||||||||
use std::path::{Path, PathBuf}; | ||||||||||||||
use std::process::{Child, Command, Output}; | ||||||||||||||
use tempfile::TempDir; | ||||||||||||||
|
@@ -11,7 +11,7 @@ use unused_port::unused_tcp4_port; | |||||||||||||
/// We've pinned the Nethermind version since our method of using the `master` branch to | ||||||||||||||
/// find the latest tag isn't working. It appears Nethermind don't always tag on `master`. | ||||||||||||||
/// We should fix this so we always pull the latest version of Nethermind. | ||||||||||||||
const NETHERMIND_BRANCH: &str = "release/1.18.2"; | ||||||||||||||
const NETHERMIND_BRANCH: &str = "release/1.21.0"; | ||||||||||||||
const NETHERMIND_REPO_URL: &str = "https://github.com/NethermindEth/nethermind"; | ||||||||||||||
|
||||||||||||||
fn build_result(repo_dir: &Path) -> Output { | ||||||||||||||
|
@@ -47,6 +47,12 @@ pub fn build(execution_clients_dir: &Path) { | |||||||||||||
build_utils::check_command_output(build_result(&repo_dir), || { | ||||||||||||||
format!("nethermind build failed using release {last_release}") | ||||||||||||||
}); | ||||||||||||||
|
||||||||||||||
// Cleanup some disk space by removing nethermind's tests | ||||||||||||||
let tests_dir = execution_clients_dir.join("nethermind/src/tests"); | ||||||||||||||
if let Err(e) = fs::remove_dir_all(tests_dir) { | ||||||||||||||
eprintln!("Error while deleting folder: {}", e); | ||||||||||||||
} | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wow just realized these are 2.44 GB on my machine, perhaps we don't even need to clone them in the first place? I think we can optionally exclude submodule during checkout: lighthouse/testing/execution_engine_integration/src/build_utils.rs Lines 44 to 49 in aee58b0
|
||||||||||||||
} | ||||||||||||||
|
||||||||||||||
/* | ||||||||||||||
|
@@ -68,15 +74,16 @@ impl NethermindEngine { | |||||||||||||
.join("bin") | ||||||||||||||
.join("Release") | ||||||||||||||
.join("net7.0") | ||||||||||||||
.join("Nethermind.Runner") | ||||||||||||||
.join("linux-x64") | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this part of the path didn't exist on my machine, lets see if it exists on CI 🤞 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It no longer runs on macos though :( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. path on my machine: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm deleting it. I think maybe this was why the job was failing |
||||||||||||||
.join("nethermind") | ||||||||||||||
} | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
impl GenericExecutionEngine for NethermindEngine { | ||||||||||||||
fn init_datadir() -> TempDir { | ||||||||||||||
let datadir = TempDir::new().unwrap(); | ||||||||||||||
let genesis_json_path = datadir.path().join("genesis.json"); | ||||||||||||||
let mut file = File::create(genesis_json_path).unwrap(); | ||||||||||||||
let mut file = fs::File::create(genesis_json_path).unwrap(); | ||||||||||||||
let json = nethermind_genesis_json(); | ||||||||||||||
serde_json::to_writer(&mut file, &json).unwrap(); | ||||||||||||||
datadir | ||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just realized that we're one runner short of running the entire workflow in parallel after adding this one, it may be worth considering adding one more runner instance.