Compare commits
6 Commits
remove_out
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
37528fdf2b | ||
|
|
ddd199e5e4 | ||
|
|
d045bb4103 | ||
|
|
0bcd331f6c | ||
|
|
4e404864df | ||
|
|
7b4f82c6c6 |
38
.gitea/workflows/publish.yaml
Normal file
38
.gitea/workflows/publish.yaml
Normal file
@@ -0,0 +1,38 @@
|
||||
name: Publish Package
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Package
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.x"
|
||||
- run: python3 -m pip install build --user
|
||||
- run: python -m build
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: python-package-distributions
|
||||
path: dist/
|
||||
|
||||
deploy:
|
||||
name: Deploy Package
|
||||
needs:
|
||||
- build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.x"
|
||||
- run: python3 -m pip install twine --user
|
||||
- uses: actions/download-artifact@v3
|
||||
name: python-package-distributions
|
||||
path: dist/ # Does this even do anything?
|
||||
- run: ls -laR python-package-distributions
|
||||
- run: TWINE_PASSWORD=${{ secrets.PYPI_PAT }} TWINE_USERNAME=bslathi19 python -m twine upload --repository-url ${{ vars.CI_API_URL }} python-package-distributions/*
|
||||
|
||||
@@ -35,7 +35,7 @@ name = "build-fpga" # REQUIRED, is the only field that cannot be marked as dyna
|
||||
# https://packaging.python.org/guides/single-sourcing-package-version/
|
||||
|
||||
# dynamic = ["version"]
|
||||
version = "0.4.1" # REQUIRED, although can be dynamic
|
||||
version = "0.5.1" # REQUIRED, although can be dynamic
|
||||
|
||||
# This is a one-line description or tagline of what your project does. This
|
||||
# corresponds to the "Summary" metadata field:
|
||||
|
||||
@@ -7,6 +7,7 @@ def build_nonprj(cfg):
|
||||
verilog_sources = list(filter(lambda s: (s.endswith(".v") or s.endswith(".sv")), all_sources))
|
||||
xci_sources = list(filter(lambda s: s.endswith(".xci"), all_sources))
|
||||
xdc_sources = list(filter(lambda s: s.endswith(".xdc"), all_sources))
|
||||
tcl_sources = list(filter(lambda s: s.endswith(".tcl"), all_sources))
|
||||
|
||||
top = cfg["design_info"]["top_module"]
|
||||
part = cfg["device_info"]["device"]
|
||||
@@ -36,12 +37,16 @@ def build_nonprj(cfg):
|
||||
|
||||
f.write(f"read_verilog -sv {' '.join(verilog_sources)}\n")
|
||||
f.write(f"read_ip \"{' '.join(xci_sources)}\"\n")
|
||||
f.write(f"read_xdc {' '.join(xdc_sources)}\n")
|
||||
f.write(f"read_xdc \"{' '.join(xdc_sources)}\"\n")
|
||||
|
||||
f.write(f"synth_ip [get_ips *]\n")
|
||||
f.write(f"synth_design -top {top} -directive {synth_directive}\n")
|
||||
f.write(f"write_checkpoint -force $outputDir/post_synth.dcp\n")
|
||||
f.write(f"report_utilization -file $outputDir/post_synth_util.rpt\n")
|
||||
f.write(f"report_utilization -hierarchical -file $outputDir/post_synth_util.rpt\n")
|
||||
|
||||
if tcl_sources is not []:
|
||||
for tcl_script in tcl_sources:
|
||||
f.write(f"source {tcl_script}\n")
|
||||
|
||||
f.write(f"opt_design -directive {opt_directive}\n")
|
||||
f.write(f"place_design -directive {place_directive}\n")
|
||||
@@ -54,5 +59,5 @@ def build_nonprj(cfg):
|
||||
f.write(f"write_bitstream -force $outputDir/{top}.bit\n")
|
||||
f.write(f"exit\n")
|
||||
|
||||
os.system(f"vivado -mode tcl -source build.tcl")
|
||||
os.remove("build.tcl")
|
||||
os.system(f"vivado -nolog -nojournal -mode tcl -source build.tcl")
|
||||
os.remove("build.tcl")
|
||||
|
||||
Reference in New Issue
Block a user