Compare commits
8 Commits
quote_comp
...
775e16e3f7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
775e16e3f7 | ||
|
|
c22bf1eb0b | ||
|
|
1addf6e52f | ||
|
|
443a99e477 | ||
|
|
85d3435fe8 | ||
|
|
1b1d3f8def | ||
|
|
934160d619 | ||
|
|
75184afd8f |
37
.gitea/workflows/publish.yaml
Normal file
37
.gitea/workflows/publish.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
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 = "fpga-sim" # REQUIRED, is the only field that cannot be marked as dynami
|
||||
# https://packaging.python.org/guides/single-sourcing-package-version/
|
||||
|
||||
# dynamic = ["version"]
|
||||
version = "0.2.1" # REQUIRED, although can be dynamic
|
||||
version = "0.3.2" # 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:
|
||||
@@ -123,7 +123,7 @@ classifiers = [
|
||||
dependencies = [
|
||||
"pyyaml",
|
||||
"cocotb",
|
||||
"rtl-manifest"
|
||||
"rtl-manifest>=0.3.1"
|
||||
]
|
||||
|
||||
# List additional groups of dependencies here (e.g. development
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
-i https://git.byronlathi.com/api/v4/projects/95/packages/pypi/simple
|
||||
setuptools
|
||||
wheel
|
||||
build
|
||||
twine
|
||||
cocotb
|
||||
rtl-manifest
|
||||
pyyaml
|
||||
@@ -1,5 +1,3 @@
|
||||
from ast import parse
|
||||
from email.mime import base
|
||||
import os
|
||||
import sys
|
||||
|
||||
@@ -22,6 +20,7 @@ def fpga_sim_main():
|
||||
|
||||
parser.add_argument("yaml")
|
||||
parser.add_argument("test_name", nargs="?")
|
||||
parser.add_argument("-j", "--jobs", default=1)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
@@ -78,7 +77,9 @@ def fpga_sim_main():
|
||||
sim = os.getenv("SIM", "verilator")
|
||||
runner = get_runner(sim)
|
||||
|
||||
os.environ["MAKEFLAGS"] = "-j"
|
||||
jobs = args.jobs
|
||||
print(jobs)
|
||||
os.environ["MAKEFLAGS"] = f"-j{jobs}"
|
||||
|
||||
tests_to_run = []
|
||||
|
||||
@@ -92,14 +93,19 @@ def fpga_sim_main():
|
||||
# Turn this into a multiprocessing pool
|
||||
for test in tests_to_run:
|
||||
|
||||
sources = rtl_manifest.read_sources(f"{test['base_path']}/{test['sources']}")
|
||||
sources, incdirs = rtl_manifest.parse(f"{test['base_path']}/{test['sources']}")
|
||||
|
||||
verilog_sources = list(filter(lambda s: (s.endswith(".v") or s.endswith(".sv") or s.endswith(".vlt")), sources))
|
||||
|
||||
|
||||
runner.build(
|
||||
verilog_sources=sources,
|
||||
verilog_sources=verilog_sources,
|
||||
includes=incdirs,
|
||||
hdl_toplevel=test["toplevel"],
|
||||
build_dir=f"{test['base_path']}/sim_build",
|
||||
waves=test["waves"],
|
||||
defines=defines
|
||||
defines=defines,
|
||||
build_args=["--timing"]
|
||||
)
|
||||
|
||||
result_xml = f"../sim_build/{test['name']}_results.xml".replace(" ", "_")
|
||||
@@ -107,3 +113,4 @@ def fpga_sim_main():
|
||||
sys.path.append(test["base_path"])
|
||||
|
||||
runner.test(hdl_toplevel=test["toplevel"], test_module=test["modules"], waves=test["waves"], results_xml=result_xml)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user