diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b3496da..44002da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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", "12xlarge+amd"] timeout-minutes: 60 steps: diff --git a/src/paths.rs b/src/paths.rs index 46f6a54..541d1d3 100644 --- a/src/paths.rs +++ b/src/paths.rs @@ -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