This repository has been archived by the owner on Dec 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
/
.travis.yml
65 lines (55 loc) · 1.73 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
addons:
apt:
packages: lcov postgresql-server-dev-all
language: cpp
sudo: required
dist: bionic
compiler:
- gcc
#- clang
notifications:
email:
on_success: change
on_failure: always
services:
- postgresql
before_install:
- pip install --user cpp-coveralls
install:
- pwd
- g++ --version
- wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null &&
sudo apt-add-repository -y "deb https://apt.kitware.com/ubuntu/ bionic main" &&
sudo apt-get update -qq -y &&
sudo apt-get install -y cmake &&
sudo rm -r /usr/local/cmake-3.12.4/;
- cmake --version
- cd ..
- git clone https://github.com/HowardHinnant/date
- cd date
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=11 .
- make VERBOSE=1 && sudo make install
- cd ..
- git clone https://github.com/rbock/sqlpp11.git
- cd sqlpp11
- cmake -DCMAKE_BUILD_TYPE=Release .
- make && sudo make install
- cd ../sqlpp11-connector-postgresql
before_script:
- mkdir build
- cd build
- cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Debug -DCODE_COVERAGE=ON -DCMAKE_MODULE_PATH="/usr/local/lib/cmake/Sqlpp11"
- cd ..
script:
- cmake --build build
- cd build
- ctest --output-on-failure
after_success:
# Create lcov report
- lcov --directory . --capture --output-file coverage.info
# Filter out system information
- lcov --remove coverage.info '/usr/*' "${HOME}"'/build/matthijs/sqlpp11-connector-postgresql/tests/*' --output-file coverage.info
# Output
- lcov --list coverage.info
# Upload to codecov
- bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports"