Skip to content

Commit 2e25aec

Browse files
authored
Merge pull request #361 from hmaarrfk/fixup_2209
Update to conda 22.9 with tests for boa compatibility
2 parents 293e006 + ab5e888 commit 2e25aec

File tree

6 files changed

+31
-16
lines changed

6 files changed

+31
-16
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ jobs:
132132
DOCKERIMAGE: condaforge/linux-anvil-aarch64
133133
MINIFORGE_NAME: "Mambaforge-pypy3"
134134
OS_NAME: "Linux"
135+
# Reduce the test matrix because the builds timeouts on emulated architectures
136+
# The time consuming operation is an attempt a full solve of conda/mamba/boa
137+
# for as a compatibility
138+
# xref https://github.com/conda-forge/miniforge/pull/361
139+
TEST_IMAGE_NAMES: "ubuntu:22.04"
135140

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

168178
steps:
169179
- name: Checkout code
@@ -182,6 +192,7 @@ jobs:
182192
DOCKERIMAGE: ${{ matrix.DOCKERIMAGE }}
183193
DOCKER_ARCH: ${{ matrix.DOCKER_ARCH }}
184194
TARGET_PLATFORM: ${{ matrix.TARGET_PLATFORM }}
195+
TEST_IMAGE_NAMES: ${{ matrix.TEST_IMAGE_NAMES }}
185196
run: |
186197
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
187198
export MINIFORGE_VERSION=${GITHUB_REF##*/};

Miniforge3/construct.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% set version = os.environ.get("MINIFORGE_VERSION", "4.14.0-1") %}
1+
{% set version = os.environ.get("MINIFORGE_VERSION", "22.9.0-1") %}
22
{% set name = os.environ.get("MINIFORGE_NAME", "Miniforge3") %}
33

44
name: {{ name }}

build_miniforge.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ DOCKERIMAGE=${DOCKERIMAGE:-condaforge/linux-anvil-aarch64}
1717
export MINIFORGE_NAME=${MINIFORGE_NAME:-Miniforge3}
1818
OS_NAME=${OS_NAME:-Linux}
1919
EXT=${EXT:-sh}
20+
TEST_IMAGE_NAMES=${TEST_IMAGE_NAMES:-ubuntu:22.04 ubuntu:20.04 ubuntu:18.04 ubuntu:16.04 centos:7 debian:bullseye debian:buster}
2021
export CONSTRUCT_ROOT=/construct
2122

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

3536
echo "============= Test the installer ============="
36-
for TEST_IMAGE_NAME in "ubuntu:22.04" "ubuntu:20.04" "ubuntu:18.04" "ubuntu:16.04" "centos:7" "debian:bullseye" "debian:buster"; do
37+
for TEST_IMAGE_NAME in ${TEST_IMAGE_NAMES}; do
3738
echo "============= Test installer on ${TEST_IMAGE_NAME} ============="
38-
docker run --rm -v "$(pwd):/construct" -e CONSTRUCT_ROOT \
39+
docker run --rm \
40+
-v "$(pwd):${CONSTRUCT_ROOT}" -e CONSTRUCT_ROOT \
3941
"${DOCKER_ARCH}/${TEST_IMAGE_NAME}" /construct/scripts/test.sh
4042
done

build_miniforge_osx.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ set -e
44
set -x
55

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

2222
bash miniconda.sh -b -p ~/conda
2323

scripts/build.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,17 @@ cd "${CONSTRUCT_ROOT}"
1212
# Constructor should be latest for non-native building
1313
# See https://github.com/conda/constructor
1414
echo "***** Install constructor *****"
15-
conda install -y "constructor>=3.3.1" jinja2 curl libarchive -c conda-forge --override-channels
16-
15+
conda install --yes \
16+
--channel conda-forge --override-channels \
17+
jinja2 curl libarchive \
18+
"constructor>=3.3.1"
1719
if [[ "$(uname)" == "Darwin" ]]; then
18-
conda install -y coreutils -c conda-forge --override-channels
20+
conda install --yes coreutils --channel conda-forge --override-channels
1921
fi
2022
# shellcheck disable=SC2154
2123
if [[ "${TARGET_PLATFORM}" == win-* ]]; then
22-
conda install -y "nsis=3.01" -c conda-forge --override-channels
24+
conda install --yes "nsis=3.01" --channel conda-forge --override-channels
2325
fi
24-
# pip install git+git://github.com/conda/[email protected]#egg=constructor --force --no-deps
2526
conda list
2627

2728
echo "***** Make temp directory *****"

scripts/test.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,14 @@ else
6565
echo "***** Print conda info *****"
6666
conda info
6767
conda list
68-
conda clean --yes --index-cache
6968

7069
if [[ "${INSTALLER_NAME}" == "Mambaforge" ]]; then
7170
echo "***** Mambaforge detected. Checking for boa compatibility *****"
71+
implementation=$(python -c "import platform; print(platform.python_implementation().lower())")
72+
major_minor_version=$(python -c 'import sys; print(f"{sys.version_info[0]}.{sys.version_info[1]}")')
7273
mamba_version_start=$(mamba --version | grep mamba | cut -d ' ' -f 2)
7374
mamba info
74-
mamba install "mamba=${mamba_version_start}" boa --yes
75+
mamba install "mamba=${mamba_version_start}" "python=${major_minor_version}.*=*_${implementation}" boa --yes
7576
mamba_version_end=$(mamba --version | grep mamba | cut -d ' ' -f 2)
7677
if [[ "${mamba_version_start}" != "${mamba_version_end}" ]]; then
7778
echo "mamba version changed from ${mamba_version_start} to ${mamba_version_end}"

0 commit comments

Comments
 (0)