mirror of
https://github.com/TinyTapeout/tt-support-tools.git
synced 2026-11-03 04:36:09 +01:00
fix: missing commit_id.json in openlane2 projects
This commit is contained in:
+10
-1
@@ -400,6 +400,12 @@ class Project():
|
|||||||
tt_version = self.get_tt_tools_version()
|
tt_version = self.get_tt_tools_version()
|
||||||
workflow_url = self.get_workflow_url()
|
workflow_url = self.get_workflow_url()
|
||||||
|
|
||||||
|
if self.args.openlane2:
|
||||||
|
if not os.path.exists('runs/wokwi'):
|
||||||
|
print("OpenLane 2 harden not supported yet, please run OpenLane 2 manually")
|
||||||
|
exit(1)
|
||||||
|
print("Writing commit information on top of the existing OpenLane 2 run (runs/wokwi)")
|
||||||
|
else:
|
||||||
# requires PDK, PDK_ROOT, OPENLANE_ROOT & OPENLANE_IMAGE_NAME to be set in local environment
|
# requires PDK, PDK_ROOT, OPENLANE_ROOT & OPENLANE_IMAGE_NAME to be set in local environment
|
||||||
harden_cmd = 'docker run --rm -v $OPENLANE_ROOT:/openlane -v $PDK_ROOT:$PDK_ROOT -v $(pwd):/work -e PDK=$PDK -e PDK_ROOT=$PDK_ROOT -u $(id -u $USER):$(id -g $USER) $OPENLANE_IMAGE_NAME /bin/bash -c "./flow.tcl -overwrite -design /work/src -run_path /work/runs -tag wokwi"'
|
harden_cmd = 'docker run --rm -v $OPENLANE_ROOT:/openlane -v $PDK_ROOT:$PDK_ROOT -v $(pwd):/work -e PDK=$PDK -e PDK_ROOT=$PDK_ROOT -u $(id -u $USER):$(id -g $USER) $OPENLANE_IMAGE_NAME /bin/bash -c "./flow.tcl -overwrite -design /work/src -run_path /work/runs -tag wokwi"'
|
||||||
logging.debug(harden_cmd)
|
logging.debug(harden_cmd)
|
||||||
@@ -410,7 +416,10 @@ class Project():
|
|||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
# Write commit information
|
# Write commit information
|
||||||
with open(os.path.join(self.local_dir, 'runs/wokwi/results/final/commit_id.json'), 'w') as f:
|
commit_id_json_path = 'runs/wokwi/results/final/commit_id.json'
|
||||||
|
if self.args.openlane2:
|
||||||
|
commit_id_json_path = 'runs/wokwi/final/commit_id.json'
|
||||||
|
with open(os.path.join(self.local_dir, commit_id_json_path), 'w') as f:
|
||||||
json.dump({
|
json.dump({
|
||||||
"app": f"Tiny Tapeout {tt_version}",
|
"app": f"Tiny Tapeout {tt_version}",
|
||||||
"repo": repo,
|
"repo": repo,
|
||||||
|
|||||||
Reference in New Issue
Block a user