Skip to content

Commit

Permalink
Merge pull request #361 from hmaarrfk/fixup_2209
Browse files Browse the repository at this point in the history
Update to conda 22.9 with tests for boa compatibility
  • Loading branch information
isuruf authored Oct 26, 2022
2 parents 293e006 + ab5e888 commit 2e25aec
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 16 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ jobs:
DOCKERIMAGE: condaforge/linux-anvil-aarch64
MINIFORGE_NAME: "Mambaforge-pypy3"
OS_NAME: "Linux"
# Reduce the test matrix because the builds timeouts on emulated architectures
# The time consuming operation is an attempt a full solve of conda/mamba/boa
# for as a compatibility
# xref https://github.com/conda-forge/miniforge/pull/361
TEST_IMAGE_NAMES: "ubuntu:22.04"

- os: ubuntu-latest
ARCH: x86_64
Expand Down Expand Up @@ -164,6 +169,11 @@ jobs:
DOCKERIMAGE: condaforge/linux-anvil-ppc64le
MINIFORGE_NAME: "Mambaforge-pypy3"
OS_NAME: "Linux"
# Reduce the test matrix because the builds timeouts on emulated architectures
# The time consuming operation is an attempt a full solve of conda/mamba/boa
# for as a compatibility
# xref https://github.com/conda-forge/miniforge/pull/361
TEST_IMAGE_NAMES: "centos:7"

steps:
- name: Checkout code
Expand All @@ -182,6 +192,7 @@ jobs:
DOCKERIMAGE: ${{ matrix.DOCKERIMAGE }}
DOCKER_ARCH: ${{ matrix.DOCKER_ARCH }}
TARGET_PLATFORM: ${{ matrix.TARGET_PLATFORM }}
TEST_IMAGE_NAMES: ${{ matrix.TEST_IMAGE_NAMES }}
run: |
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
export MINIFORGE_VERSION=${GITHUB_REF##*/};
Expand Down
2 changes: 1 addition & 1 deletion 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-1") %}
{% set version = os.environ.get("MINIFORGE_VERSION", "22.9.0-1") %}
{% set name = os.environ.get("MINIFORGE_NAME", "Miniforge3") %}

name: {{ name }}
Expand Down
6 changes: 4 additions & 2 deletions build_miniforge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ DOCKERIMAGE=${DOCKERIMAGE:-condaforge/linux-anvil-aarch64}
export MINIFORGE_NAME=${MINIFORGE_NAME:-Miniforge3}
OS_NAME=${OS_NAME:-Linux}
EXT=${EXT:-sh}
TEST_IMAGE_NAMES=${TEST_IMAGE_NAMES:-ubuntu:22.04 ubuntu:20.04 ubuntu:18.04 ubuntu:16.04 centos:7 debian:bullseye debian:buster}
export CONSTRUCT_ROOT=/construct

echo "============= Create build directory ============="
Expand All @@ -33,8 +34,9 @@ docker run --rm -v "$(pwd):/construct" \
"${DOCKERIMAGE}" /construct/scripts/build.sh

echo "============= Test the installer ============="
for TEST_IMAGE_NAME in "ubuntu:22.04" "ubuntu:20.04" "ubuntu:18.04" "ubuntu:16.04" "centos:7" "debian:bullseye" "debian:buster"; do
for TEST_IMAGE_NAME in ${TEST_IMAGE_NAMES}; do
echo "============= Test installer on ${TEST_IMAGE_NAME} ============="
docker run --rm -v "$(pwd):/construct" -e CONSTRUCT_ROOT \
docker run --rm \
-v "$(pwd):${CONSTRUCT_ROOT}" -e CONSTRUCT_ROOT \
"${DOCKER_ARCH}/${TEST_IMAGE_NAME}" /construct/scripts/test.sh
done
12 changes: 6 additions & 6 deletions build_miniforge_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ set -e
set -x

echo "Installing a fresh version of Miniforge3."
# Keep variable names in sync with
# Keep variable names in sync with
# https://github.com/conda-forge/docker-images/blob/main/scripts/run_commands
miniforge_arch="$(uname -m)"
miniforge_version="4.10.3-10"
miniforge_version="4.14.0-0"
condapkg="https://github.com/conda-forge/miniforge/releases/download/${miniforge_version}/Mambaforge-${miniforge_version}-MacOSX-${miniforge_arch}.sh"
if [ "$(uname -m)" = "x86_64" ]; then
conda_chksum="7c44259a0982cd3ef212649678af5f0dd4e0bb7306e8fffc93601dd1d739ec0b"
conda_checksum="949f046b4404cc8e081807b048050e6642d8db5520c20d5158a7ef721fbf76c5"
elif [ "$(uname -m)" = "arm64" ]; then
conda_chksum="72bc86612ab9435915b616c2edb076737cbabe2c33fd684d58c2f9ae72e1957c"
conda_checksum="35d05a65e19b8e5d596964936ddd6023ae66d664a25ba291a52fec18f06a73b6"
else
exit 1
fi
curl -s -L "$condapkg" > miniconda.sh
openssl sha256 miniconda.sh | grep $conda_chksum
curl -s -L "$condapkg" -o miniconda.sh
openssl sha256 miniconda.sh | grep $conda_checksum

bash miniconda.sh -b -p ~/conda

Expand Down
11 changes: 6 additions & 5 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@ cd "${CONSTRUCT_ROOT}"
# Constructor should be latest for non-native building
# See https://github.com/conda/constructor
echo "***** Install constructor *****"
conda install -y "constructor>=3.3.1" jinja2 curl libarchive -c conda-forge --override-channels

conda install --yes \
--channel conda-forge --override-channels \
jinja2 curl libarchive \
"constructor>=3.3.1"
if [[ "$(uname)" == "Darwin" ]]; then
conda install -y coreutils -c conda-forge --override-channels
conda install --yes coreutils --channel conda-forge --override-channels
fi
# shellcheck disable=SC2154
if [[ "${TARGET_PLATFORM}" == win-* ]]; then
conda install -y "nsis=3.01" -c conda-forge --override-channels
conda install --yes "nsis=3.01" --channel conda-forge --override-channels
fi
# pip install git+git://github.com/conda/[email protected]#egg=constructor --force --no-deps
conda list

echo "***** Make temp directory *****"
Expand Down
5 changes: 3 additions & 2 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,14 @@ 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 "mamba=${mamba_version_start}" boa --yes
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}"
Expand Down

0 comments on commit 2e25aec

Please sign in to comment.