From cbb7a4c6784a79678b7be573ab0540db63aaf13f Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Sun, 20 Aug 2023 12:47:27 -0400 Subject: [PATCH] Always check for boa compatibility --- scripts/test.sh | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/scripts/test.sh b/scripts/test.sh index b0ec1ad5..d2a0db76 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -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) @@ -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 @@ -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