Fix PR issues [ci skip]
This commit is contained in:
parent
21928f7e8d
commit
a336720520
|
@ -12,6 +12,9 @@ from ci_variables import ci_env
|
|||
def run_agfi_buildbitstream():
|
||||
""" Runs AGFI buildbitstream"""
|
||||
|
||||
relative_hwdb_path = f"deploy/sample-backup-configs/sample_config_hwdb.yaml"
|
||||
relative_build_path = f"deploy/sample-backup-configs/sample_config_build.yaml"
|
||||
|
||||
with prefix(f'cd {manager_fsim_dir} && source sourceme-f1-manager.sh'):
|
||||
rc = 0
|
||||
|
||||
|
@ -27,11 +30,14 @@ def run_agfi_buildbitstream():
|
|||
sys.exit(rc)
|
||||
else:
|
||||
# parse the output yamls, replace the sample hwdb's agfi line only
|
||||
sample_hwdb_filename = f"{manager_fsim_dir}/deploy/sample-backup-configs/sample_config_hwdb.yaml"
|
||||
sample_hwdb_filename = f"{manager_fsim_dir}/{relative_hwdb_path}"
|
||||
|
||||
hwdb_entry_dir = f"{manager_fsim_dir}/deploy/built-hwdb-entries"
|
||||
built_hwdb_entries = [x for x in os.listdir(hwdb_entry_dir) if os.path.isfile(os.path.join(hwdb_entry_dir, x))]
|
||||
for hwdb in built_hwdb_entries:
|
||||
print(f"Printing {hwdb}")
|
||||
run(f"cat {hwdb}")
|
||||
|
||||
sample_hwdb_lines = open(sample_hwdb_filename).read().split('\n')
|
||||
|
||||
with open(sample_hwdb_filename, "w") as sample_hwdb_file:
|
||||
|
@ -61,7 +67,7 @@ def run_agfi_buildbitstream():
|
|||
run(f"cat {sample_hwdb_filename}")
|
||||
|
||||
# share agfis
|
||||
sample_build_filename = f"{manager_fsim_dir}/deploy/sample-backup-configs/sample_config_build.yaml"
|
||||
sample_build_filename = f"{manager_fsim_dir}/{relative_build_path}"
|
||||
sample_build_lines = open(sample_build_filename).read().split('\n')
|
||||
with open(sample_build_filename, "w") as sample_build_file:
|
||||
for line in sample_build_lines:
|
||||
|
@ -78,6 +84,9 @@ def run_agfi_buildbitstream():
|
|||
|
||||
run(f"firesim shareagfi -a {sample_hwdb_filename} -b {sample_build_filename}")
|
||||
|
||||
# copy back to workspace area so you can PR it
|
||||
run(f"cp -f {sample_hwdb_filename} {ci_env['GITHUB_WORKSPACE']}/{relative_hwdb_path}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
set_fabric_firesim_pem()
|
||||
execute(run_agfi_buildbitstream, hosts=["localhost"])
|
||||
|
|
|
@ -392,15 +392,13 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
- name: Run buildbitstream command and update sample AGFIs
|
||||
run: .github/scripts/run-agfi-buildbitstream.py
|
||||
- uses: peter-evans/create-pull-request@v4
|
||||
- uses: peter-evans/create-pull-request@v5
|
||||
with:
|
||||
# must align with `manager_fsim_dir/MANAGER_FIRESIM_LOCATION`
|
||||
cwd: '/home/centos/firesim'
|
||||
add-paths: |
|
||||
'deploy/sample-backup-configs/sample_config_hwdb.yaml'
|
||||
commit-message: "Update AGFI(s)"
|
||||
branch-suffix: short-commit-hash
|
||||
title: "Update AGFI(s) for ${{ env.GITHUB_REF_NAME }}"
|
||||
title: "Update AGFI(s) for ${{ github.ref_name }}"
|
||||
|
||||
# TODO: Re-enable and just post bitstreams into a GH repo
|
||||
#run-xclbin-buildbitstream:
|
||||
|
@ -420,13 +418,13 @@ jobs:
|
|||
# - uses: ./.github/actions/repo-setup-aws
|
||||
# - name: Run buildbitstream command and update sample xclbins
|
||||
# run: .github/scripts/run-xclbin-buildbitstream.py
|
||||
# - uses: peter-evans/create-pull-request@v4
|
||||
# - uses: peter-evans/create-pull-request@v5
|
||||
# with:
|
||||
# add-paths: |
|
||||
# 'deploy/sample-backup-configs/sample_config_hwdb.yaml'
|
||||
# commit-message: "Update xclbin(s)"
|
||||
# branch-suffix: short-commit-hash
|
||||
# title: "Update xclbin(s) for ${{ env.GITHUB_REF_NAME }}"
|
||||
# title: "Update xclbin(s) for ${{ github.ref_name }}"
|
||||
|
||||
run-vitis-check-docs-generated-components:
|
||||
name: run-vitis-check-docs-generated-components
|
||||
|
|
Loading…
Reference in New Issue