-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild_orflow_v1rc1.py
executable file
·40 lines (32 loc) · 1.27 KB
/
build_orflow_v1rc1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env python3
import sys
import subprocess
import array as arr
import argparse
import os
import shlex
def which(pgm):
path=os.getenv('PATH')
for p in path.split(os.path.pathsep):
p=os.path.join(p,pgm)
if os.path.exists(p) and os.access(p,os.X_OK):
return p
def check_exists(pgm):
if which(pgm) == None:
print(pgm, "not on path")
def run_command_locally(command):
print("command=",command)
subprocess.run(shlex.split(command), check=True)
starting_dir = os.getcwd()
print("path to script=",os.path.dirname(os.path.realpath(__file__)))
print("starting_dir =",starting_dir)
run_command_locally("git clone --recursive --branch v1.0rc1 git@github.com:The-OpenROAD-Project-private/OpenROAD-flow-scripts.git")
run_command_locally("git clone --branch v1.0rc1 /home/zf4_projects/OpenROAD-guest/platforms/gf12.git")
#run_command_locally("git clone /home/zf4_projects/OpenROAD-guest/platforms/tsmc65lp.git")
run_command_locally("git clone git@github.com:The-OpenROAD-Project-private/private_tool_scripts.git")
os.chdir("OpenROAD-flow-scripts")
run_command_locally("./build_openroad.sh --latest --local --nice")
#run_command_locally("bash -c 'source ./setup_env.sh'")
check_exists("openroad")
check_exists("yosys")
check_exists("TritonRoute")