-
-
Notifications
You must be signed in to change notification settings - Fork 360
/
before_install.sh
executable file
·57 lines (45 loc) · 2.08 KB
/
before_install.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
#!/bin/sh
set -eu
# Remove pre-installed things in Travis image
if ls /etc/apt/sources.list.d/pgdg* 2>/dev/null >/dev/null; then sudo mv /etc/apt/sources.list.d/pgdg* /tmp; fi
dpkg -l | grep postgresql || /bin/true
dpkg -l | grep postgis || /bin/true
sudo apt-get remove --purge postgresql* libpq-dev libpq5 || /bin/true
sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install -y --allow-unauthenticated protobuf-c-compiler libprotobuf-c0-dev bison flex libfribidi-dev cmake librsvg2-dev colordiff libpq-dev libpng-dev libjpeg-dev libgif-dev libgeos-dev libfreetype6-dev libfcgi-dev libcurl4-gnutls-dev libcairo2-dev libgdal-dev libproj-dev libxml2-dev libexempi-dev lcov lftp postgis libharfbuzz-dev gdal-bin ccache curl postgresql-server-dev-10 postgresql-10-postgis-3 postgresql-10-postgis-3-scripts swig g++ ca-certificates
# following are already installed on Travis CI
#sudo apt-get install --allow-unauthenticated php-dev python-dev python3-dev
sudo apt-get install -y --allow-unauthenticated libmono-system-drawing4.0-cil mono-mcs
sudo apt-get install -y --allow-unauthenticated libperl-dev
sudo apt-get install -y --allow-unauthenticated openjdk-8-jdk
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
# list installed and available Python versions
# pyenv versions
# echo $(pyenv root)
# set the global Python version
pyenv global $PYTHON_VERSION
# check we are using the correct versions
pyenv which pip
pyenv which python
pip install cryptography==3.4.6 # avoid requiring rust compiler for the cryptography dependency
pip install cpp-coveralls pyflakes lxml
pip install -r msautotest/requirements.txt
export CC="ccache gcc"
export CXX="ccache g++"
sudo sed -i 's/md5/trust/' /etc/postgresql/10/main/pg_hba.conf
sudo sed -i 's/peer/trust/' /etc/postgresql/10/main/pg_hba.conf
sudo service postgresql restart 10
cd msautotest
python -m pyflakes .
./create_postgis_test_data.sh
if [ $PYTHON_VERSION = "2.7" ]; then
python -m SimpleHTTPServer &> /dev/null &
else
# py3
python -m http.server &> /dev/null &
fi
cd ..
touch maplexer.l
touch mapparser.y