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 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
|
branches:
only:
- master
git:
quiet: true
depth: 5
language: c
addons:
apt:
packages:
- lcov
compiler:
- clang
- gcc
os:
- linux
- osx
env:
global:
- MAKEJOBS="-j$(getconf _NPROCESSORS_ONLN)"
- TRAVIS_COMMIT_LOG=`git log --format=fuller -2`
- COVERAGE=OFF # Currently works only with gcc on linux
before_script:
- '[[ "${TRAVIS_OS_NAME}-${TRAVIS_COMPILER}" != "linux-gcc" ]] || export COVERAGE="ON"'
script:
- |
if [ $COVERAGE = "ON" ]; then
export LDFLAGS=" -lgcov --coverage"
export CFLAGS="-O0 -ggdb -fprofile-arcs -ftest-coverage"
fi
- make $MAKEJOBS || ( echo "Build failure. Verbose build follows." && make V=1 ; false )
- make check -j1 VERBOSE=1
jobs:
include:
- stage: Benchmark
os: linux
compiler: gcc
before_script:
- export COVERAGE=OFF
script:
- make $MAKEJOBS
- make $MAKEJOBS bench
- stage: Benchmark
os: linux
compiler: gcc
env:
- CFLAGS="-march=native -mtune=native -O3"
before_script:
- export COVERAGE=OFF
script:
- make $MAKEJOBS
- make $MAKEJOBS bench
- stage: Benchmark
os: osx
compiler: clang
env:
- CFLAGS="-march=native -mtune=native -O3"
before_script:
- export COVERAGE=OFF
script:
- make $MAKEJOBS
- make $MAKEJOBS bench
- stage: Benchmark
os: osx
compiler: clang
before_script:
- export COVERAGE=OFF
script:
- make $MAKEJOBS
- make $MAKEJOBS bench
after_success:
- '[[ "$COVERAGE" != "ON" ]] || bash <(curl -s https://codecov.io/bash)'
after_script:
- printf "$TRAVIS_COMMIT_RANGE\n"
- printf "$TRAVIS_COMMIT_LOG\n"
|