forked from annoviko/pyclustering
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ci.sh
61 lines (46 loc) · 1.03 KB
/
ci.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
#!/bin/bash
run_ccore_job() {
echo "CI Job (travis CI): CCORE (C++ code library compilation)"
cd ccore/
make ccore
if [ $? -eq 0 ] ; then
echo "ccore library creation... success"
else
echo "ccore library creation... fail"
exit 1
fi
}
run_utcore_job() {
echo "CI Job (travis CI): UT CORE (C++ code unit-testing)"
cd ccore/
make utcore
if [ $? -eq 0 ] ; then
echo "ccore library creation... success"
else
echo "ccore library creation... fail"
exit 1
fi
# run unit-tests
cd utcore/
./utcore
}
run_python_job() {
echo "CI Job (travis CI): PYCLUSTERING (Python code unit-testing)"
PYTHONPATH=`pwd`
export PYTHONPATH=${PYTHONPATH}
coverage run --source=pyclustering --omit='pyclustering/*/tests/*,pyclustering/*/examples/*,pyclustering/ut/*' pyclustering/ut/__init__.py
coveralls
}
set -e
set -x
case $PYCLUSTERING_TARGET in
CCORE)
run_ccore_job ;;
UTCORE)
run_utcore_job ;;
PYTHON)
run_python_job ;;
*)
echo "CI Job (travis CI): Unknown target $PYCLUSTERING_TARGET"
exit 1 ;;
esac