-
-
Notifications
You must be signed in to change notification settings - Fork 325
/
test.sh
executable file
·64 lines (46 loc) · 1.87 KB
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/env bash
set -ex
echo "***** Start: Testing Miniforge installer *****"
export CONDA_PATH="$HOME/miniforge"
CONSTRUCT_ROOT="${CONSTRUCT_ROOT:-$PWD}"
cd ${CONSTRUCT_ROOT}
echo "***** Get the installer *****"
INSTALLER_PATH=$(find build/ -name "Miniforge*.sh" -or -name "Miniforge*.exe"| head -n 1)
echo "***** Run the installer *****"
chmod +x $INSTALLER_PATH
if [[ "$(uname)" == MINGW* ]]; then
echo "start /wait \"\" build/Miniforge3-4.9.0-0-Windows-x86_64.exe /InstallationType=JustMe /RegisterPython=0 /S /D=$(cygpath -w $CONDA_PATH)" > install.bat
cmd.exe /c install.bat
echo "***** Setup conda *****"
source $CONDA_PATH/Scripts/activate
conda.exe config --set show_channel_urls true
echo "***** Print conda info *****"
conda.exe info
conda.exe list
echo "***** Check if we are bundling packages from msys2 or defaults *****"
conda.exe list | grep defaults && exit 1
conda.exe list | grep msys2 && exit 1
echo "***** Check if we can install a package which requires msys2 *****"
conda.exe install r-base --yes --quiet
conda.exe list
else
bash $INSTALLER_PATH -b -p $CONDA_PATH
echo "***** Setup conda *****"
source $CONDA_PATH/bin/activate
echo "***** Print conda info *****"
conda info
conda list
fi
# 2020/09/15: Running conda update switches from pypy to cpython. Not sure why
# echo "***** Run conda update *****"
# conda update --all -y
echo "***** Python path *****"
python -c "import sys; print(sys.executable)"
python -c "import sys; assert 'miniforge' in sys.executable"
echo "***** Print system informations from Python *****"
python -c "print('Hello Miniforge !')"
python -c "import platform; print(platform.architecture())"
python -c "import platform; print(platform.system())"
python -c "import platform; print(platform.machine())"
python -c "import platform; print(platform.release())"
echo "***** Done: Testing installer *****"