Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
yt-project
GitHub Repository: yt-project/yt
Path: blob/main/tests/ci_install.sh
928 views
1
set -x # Show which command is being run
2
3
# Sets default backend to Agg
4
cp tests/matplotlibrc .
5
6
# Step 1: pre-install required packages
7
if [[ ${dependencies} == "full" || ${dependencies} == "cartopy" ]]; then
8
case ${RUNNER_OS} in
9
linux|Linux)
10
sudo apt-get -qqy update
11
sudo apt-get -qqy install \
12
libhdf5-serial-dev \
13
libnetcdf-dev \
14
libopenmpi-dev \
15
libfuse2
16
;;
17
osx|macOS)
18
sudo mkdir -p /usr/local/man
19
sudo chown -R "${USER}:admin" /usr/local/man
20
# uninstalling pkg-config to workaround a bug in macOS image
21
# https://github.com/Homebrew/homebrew-core/pull/198691#issuecomment-2495500991
22
# this can be cleaned-up once the following patch is released:
23
# https://github.com/actions/runner-images/pull/11015
24
HOMEBREW_NO_AUTO_UPDATE=1 brew uninstall pkg-config@0.29.2 || true
25
HOMEBREW_NO_AUTO_UPDATE=1 brew install hdf5 open-mpi netcdf ccache macfuse
26
;;
27
esac
28
fi
29
30
# Step 2: install deps and yt
31
# installing in editable mode so this script may be used locally by developers
32
# but the primary intention is to embed this script in CI jobs
33
if [[ ${dependencies} == "minimal" ]]; then
34
# test with minimal versions of runtime dependencies
35
python -m pip install -e ".[test]" -r minimal_requirements.txt
36
elif [[ ${dependencies} == "cartopy" ]]; then
37
python -m pip install 'cartopy>=0.22'
38
# scipy is an optional dependency to cartopy
39
python -m pip install scipy
40
python -m pip install -e ".[test]"
41
elif [[ ${dependencies} == "full" ]]; then
42
# test with all optional runtime dependencies
43
python -m pip install -e ".[test,full]"
44
else
45
# test with no special requirements
46
python -m pip install -e ".[test]"
47
fi
48
49
# Disable excessive output
50
yt config set --local yt log_level 50
51
cat yt.toml
52
53
set +x
54
55