ci: use f4pga entrypoints to sh wrappers

Signed-off-by: Unai Martinez-Corral <umartinezcorral@antmicro.com>
This commit is contained in:
Unai Martinez-Corral 2022-02-27 15:27:49 +01:00
parent ac82b068e1
commit 84fef6357b
2 changed files with 61 additions and 1 deletions

View File

@ -47,7 +47,7 @@ echo '::endgroup::'
cd ..
echo '::group::Add f4pga-env'
echo '::group::🗑️ Remove the wrappers (pre-packaged from arch-defs) and add f4pga-env'
case "$F4PGA_FAM" in
xc7) F4PGA_DIR_ROOT='install';;
@ -58,6 +58,33 @@ F4PGA_DIR_BIN="$F4PGA_INSTALL_DIR_FAM/$F4PGA_DIR_ROOT"/bin/
cp $(dirname "$0")/../../f4pga-env "$F4PGA_DIR_BIN"
cd "$F4PGA_DIR_BIN"
case "$F4PGA_FAM" in
xc7)
rm -vrf \
env \
symbiflow_generate_constraints \
symbiflow_pack \
symbiflow_place \
symbiflow_route \
symbiflow_synth \
symbiflow_write_bitstream \
symbiflow_write_fasm \
vpr_common
;;
eos-s3)
sed -i 's#${MYPATH}/../share#'"$(./f4pga-env share)"'#' vpr_common
rm -vrf \
symbiflow_pack \
symbiflow_place \
symbiflow_route \
symbiflow_write_fasm \
symbiflow_analysis \
symbiflow_repack \
symbiflow_generate_bitstream \
symbiflow_generate_libfile
;;
esac
ls -lah
echo '::endgroup::'

View File

@ -4,9 +4,39 @@ from pathlib import Path
from setuptools import setup as setuptools_setup
from os import environ
F4PGA_FAM = environ.get('F4PGA_FAM', 'xc7')
packagePath = Path(__file__).resolve().parent
sf = "symbiflow"
shwrappers = "f4pga.wrappers.sh.__init__"
wrapper_entrypoints = [
f"{sf}_generate_constraints = {shwrappers}:generate_constraints",
f"{sf}_pack = {shwrappers}:pack",
f"{sf}_place = {shwrappers}:place",
f"{sf}_route = {shwrappers}:route",
f"{sf}_synth = {shwrappers}:synth",
f"{sf}_write_bitstream = {shwrappers}:write_bitstream",
f"{sf}_write_fasm = {shwrappers}:write_fasm",
] if F4PGA_FAM == 'xc7' else [
# f"{sf}_generate_constraints = {shwrappers}:generate_constraints",
f"{sf}_pack = {shwrappers}:pack",
f"{sf}_place = {shwrappers}:place",
f"{sf}_route = {shwrappers}:route",
# f"{sf}_synth = {shwrappers}:synth",
f"{sf}_write_fasm = {shwrappers}:write_fasm",
# f"{sf}_write_xml_rr_graph = {shwrappers}:write_xml_rr_graph", # Is this unused ???
# f"vpr_common = {shwrappers}:vpr_common",
# f"{sf}_analysis = {shwrappers}:analysis", # Is this unused ???
# f"{sf}_repack = {shwrappers}:repack", # Is this unused ???
# f"{sf}_generate_bitstream = {shwrappers}:generate_bitstream", # Is this unused ???
# f"{sf}_generate_libfile = {shwrappers}:generate_libfile", # Is this unused ???
# f"ql_{sf} = {shwrappers}:ql",
]
setuptools_setup(
name=packagePath.name,
version="0.0.0",
@ -23,4 +53,7 @@ setuptools_setup(
},
classifiers=[],
python_requires='>=3.6',
entry_points={
"console_scripts": wrapper_entrypoints
},
)