mirror of
https://github.com/simonbrunel/qtpromise.git
synced 2024-11-23 11:17:12 +08:00
Setup Travis CI builds and code coverage
Built with Qt 5.4.2/GCC 4.8.4, code coverage with LCOV 1.13 and reported to Codecov.
This commit is contained in:
parent
4919a68959
commit
a8ad3619b9
8
.gitignore
vendored
8
.gitignore
vendored
@ -1 +1,7 @@
|
||||
/*.user
|
||||
*.gcno
|
||||
*.gcda
|
||||
*.moc
|
||||
*.o
|
||||
*.user
|
||||
Makefile
|
||||
coverage.info
|
||||
|
32
.travis.yml
Normal file
32
.travis.yml
Normal file
@ -0,0 +1,32 @@
|
||||
sudo: required
|
||||
dist: trusty
|
||||
language: cpp
|
||||
compiler: gcc
|
||||
|
||||
before_install:
|
||||
- sudo add-apt-repository -y ppa:beineri/opt-qt542-trusty
|
||||
- sudo apt-get update -qq
|
||||
|
||||
install:
|
||||
- sudo apt-get install -qq qt54base
|
||||
- source /opt/qt54/bin/qt54-env.sh
|
||||
- wget http://archive.ubuntu.com/ubuntu/pool/universe/l/lcov/lcov_1.13.orig.tar.gz
|
||||
- tar xf lcov_1.13.orig.tar.gz
|
||||
- cd lcov-1.13/
|
||||
- sudo make install
|
||||
- cd ..
|
||||
|
||||
before_script:
|
||||
- qmake --version
|
||||
- lcov --version
|
||||
- gcc --version
|
||||
|
||||
script:
|
||||
- qmake qtpromise.pro CONFIG+=coverage
|
||||
- make -j4
|
||||
- make -j4 check --quiet
|
||||
- lcov -capture --directory . --o coverage.info
|
||||
- lcov -e coverage.info '**/src/**/*' -o coverage.info
|
||||
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash) -f coverage.info
|
@ -1,7 +1,11 @@
|
||||
<a href="https://promisesaplus.com/" title="Promises/A+ 1.1"><img src="http://promisesaplus.com/assets/logo-small.png" alt="Promises/A+" align="right"/></a>
|
||||
|
||||
# QtPromise
|
||||
[Promises/A+](https://promisesaplus.com/) implementation for [Qt](https://www.qt.io/).
|
||||
[![Travis](https://img.shields.io/travis/simonbrunel/qtpromise.svg?style=flat-square)](https://travis-ci.org/simonbrunel/qtpromise) [![coverage](https://img.shields.io/codecov/c/github/simonbrunel/qtpromise.svg?style=flat-square)](https://codecov.io/gh/simonbrunel/qtpromise)
|
||||
|
||||
[Promises/A+](https://promisesaplus.com/) implementation for [Qt/C++](https://www.qt.io/).
|
||||
|
||||
Requires [Qt 5.4](https://www.qt.io/download/) or later.
|
||||
|
||||
## License
|
||||
QtPromise is available under the [MIT license](LICENSE.md).
|
||||
|
@ -1,2 +1,3 @@
|
||||
INCLUDEPATH += $$PWD/include $$PWD/src
|
||||
DEPENDPATH += $$PWD/include $$PWD/src
|
||||
CONFIG += c++11
|
||||
|
@ -1,3 +1,4 @@
|
||||
QT += concurrent
|
||||
TARGET = tst_future
|
||||
SOURCES += $$PWD/tst_future.cpp
|
||||
|
||||
|
@ -1,6 +1,18 @@
|
||||
TEMPLATE = app
|
||||
CONFIG += testcase
|
||||
QT += testlib concurrent
|
||||
QT += testlib
|
||||
QT -= gui
|
||||
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
coverage: {
|
||||
gcc: {
|
||||
message("Code coverage enabled (gcov)")
|
||||
QMAKE_CXXFLAGS += --coverage -O0 -g
|
||||
QMAKE_LFLAGS += --coverage -O0 -g
|
||||
} else {
|
||||
message("Code coverage only available when compiling with GCC")
|
||||
}
|
||||
}
|
||||
|
||||
include(../../qtpromise.pri)
|
||||
|
Loading…
Reference in New Issue
Block a user