Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: cargo clippy --all-targets --all-features -- -D warnings

integration-test:
runs-on: ["self-hosted", "linux", "x64", "16xlarge+gpu"]
runs-on: ["self-hosted", "linux", "x64", "4xlarge+amd"]
timeout-minutes: 60

steps:
Expand Down
17 changes: 13 additions & 4 deletions src/paths.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
use std::path::PathBuf;

/// Returns the path to the foc-devnet home directory, e.g., ~/.foc-devnet
use tracing::info;

/// Returns the path to the foc-devnet home directory.
/// First checks for $FOC_DEVNET_BASEDIR environment variable.
/// If not set, defaults to ~/.foc-devnet
pub fn foc_devnet_home() -> PathBuf {
dirs::home_dir()
.unwrap_or_else(|| PathBuf::from("/tmp"))
.join(".foc-devnet")
if let Ok(base_dir) = std::env::var("FOC_DEVNET_BASEDIR") {
info!("Using FOC_DEVNET_BASEDIR from environment: {}", base_dir);
PathBuf::from(base_dir)
} else {
dirs::home_dir()
.unwrap_or_else(|| PathBuf::from("/tmp"))
.join(".foc-devnet")
}
}

/// Returns the path to the foc-devnet logs directory, e.g., ~/.foc-devnet/logs
Expand Down
Loading