@@ -99,22 +99,25 @@ def prepare(self):
9999 def submit (self , rtlil_path , * , dry_run = False , wait = False ):
100100 """Submit the design to the ChipFlow cloud builder.
101101 """
102- # Check for CHIPFLOW_API_KEY_SECRET or CHIPFLOW_API_KEY
103- if not os .environ .get ("CHIPFLOW_API_KEY" ) and not os .environ .get ("CHIPFLOW_API_KEY_SECRET" ):
104- raise ChipFlowError (
105- "Environment variable `CHIPFLOW_API_KEY` must be set to submit a design."
106- )
107- # Log a deprecation warning if CHIPFLOW_API_KEY_SECRET is used
108- if os .environ .get ("CHIPFLOW_API_KEY_SECRET" ):
109- logger .warning (
110- "Environment variable `CHIPFLOW_API_KEY_SECRET` is deprecated. "
111- "Please migrate to using `CHIPFLOW_API_KEY` instead."
112- )
113- chipflow_api_key = os .environ .get ("CHIPFLOW_API_KEY" ) or os .environ .get ("CHIPFLOW_API_KEY_SECRET" )
114- if chipflow_api_key is None :
115- raise ChipFlowError (
116- "Environment variable `CHIPFLOW_API_KEY` is empty."
117- )
102+ if not dry_run :
103+ # Check for CHIPFLOW_API_KEY_SECRET or CHIPFLOW_API_KEY
104+ if not os .environ .get ("CHIPFLOW_API_KEY" ) and not os .environ .get ("CHIPFLOW_API_KEY_SECRET" ):
105+ raise ChipFlowError (
106+ "Environment variable `CHIPFLOW_API_KEY` must be set to submit a design."
107+ )
108+ # Log a deprecation warning if CHIPFLOW_API_KEY_SECRET is used
109+ if os .environ .get ("CHIPFLOW_API_KEY_SECRET" ):
110+ logger .warning (
111+ "Environment variable `CHIPFLOW_API_KEY_SECRET` is deprecated. "
112+ "Please migrate to using `CHIPFLOW_API_KEY` instead."
113+ )
114+ chipflow_api_key = os .environ .get ("CHIPFLOW_API_KEY" ) or os .environ .get ("CHIPFLOW_API_KEY_SECRET" )
115+ if chipflow_api_key is None :
116+ raise ChipFlowError (
117+ "Environment variable `CHIPFLOW_API_KEY` is empty."
118+ )
119+
120+
118121 git_head = subprocess .check_output (
119122 ["git" , "-C" , os .environ ["CHIPFLOW_ROOT" ],
120123 "rev-parse" , "--short" , "HEAD" ],
0 commit comments