forked from Ensembl/apache-faidx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
79 lines (69 loc) · 3.14 KB
/
.travis.yml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
language: c
sudo: required
dist: trusty
cache:
directories:
- $HOME/build/lairdm/apache-faidx/htslib
env:
- COVERALLS=false
- COVERALLS=true
addons:
apt:
packages:
- apache2-prefork-dev
- apache2-mpm-prefork
- libapr1-dev
- curl
- ruby-dev
- lcov
- python-minimal
before_install:
- if [ -d "htslib" ]; then (cd htslib && git pull); else git clone --branch develop --depth 1 https://github.com/lairdm/htslib.git; fi
- cd htslib
- pwd
- make
- sudo make install
- export HTSLIB_DIR=$(pwd -P)
- cd ..
- sudo ldconfig
- which gem
- gem install coveralls-lcov
- pip install --user requests
install:
- export APACHE_FAIDX_DIR=$(pwd -P)
- sed -i -e 's@APACHE_FAIDX_DIR@'$APACHE_FAIDX_DIR'@g' travisci/faidx.conf
- sed -i -e 's@APACHE_FAIDX_DIR@'$APACHE_FAIDX_DIR'@g' travisci/faidx_coveralls.load
- if [[ "$COVERALLS" == "true" ]]; then sudo ln -s $(pwd -P)/travisci/faidx_coveralls.load /etc/apache2/mods-enabled/faidx.load; else sudo ln -s $(pwd -P)/travisci/faidx.load /etc/apache2/mods-enabled/; fi
- sudo ln -s $(pwd -P)/travisci/faidx.conf /etc/apache2/mods-enabled/
- ls -l /etc/apache2/mods-enabled/
- if [[ "$COVERALLS" == "true" ]]; then lcov --directory . --zerocounters; fi
- if [[ "$COVERALLS" == "true" ]]; then make apmodule_coveralls; else make apmodule_debug; fi
- if [[ "$COVERALLS" == "true" ]]; then touch ${APACHE_FAIDX_DIR}/src/.libs/mod_faidx.gcda && chmod 666 ${APACHE_FAIDX_DIR}/src/.libs/mod_faidx.gcda && sudo chown root.root ${APACHE_FAIDX_DIR}/src/.libs/mod_faidx.gcda; fi
- if [[ "$COVERALLS" == "false" ]]; then sudo make install; fi
- ls -la ${APACHE_FAIDX_DIR}/src/.libs/
- if [[ "$COVERALLS" == "true" ]]; then sudo apache2ctl stop; else sudo apache2ctl restart; fi
# - if [[ "$COVERALLS" == "true" ]]; then apachectl -V; fi
# - if [[ "$COVERALLS" == "true" ]]; then (sudo sh -c '. /etc/apache2/envvars; /usr/sbin/apache2 -X')& fi
- ls -la ${APACHE_FAIDX_DIR}/src/.libs/
script:
- if [[ "$COVERALLS" == "true" ]]; then bash ${APACHE_FAIDX_DIR}/travisci/apache-bump.sh; fi
- if [[ "$COVERALLS" == "false" ]]; then python test/api_test.py; fi
after_success:
# - if [[ "$COVERALLS" == "true" ]]; then sudo pkill --signal HUP apache2; fi
- if [[ "$COVERALLS" == "true" ]]; then (ps auxww|grep [a]pache2); fi
- if [[ "$COVERALLS" == "true" ]]; then (ps auxww|grep [a]pache2|awk '{print $2}'|xargs -I % echo %); fi
- if [[ "$COVERALLS" == "true" ]]; then sudo sync; fi
- if [[ "$COVERALLS" == "true" ]]; then sleep 5; fi
- if [[ "$COVERALLS" == "true" ]]; then lcov --directory . --capture --output-file coverage.info; fi
- if [[ "$COVERALLS" == "true" ]]; then lcov --remove coverage.info 'test/*' '/usr/*' --output-file coverage.info; fi
- if [[ "$COVERALLS" == "true" ]]; then lcov --list coverage.info; fi
- if [[ "$COVERALLS" == "true" ]]; then coveralls-lcov --repo-token IbjuGpUJYB200lTWp8YQsRSwMBEDx9133 coverage.info; fi
- ls -la ${APACHE_FAIDX_DIR}/src/.libs/
- ps auxww
- sudo cat /var/log/apache2/error.log
after_failure:
- sudo cat /var/log/apache2/error.log
notifications:
email:
on_success: change
on_failure: change