Install CIRCT outside of conda (add CI to auto-update)

This commit is contained in:
abejgonzalez
2023-11-30 15:47:14 -08:00
parent 5405b4caa3
commit b9e504411a
7 changed files with 71 additions and 21 deletions

View File

@@ -152,6 +152,44 @@ if run_step "1"; then
source $CYDIR/.conda-env/etc/profile.d/conda.sh &&
conda activate $CYDIR/.conda-env
exit_if_last_command_failed
# Conda Setup
# Provide a sourceable snippet that can be used in subshells that may not have
# inhereted conda functions that would be brought in under a login shell that
# has run conda init (e.g., VSCode, CI)
read -r -d '\0' CONDA_ACTIVATE_PREAMBLE <<'END_CONDA_ACTIVATE'
if ! type conda >& /dev/null; then
echo "::ERROR:: you must have conda in your environment first"
return 1 # don't want to exit here because this file is sourced
fi
# if we're sourcing this in a sub process that has conda in the PATH but not as a function, init it again
conda activate --help >& /dev/null || source $(conda info --base)/etc/profile.d/conda.sh
\0
END_CONDA_ACTIVATE
replace_content env.sh build-setup-conda "# line auto-generated by $0
$CONDA_ACTIVATE_PREAMBLE
conda activate $CYDIR/.conda-env
source $CYDIR/scripts/fix-open-files.sh"
# install circt
CIRCT_INSTALL_DIR=$CYDIR/.circt
rm -rf $CIRCT_INSTALL_DIR
$CYDIR/conda-reqs/install-circt/bin/download-release-or-nightly-circt.sh \
-f circt-full-shared-linux-x64.tar.gz \
-i $CIRCT_INSTALL_DIR \
-x $CYDIR/conda-reqs/circt.json \
-g null
replace_content env.sh build-setup-circt "# line auto-generated by $0
if [ -d "${CIRCT_INSTALL_DIR}/bin" ] && [[ ":$PATH:" != *":${CIRCT_INSTALL_DIR}/bin:"* ]]; then
PATH="${PATH:+"$PATH:"}${CIRCT_INSTALL_DIR}/bin"
fi
if [ -d "${CIRCT_INSTALL_DIR}/lib" ] && [[ ":$LD_LIBRARY_PATH:" != *":${CIRCT_INSTALL_DIR}/lib:"* ]]; then
LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+"$LD_LIBRARY_PATH:"}${CIRCT_INSTALL_DIR}/lib"
fi
"
fi
if [ -z "$FORCE_FLAG" ]; then
@@ -250,26 +288,6 @@ if run_step "10"; then
exit_if_last_command_failed
fi
# Conda Setup
# Provide a sourceable snippet that can be used in subshells that may not have
# inhereted conda functions that would be brought in under a login shell that
# has run conda init (e.g., VSCode, CI)
read -r -d '\0' CONDA_ACTIVATE_PREAMBLE <<'END_CONDA_ACTIVATE'
if ! type conda >& /dev/null; then
echo "::ERROR:: you must have conda in your environment first"
return 1 # don't want to exit here because this file is sourced
fi
# if we're sourcing this in a sub process that has conda in the PATH but not as a function, init it again
conda activate --help >& /dev/null || source $(conda info --base)/etc/profile.d/conda.sh
\0
END_CONDA_ACTIVATE
replace_content env.sh build-setup "# line auto-generated by $0
$CONDA_ACTIVATE_PREAMBLE
conda activate $CYDIR/.conda-env
source $CYDIR/scripts/fix-open-files.sh"
echo "Setup complete!"
} 2>&1 | tee build-setup.log