Debian Codegraph @

CI/travis/before_install_linux

raw symbols SCIP
1 #!/bin/sh -e
2
3 . CI/travis/lib.sh
4
5 install_sphinx() {
6 $PYTHON --version
7
8 if ! is_python_at_least_ver "$PYTHON" "3.6" ; then
9 echo_red "Python version is too old no python interpreter installed"
10 return 1
11 fi
12
13 command -v $PYTHON
14 sudo $PYTHON -m pip install sphinx
15 sudo $PYTHON -m pip install sphinx-rtd-theme furo
16 }
17
18 handle_centos() {
19 # FIXME: see about adding `libserialport-dev` from EPEL ; maybe libusb-1.0.0-devel...
20 yum -y groupinstall 'Development Tools'
21
22 if is_centos_at_least_ver "8" ; then
23 # On CentOS 8, avahi-devel & doxygen are in this repo; enable it
24 yum -y install yum-utils
25 yum config-manager --set-enabled powertools
26 yum -y install python3
27 install_sphinx
28 else
29 yum -y install python3
30 install_sphinx
31 fi
32
33 # CMake has a bug when installed from repos. Must grab from kitware
34 yum -y install wget
35 wget https://github.com/Kitware/CMake/releases/download/v3.15.2/cmake-3.15.2.tar.gz
36 tar -zxvf cmake-3.15.2.tar.gz
37 cd cmake-3.15.2
38 ./bootstrap
39 make
40 make install
41 cd ..
42
43 # Need libzstd from EPEL
44 yum -y install epel-release
45 yum -y install libzstd
46
47 yum -y install libxml2-devel libusb1-devel doxygen libaio-devel \
48 avahi-devel bzip2 gzip rpm rpm-build
49
50 if [ -n "$PACKAGE_TO_INSTALL" ] ; then
51 sudo yum localinstall -y $PACKAGE_TO_INSTALL
52 elif [ "$INSTALL_FROM_SW_DOWNLOADS" = "1" ] ; then
53 wget http://swdownloads.analog.com/cse/travis_builds/${LIBIIO_BRANCH}_latest_libiio${LDIST}.rpm
54 sudo yum localinstall -y ./${LIBIIO_BRANCH}_latest_libiio${LDIST}.rpm
55 fi
56
57 $PYTHON -m pip install pylibiio --no-binary :all:
58 }
59
60 handle_generic_docker() {
61 prepare_docker_image
62 }
63
64 handle_default() {
65 sudo apt-get -qq update
66 sudo DEBIAN_FRONTEND=noninteractive apt-get install -y cmake doxygen graphviz \
67 libaio-dev libavahi-client-dev libavahi-common-dev libusb-1.0-0-dev \
68 libxml2-dev rpm tar bzip2 gzip flex bison libserialport-dev \
69 python3 python3-pip python3-setuptools
70
71 if [ -n "$PACKAGE_TO_INSTALL" ] ; then
72 sudo dpkg -i $PACKAGE_TO_INSTALL
73 elif [ "$INSTALL_FROM_SW_DOWNLOADS" = "1" ] ; then
74 wget http://swdownloads.analog.com/cse/travis_builds/${LIBIIO_BRANCH}_latest_libiio${LDIST}.deb
75 sudo dpkg -i ./${LIBIIO_BRANCH}_latest_libiio${LDIST}.deb
76 fi
77
78 sudo $PYTHON -m pip install pylibiio --no-binary :all:
79 install_sphinx
80 }
81
82 handle_ubuntu() {
83 handle_default
84 }
85
86 handle_debian() {
87 handle_default
88 }
89
90 setup_build_type_env_vars
91
92 handle_${BUILD_TYPE}