From 1688a9776330cc4975b13fc037617c35fb466cda Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Thu, 4 Aug 2022 04:02:29 +0200 Subject: [PATCH] f4pga: the default share path does not include subdir 'install' by default Signed-off-by: Unai Martinez-Corral --- .github/scripts/envvars.sh | 6 ++---- .github/scripts/prepare_environment.sh | 10 +++++----- .github/workflows/Pipeline.yml | 4 ++-- f4pga/__init__.py | 2 +- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/scripts/envvars.sh b/.github/scripts/envvars.sh index aaf6f97..3de1c38 100644 --- a/.github/scripts/envvars.sh +++ b/.github/scripts/envvars.sh @@ -18,10 +18,8 @@ FPGA_FAM="${FPGA_FAM:=xc7}" F4PGA_INSTALL_DIR="${F4PGA_INSTALL_DIR:=/opt/f4pga}" -F4PGA_DIR_ROOT="${F4PGA_DIR_ROOT:=install}" -F4PGA_INSTALL_DIR_FAM_ROOT="${F4PGA_INSTALL_DIR}/${FPGA_FAM}/${F4PGA_DIR_ROOT}" +F4PGA_INSTALL_DIR_FAM="${F4PGA_INSTALL_DIR}/${FPGA_FAM}" echo "FPGA_FAM: $FPGA_FAM" echo "F4PGA_INSTALL_DIR: $F4PGA_INSTALL_DIR" -echo "F4PGA_DIR_ROOT: $F4PGA_DIR_ROOT" -echo "F4PGA_INSTALL_DIR_FAM_ROOT: $F4PGA_INSTALL_DIR_FAM_ROOT" +echo "F4PGA_INSTALL_DIR_FAM: $F4PGA_INSTALL_DIR_FAM" diff --git a/.github/scripts/prepare_environment.sh b/.github/scripts/prepare_environment.sh index a484830..78a5762 100755 --- a/.github/scripts/prepare_environment.sh +++ b/.github/scripts/prepare_environment.sh @@ -38,15 +38,15 @@ echo '::group::Install Miniconda3' wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O conda_installer.sh -bash conda_installer.sh -u -b -p "${F4PGA_INSTALL_DIR}/${FPGA_FAM}"/conda -source "${F4PGA_INSTALL_DIR}/${FPGA_FAM}"/conda/etc/profile.d/conda.sh +bash conda_installer.sh -u -b -p "${F4PGA_INSTALL_DIR_FAM}"/conda +source "${F4PGA_INSTALL_DIR_FAM}"/conda/etc/profile.d/conda.sh echo '::endgroup::' echo '::group::Install arch-defs' -mkdir -p "$F4PGA_INSTALL_DIR_FAM_ROOT" +mkdir -p "$F4PGA_INSTALL_DIR_FAM" F4PGA_TIMESTAMP='20220803-160711' F4PGA_HASH='df6d9e5' @@ -61,7 +61,7 @@ esac for PKG in $PACKAGES; do wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/${F4PGA_TIMESTAMP}/symbiflow-arch-defs-${PKG}-${F4PGA_HASH}.tar.xz \ - | tar -xJC $F4PGA_INSTALL_DIR_FAM_ROOT + | tar -xJC $F4PGA_INSTALL_DIR_FAM done echo '::endgroup::' @@ -69,6 +69,6 @@ echo '::endgroup::' echo '::group::Create environment' -conda env create -f $F4PGA_INSTALL_DIR_FAM_ROOT/"$FPGA_FAM"_env/"$FPGA_FAM"_environment.yml +conda env create -f $F4PGA_INSTALL_DIR_FAM/"$FPGA_FAM"_env/"$FPGA_FAM"_environment.yml echo '::endgroup::' diff --git a/.github/workflows/Pipeline.yml b/.github/workflows/Pipeline.yml index 1683c08..b2130c6 100644 --- a/.github/workflows/Pipeline.yml +++ b/.github/workflows/Pipeline.yml @@ -147,8 +147,8 @@ jobs: . ./.github/scripts/envvars.sh . ./.github/scripts/activate.sh - export F4PGA_BIN_DIR="$F4PGA_INSTALL_DIR_FAM_ROOT"/bin/ - export F4PGA_SHARE_DIR="$F4PGA_INSTALL_DIR_FAM_ROOT"/share/f4pga + export F4PGA_BIN_DIR="$F4PGA_INSTALL_DIR_FAM"/bin/ + export F4PGA_SHARE_DIR="$F4PGA_INSTALL_DIR_FAM"/share/f4pga export VPRPATH=$F4PGA_BIN_DIR echo '::group::Clone f4pga-examples' diff --git a/f4pga/__init__.py b/f4pga/__init__.py index ee26f47..538fe3b 100755 --- a/f4pga/__init__.py +++ b/f4pga/__init__.py @@ -80,7 +80,7 @@ bin_dir_path = \ environ.get('F4PGA_BIN_DIR', str(Path(sys_argv[0]).resolve().parent.parent)) share_dir_path = \ environ.get('F4PGA_SHARE_DIR', - str(Path(f'{install_dir}/{FPGA_FAM}/install/share/f4pga').resolve())) + str(Path(f'{install_dir}/{FPGA_FAM}/share/f4pga').resolve())) class DependencyNotProducedException(F4PGAException): dep_name: str