-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
43 lines (39 loc) · 1.33 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
language:
- cpp
before_install:
- sudo apt-get update
# coverage
- sudo apt-get install lcov
- sudo pip install -U cpp-coveralls
- sudo pip install gcovr
# autotools
- sudo apt-get install automake
- sudo apt-get install autoconf
- sudo apt-get install libtool
- sudo apt-get install pkg-config cmake
# gtests
- sudo wget https://github.com/google/googletest/archive/release-1.7.0.tar.gz
- sudo tar xf release-1.7.0.tar.gz
- cd googletest-release-1.7.0
- sudo cmake -DBUILD_SHARED_LIBS=ON .
- sudo make
- sudo cp -a include/gtest /usr/include
- sudo cp -a libgtest_main.so libgtest.so /usr/lib/
- cd "${TRAVIS_BUILD_DIR}"
script:
- rm -f makefile
- cmake CMakeLists.txt -DNGX_URL_TESTS_COVERAGE=ON -DBUILD_TESTS=ON
- make
- make coverage
- ./tests/unit_tests
# Test build using autotools
- rm -f Makefile
- ./autogen.sh
- ./configure --prefix=/tmp/ngx_url_parser-ci
- make clean install
- test -d /tmp/ngx_url_parser-ci/lib
- test -d /tmp/ngx_url_parser-ci/include
- test -f /tmp/ngx_url_parser-ci/include/ngx_url_parser/ngx_url_parser.h
- test -f /tmp/ngx_url_parser-ci/lib/libngx_url_parser.a
after_success:
- coveralls -i ngx_url_parser.c --exclude tests -b tests/CMakeFiles/unit_tests.dir --gcov-options '\-lp'