Skip to content

Commit

Permalink
Merge pull request #358 from hmaarrfk/update-mamba_only
Browse files Browse the repository at this point in the history
Update mamba to 0.27.0 and add checks for boa
  • Loading branch information
hmaarrfk authored Oct 7, 2022
2 parents 928ac2f + 62f3760 commit e97c527
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Miniforge3/construct.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set version = os.environ.get("MINIFORGE_VERSION", "4.14.0-0") %}
{% set version = os.environ.get("MINIFORGE_VERSION", "4.14.0-1") %}
{% set name = os.environ.get("MINIFORGE_NAME", "Miniforge3") %}

name: {{ name }}
Expand Down Expand Up @@ -27,7 +27,7 @@ specs:
{% endif %}

{% if name.startswith("Mambaforge") %}
- mamba 0.25.0
- mamba 0.27.0
{% endif %}
- conda {{ version.split("-")[0] }}

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ After construction on the CI, the installer is tested against a range of distrib
- Ubuntu 16.04 ([LTS](https://ubuntu.com/about/release-cycle))
- Ubuntu 18.04 ([LTS](https://ubuntu.com/about/release-cycle))
- Ubuntu 20.04 ([LTS](https://ubuntu.com/about/release-cycle))
- Ubuntu 21.10 (Latest non-LTS version)
- Ubuntu 22.04 (Latest release -- also happens to be LTS)
## Local usage
Expand Down
2 changes: 1 addition & 1 deletion build_miniforge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ docker run --rm -v "$(pwd):/construct" \
"${DOCKERIMAGE}" /construct/scripts/build.sh

echo "============= Test the installer ============="
for TEST_IMAGE_NAME in "ubuntu:21.10" "ubuntu:20.04" "ubuntu:18.04" "ubuntu:16.04" "centos:7" "debian:bullseye" "debian:buster"; do
for TEST_IMAGE_NAME in "ubuntu:22.04" "ubuntu:20.04" "ubuntu:18.04" "ubuntu:16.04" "centos:7" "debian:bullseye" "debian:buster"; do
echo "============= Test installer on ${TEST_IMAGE_NAME} ============="
docker run --rm -v "$(pwd):/construct" -e CONSTRUCT_ROOT \
"${DOCKER_ARCH}/${TEST_IMAGE_NAME}" /construct/scripts/test.sh
Expand Down
2 changes: 1 addition & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ cp LICENSE "${TEMP_DIR}/"
ls -al "${TEMP_DIR}"

if [[ "${TARGET_PLATFORM}" != win-* ]]; then
MICROMAMBA_VERSION=0.24.0
MICROMAMBA_VERSION=0.27.0
mkdir "${TEMP_DIR}/micromamba"
pushd "${TEMP_DIR}/micromamba"
curl -L -O "https://anaconda.org/conda-forge/micromamba/${MICROMAMBA_VERSION}/download/${TARGET_PLATFORM}/micromamba-${MICROMAMBA_VERSION}-0.tar.bz2"
Expand Down
26 changes: 26 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 @@ -43,6 +44,17 @@ if [[ "$(uname)" == MINGW* ]]; then
echo "***** Check if we can install a package which requires msys2 *****"
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 @@ -53,6 +65,20 @@ 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 *****"
mamba_version_start=$(mamba --version | grep mamba | cut -d ' ' -f 2)
mamba info
mamba install "mamba=${mamba_version_start}" 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
fi


Expand Down

0 comments on commit e97c527

Please sign in to comment.