@@ -7,28 +7,39 @@ source .scripts/logging_utils.sh
7
7
set -xe
8
8
9
9
MINIFORGE_HOME=${MINIFORGE_HOME:- ${HOME} / miniforge3}
10
+ MINIFORGE_HOME=${MINIFORGE_HOME%/ } # remove trailing slash
10
11
11
- ( startgroup " Installing a fresh version of Miniforge" ) 2> /dev/null
12
-
13
- MINIFORGE_URL=" https://github.com/conda-forge/miniforge/releases/latest/download"
14
- MINIFORGE_FILE=" Miniforge3-MacOSX-$( uname -m) .sh"
15
- curl -L -O " ${MINIFORGE_URL} /${MINIFORGE_FILE} "
16
- rm -rf ${MINIFORGE_HOME}
17
- bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME}
18
-
19
- ( endgroup " Installing a fresh version of Miniforge" ) 2> /dev/null
12
+ ( startgroup " Provisioning base env with micromamba" ) 2> /dev/null
13
+ MICROMAMBA_VERSION=" 1.5.10-0"
14
+ if [[ " $( uname -m) " == " arm64" ]]; then
15
+ osx_arch=" osx-arm64"
16
+ else
17
+ osx_arch=" osx-64"
18
+ fi
19
+ MICROMAMBA_URL=" https://github.com/mamba-org/micromamba-releases/releases/download/${MICROMAMBA_VERSION} /micromamba-${osx_arch} "
20
+ MAMBA_ROOT_PREFIX=" ${MINIFORGE_HOME} -micromamba-$( date +%s) "
21
+ echo " Downloading micromamba ${MICROMAMBA_VERSION} "
22
+ micromamba_exe=" $( mktemp -d) /micromamba"
23
+ curl -L -o " ${micromamba_exe} " " ${MICROMAMBA_URL} "
24
+ chmod +x " ${micromamba_exe} "
25
+ echo " Creating environment"
26
+ " ${micromamba_exe} " create --yes --root-prefix " ${MAMBA_ROOT_PREFIX} " --prefix " ${MINIFORGE_HOME} " \
27
+ --channel conda-forge \
28
+ pip python=3.12 conda-build conda-forge-ci-setup=4 " conda-build>=24.1"
29
+ echo " Moving pkgs cache from ${MAMBA_ROOT_PREFIX} to ${MINIFORGE_HOME} "
30
+ mv " ${MAMBA_ROOT_PREFIX} /pkgs" " ${MINIFORGE_HOME} "
31
+ echo " Cleaning up micromamba"
32
+ rm -rf " ${MAMBA_ROOT_PREFIX} " " ${micromamba_exe} " || true
33
+ ( endgroup " Provisioning base env with micromamba" ) 2> /dev/null
20
34
21
35
( startgroup " Configuring conda" ) 2> /dev/null
22
-
23
- source ${MINIFORGE_HOME} /etc/profile.d/conda.sh
36
+ echo " Activating environment "
37
+ source " ${MINIFORGE_HOME} /etc/profile.d/conda.sh"
24
38
conda activate base
25
39
export CONDA_SOLVER=" libmamba"
26
40
export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1
27
41
28
- mamba install --update-specs --quiet --yes --channel conda-forge --strict-channel-priority \
29
- pip mamba conda-build conda-forge-ci-setup=4 " conda-build>=24.1"
30
- mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \
31
- pip mamba conda-build conda-forge-ci-setup=4 " conda-build>=24.1"
42
+
32
43
33
44
34
45
84
95
85
96
( startgroup " Inspecting artifacts" ) 2> /dev/null
86
97
87
- # inspect_artifacts was only added in conda-forge-ci-setup 4.6.0
88
- command -v inspect_artifacts > /dev/null 2>&1 && inspect_artifacts || echo " inspect_artifacts needs conda-forge-ci-setup >=4.6.0 "
98
+ # inspect_artifacts was only added in conda-forge-ci-setup 4.9.4
99
+ command -v inspect_artifacts > /dev/null 2>&1 && inspect_artifacts --recipe-dir ./conda.recipe -m ./.ci_support/ ${CONFIG} .yaml || echo " inspect_artifacts needs conda-forge-ci-setup >=4.9.4 "
89
100
90
101
( endgroup " Inspecting artifacts" ) 2> /dev/null
91
102
0 commit comments