-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
50 lines (47 loc) · 2.51 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
language: c
compiler:
- gcc
- clang
# Change this to your needs
before_install:
# on the coverity_scan branch take only the first job, which is gcc
- test $TRAVIS_BRANCH != coverity_scan -o ${TRAVIS_JOB_NUMBER##*.} = 1 || exit 0
- sudo apt-get update -qq
- sudo apt-get install -y locales cmake pkg-config libxml2-dev libyajl-dev libdbus-1-dev gettext valgrind icc-profiles-free lcov pkg-config libxfixes-dev x11proto-xext-dev libxinerama-dev libxrandr-dev libxxf86vm-dev x11proto-xf86vidmode-dev liblcms2-dev libraw-dev libexiv2-dev libcups2-dev
- if [[ $TRAVIS_BRANCH == coverity_scan ]] && [[ "$CC" == "gcc" ]]; then
echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-;
fi
before_script:
- if [[ "$CC" == "gcc" ]]; then
cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_DOCU_OYRANOS:BOOL=OFF -DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR/../install $TRAVIS_BUILD_DIR;
if [[ $TRAVIS_BRANCH != coverity_scan ]]; then
cmake -DUSE_GCOV:BOOL=ON $TRAVIS_BUILD_DIR;
fi
else
cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DENABLE_STATIC_LIBS_OYRANOS:BOOL=OFF -DENABLE_TESTS_OYRANOS:BOOL=OFF -DENABLE_DOCU_OYRANOS:BOOL=OFF -DENABLE_OPENMP:BOOL=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR/../install $TRAVIS_BUILD_DIR;
fi
script:
- if [[ $TRAVIS_BRANCH != coverity_scan ]]; then
make;
fi
- if [[ $TRAVIS_BRANCH != coverity_scan ]] && [[ "$CC" == "gcc" ]]; then
pwd;
OY_MODULE_PATH=src/modules XDG_DATA_DIRS=$TRAVIS_BUILD_DIR make check;
OY_MODULE_PATH=src/modules XDG_DATA_DIRS=$TRAVIS_BUILD_DIR make test-2;
OY_MODULE_PATH=src/modules XDG_DATA_DIRS=$TRAVIS_BUILD_DIR make coverage;
bash <(curl -s https://codecov.io/bash) -f coverage.info -R $TRAVIS_BUILD_DIR/.. -X gcov;
fi
env:
global:
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "qRvBRQJppwIFkRSeFHv0cBuaXP8psfbcwHIo4ASD4ye7pSZvLbY9rmvJMyWHLUIM9QGAd+UFSiq23wd1RtU/SVxtCSp/EizTD4Uml7DnMAUWxj8tp1GXKq7TVjzvBCOhT2kArH1cZ/gQ0bj4GrFwIZE4AQn3EuSZgrNlL+tatqc="
addons:
coverity_scan:
project:
name: "oyranos-cms/oyranos"
description: "Build submitted via Travis CI"
notification_email: [email protected]
build_command_prepend: "cmake -DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR/../install $TRAVIS_BUILD_DIR; make clean"
build_command: "make"
branch_pattern: coverity_scan