This repository has been archived by the owner on Aug 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
/
.travis.yml
42 lines (40 loc) · 1.92 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
language: cpp
sudo: true
matrix:
include:
- os: osx
osx_image: xcode11.2
- os: linux
dist: bionic
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -q update; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -y install wget lcov g++-7 cmake libboost-system1.65-dev libboost-test1.65-dev libboost-program-options1.65-dev libcurl4-openssl-dev; fi
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://dl.influxdata.com/influxdb/releases/influxdb_1.7.4_amd64.deb; fi;
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo dpkg -i influxdb_1.7.4_amd64.deb; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo systemctl unmask influxdb.service; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo systemctl start influxdb; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install influxdb; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ln -sfv /usr/local/opt/influxdb/*.plist ~/Library/LaunchAgents; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then launchctl load ~/Library/LaunchAgents/homebrew.mxcl.influxdb.plist; fi
- sleep 10
- influx -execute 'CREATE DATABASE test'
before_script:
- cd $TRAVIS_BUILD_DIR; mkdir build; cd build
script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cmake ..;
else cmake .. -DCMAKE_C_COMPILER=/usr/bin/gcc-7 -DCMAKE_CXX_COMPILER=/usr/bin/g++-7 -DCMAKE_BUILD_TYPE=Debug; fi;
- make -j
- make test
after_success:
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
cd ${TRAVIS_BUILD_DIR}/build
lcov --directory . --capture --output-file coverage.info
lcov --remove coverage.info '/opt/*' '/usr/*' --output-file coverage.info
lcov --list coverage.info
bash <(curl -s https://codecov.io/bash) || echo "No coverage reports"
fi;
notifications:
email: false