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 adb2cad
Showing 1 changed file with 17 additions and 26 deletions.
43 changes: 17 additions & 26 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ else
fi
INSTALLER_PATH=$(find build/ -name "*forge*.${EXT}" | head -n 1)
INSTALLER_NAME=$(basename "${INSTALLER_PATH}" | cut -d "-" -f 1)
INSTALLER_EXE=$(basename "${INSTALLER_PATH}")

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

# 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 *****"
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
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)
if [[ "${mamba_version_start}" != "${mamba_version_end}" ]]; then
echo "mamba version changed from ${mamba_version_start} to ${mamba_version_end}"
exit 1
fi
else
# Test one of our installers in batch mode
Expand Down Expand Up @@ -86,19 +80,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 adb2cad

Please sign in to comment.