Skip to content

Commit

Permalink
Add back boa tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hmaarrfk committed Oct 8, 2022
1 parent 8ee5821 commit 7ff5279
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ else
EXT="sh";
fi
INSTALLER_PATH=$(find build/ -name "*forge*.${EXT}" | head -n 1)
INSTALLER_NAME=$(basename "${INSTALLER_PATH}" | cut -d "-" -f 1)

echo "***** Run the installer *****"
chmod +x "${INSTALLER_PATH}"
Expand All @@ -44,6 +45,16 @@ if [[ "$(uname)" == MINGW* ]]; then
conda.exe install r-base --yes --quiet
conda.exe list

if [[ "${INSTALLER_NAME}" == "Mambaforge" ]]; then
echo "***** Mambaforge detected. Checking for boa compatibility *****"
mamba_version_start=$(mamba --version | grep mamba | cut -d ' ' -f 2)
mamba.exe install boa --yes
mamba_version_end=$(mamba --version | grep mamba | cut -d ' ' -f 2)
if [[ "${mamba_version_start}" != "${mamba_version_end}" ]]; then
echo "mamba version changed from ${mamba_version_start} to ${mamba_version_end}"
exit 1
fi
fi
else
bash "${INSTALLER_PATH}" -b -p "${CONDA_PATH}"

Expand All @@ -54,6 +65,23 @@ else
echo "***** Print conda info *****"
conda info
conda list
# conda clean --yes --index-cache

if [[ "${INSTALLER_NAME}" == "Mambaforge" ]]; then
echo "***** Mambaforge detected. Checking for boa compatibility *****"
implementation=$(python -c "import platform; print(platform.python_implementation().lower())")
major_minor_version=$(python -c 'import sys; print(f"{sys.version_info[0]}.{sys.version_info[1]}")')
mamba_version_start=$(mamba --version | grep mamba | cut -d ' ' -f 2)
mamba info
mamba install "python=${major_minor_version}.*=*_${implementation}" boa --yes --verbose || \
(wc -l /root/miniforge/pkgs/cache/09cdf8bf.json && exit 1)
mamba_version_end=$(mamba --version | grep mamba | cut -d ' ' -f 2)
if [[ "${mamba_version_start}" != "${mamba_version_end}" ]]; then
echo "mamba version changed from ${mamba_version_start} to ${mamba_version_end}"
exit 1
fi

fi
fi


Expand Down

0 comments on commit 7ff5279

Please sign in to comment.