forked from micolous/s2-geometry-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtravis.sh
executable file
·41 lines (34 loc) · 879 Bytes
/
travis.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
#!/bin/sh -x
# Continuous integration script for Travis
# Build the library and install it.
echo "## Building and installing libs2..."
cd geometry
cmake .
make -j3
sudo make install
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
sudo ldconfig -v | grep libs2
fi
# Build and run the C++ tests
echo "## Building and running the C++ tests..."
cd tests
cmake .
make -j3
./tests || exit 1
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
# We really want to use the system version of Python. Travis'
# has broken distutils paths, and assumes a virtualenv.
PATH="/usr/bin:${PATH}"
which python2.7
python2.7 -V
fi
# Build and install the Python bindings
echo "## Building and installing the Python bindings..."
cd ../python
cmake .
make VERBOSE=1
sudo make install
# Run the Python tests
echo "## Running the Python tests..."
python2.7 -v -c 'import s2'
python2.7 test.py || exit 1