Skip to content

Commit

Permalink
Always check for boa compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
hmaarrfk committed Aug 20, 2023
1 parent efce991 commit cbb7a4c
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ if [[ "$(uname)" == MINGW* ]]; then
# hmaarrfk -- 2023/02
# For some reason the Mambaforge-Linux-ppc64le works fine in under 15 mins on a branch
# but then fails to build within the 6 hour time limit on the release CI.
if [[ "${INSTALLER_NAME}" == "Mambaforge" ]] && [[ "${INSTALLER_EXE}" != "Mambaforge-Linux-ppc64le.sh" ]]; then
echo "***** Mambaforge detected. Checking for boa compatibility *****"
if [[ "${INSTALLER_EXE}" != "*-Linux-ppc64le.sh" ]]; then
echo "***** 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)
Expand All @@ -60,12 +60,12 @@ if [[ "$(uname)" == MINGW* ]]; then
fi
fi
else
# Test one of our installers in batch mode
# Test one of our installers (Mambaforge )in batch mode
if [[ "${INSTALLER_NAME}" == "Mambaforge" ]]; then
bash "${INSTALLER_PATH}" -b -p "${CONDA_PATH}"
# And the other in interactive mode
else
# Test interactive install. The install will ask the user to
# Test interactive install (Miniforge). The install will ask the user to
# - newline -- read the EULA
# - yes -- then accept
# - ${CONDA_PATH} -- Then specify the path
Expand All @@ -86,19 +86,16 @@ EOF
conda info
conda list

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 "mamba=${mamba_version_start}" "python=${major_minor_version}.*=*_${implementation}" 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

echo "***** 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 "mamba=${mamba_version_start}" "python=${major_minor_version}.*=*_${implementation}" 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

Expand Down

0 comments on commit cbb7a4c

Please sign in to comment.