From 814e07dffe48f06fcf3d43debcfd9963cd64eb2d Mon Sep 17 00:00:00 2001 From: drbh Date: Tue, 21 May 2024 21:43:25 +0000 Subject: [PATCH] fix: build proto in CI and avoid rate limit in client test --- router/client/build.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/router/client/build.rs b/router/client/build.rs index 5d415b5b..e7167273 100644 --- a/router/client/build.rs +++ b/router/client/build.rs @@ -2,8 +2,9 @@ use std::fs; fn main() -> Result<(), Box> { println!("cargo:rerun-if-changed=../../proto/generate.proto"); - // TODO: avoid this when building python library? - if false { + // conditionally compile proto files (avoid when bundling python package) + let skip_build = std::env::var("SKIP_BUILD").is_ok(); + if skip_build { fs::create_dir("src/pb").unwrap_or(()); let mut config = prost_build::Config::new();