Remove need for conda in build-toolchains-extra.sh
This commit is contained in:
4
.github/actions/create-conda-env/action.yml
vendored
4
.github/actions/create-conda-env/action.yml
vendored
@@ -23,10 +23,10 @@ runs:
|
||||
if [[ "${{ inputs.install-collateral }}" == 'true' ]]; then
|
||||
echo "Add extra toolchain collateral to RISC-V install area"
|
||||
conda activate ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)-riscv-tools
|
||||
./scripts/build-toolchain-extra.sh riscv-tools
|
||||
./scripts/build-toolchain-extra.sh riscv-tools -p $CONDA_PREFIX/riscv-tools
|
||||
conda deactivate
|
||||
conda activate ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)-esp-tools
|
||||
./scripts/build-toolchain-extra.sh esp-tools
|
||||
./scripts/build-toolchain-extra.sh esp-tools -p $CONDA_PREFIX/esp-tools
|
||||
conda deactivate
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -117,7 +117,16 @@ if do_skip "2"; then
|
||||
fi
|
||||
|
||||
if do_skip "3"; then
|
||||
$RDIR/scripts/build-toolchain-extra.sh $FORCE_FLAG $TOOLCHAIN_TYPE
|
||||
if do_skip "1"; then
|
||||
PREFIX=$CONDA_PREFIX/$TOOLCHAIN_TYPE
|
||||
else
|
||||
if [ -z "$RISCV" ] ; then
|
||||
error "ERROR: If conda initialization skipped, \$RISCV variable must be defined."
|
||||
exit 1
|
||||
fi
|
||||
PREFIX=$RISCV
|
||||
fi
|
||||
$RDIR/scripts/build-toolchain-extra.sh $TOOLCHAIN_TYPE -p $PREFIX
|
||||
fi
|
||||
|
||||
if do_skip "4"; then
|
||||
|
||||
@@ -23,11 +23,8 @@ usage() {
|
||||
echo " esp-tools: if set, builds esp-tools toolchain used for the hwacha vector accelerator"
|
||||
echo ""
|
||||
echo "Options"
|
||||
echo " --prefix PREFIX : Install destination. If unset, defaults to $CONDA_PREFIX/riscv-tools"
|
||||
echo " or $CONDA_PREFIX/esp-tools"
|
||||
echo " --prefix -p PREFIX : Install destination."
|
||||
echo " --clean-after-install : Run make clean in calls to module_make and module_build"
|
||||
echo " --force -f : Skip prompt checking for conda"
|
||||
echo " --skip-validate : DEPRECATED: Same functionality as --force"
|
||||
echo " --help -h : Display this message"
|
||||
exit "$1"
|
||||
}
|
||||
@@ -50,9 +47,6 @@ do
|
||||
CLEANAFTERINSTALL="true" ;;
|
||||
riscv-tools | esp-tools)
|
||||
TOOLCHAIN=$1 ;;
|
||||
--force | -f | --skip-validate)
|
||||
FORCE=true;
|
||||
;;
|
||||
* )
|
||||
error "invalid option $1"
|
||||
usage 1 ;;
|
||||
@@ -60,15 +54,8 @@ do
|
||||
shift
|
||||
done
|
||||
|
||||
if [ "$FORCE" = false ]; then
|
||||
if [ -z ${CONDA_DEFAULT_ENV+x} ]; then
|
||||
error "ERROR: No conda environment detected. Did you activate the conda environment (e.x. 'conda activate chipyard')?"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$RISCV" ] ; then
|
||||
RISCV="$CONDA_PREFIX/$TOOLCHAIN"
|
||||
error "ERROR: Prefix not given. If conda is sourced, do you mean $CONDA_PREFIX/$TOOLCHAIN?"
|
||||
fi
|
||||
|
||||
XLEN=64
|
||||
|
||||
Reference in New Issue
Block a user