forked from flux-framework/flux-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
147 lines (128 loc) · 5.07 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
language: c
sudo: false
compiler:
- gcc
- clang
matrix:
include:
- compiler: gcc
env: COVERAGE=t ARGS=--enable-caliper
- compiler: gcc
env: T_INSTALL=t
- compiler: clang
env: CPPCHECK=t ARGS=--enable-sanitizer CC=clang-3.8 CXX=clang++-3.8
- compiler: gcc
env: CC=gcc-4.9
- compiler: clang
env: ARGS=--enable-caliper CC=clang-3.8 CXX=clang++-3.8
cache:
directories:
- $HOME/local
- $HOME/.luarocks
- $HOME/.ccache
- $HOME/.local
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
- george-edison55-precise-backports # CMake 3.0
packages:
- cmake
- cmake-data
- clang-3.8
- gcc-4.9
- g++-4.9
- libmunge-dev
- lua5.1
- liblua5.1-0-dev
- luarocks
- uuid-dev
- aspell
- aspell-en
- ccache
- apport # for coredumps
- gdb
- valgrind
coverity_scan:
project:
name: "grondo/flux-core"
description: "Build submitted via Travis CI"
notification_email: [email protected]
build_command_prepend: "./autogen.sh && ./configure"
build_command: "make -j 4"
branch_pattern: coverity_scan
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: "T06LmG6hAwmRculQGfmV06A0f2i9rPoc8itDwyWkmg2CbtCqDyYV93V53jsVknqKA1LA9+Yo7Q3bJnnEAWI7kWAptTcL5ipRycYkl5FqoYawkwRdQW3giZwbs9zRchrwFmZ03N0hRfl31IntXhDmj5EkHOZoduMpkQFFGo0XDC4="
before_install:
# Do not run coverity-scan on every build in matrix
- test "${TRAVIS_BRANCH}" != 'coverity_scan' -o "${TRAVIS_JOB_NUMBER##*.}" = '1' || exit 0
#
- test "$TRAVIS_PULL_REQUEST" == "false" || export CCACHE_READONLY=1
- if test "$CC" = "clang"; then export CCACHE_CPP2=1; fi
- eval $(./src/test/travis-dep-builder.sh --printenv)
- ./src/test/travis-dep-builder.sh --cachedir=$HOME/local/.cache
# coveralls-lcov required only for coveralls upload:
- if test "$COVERAGE" = "t" ; then gem install coveralls-lcov; fi
# Ensure we always use internal <flux/core.h> by placing a dummy file
# in the same path as ZMQ_FLAGS:
- mkdir -p $HOME/local/include/flux
- echo '#error Non-build-tree flux/core.h!' > $HOME/local/include/flux/core.h
script:
# Skip build if we already ran coverity-scan
- test "${TRAVIS_BRANCH}" != 'coverity_scan' || exit 0
- ulimit -c unlimited
- export CC="ccache $CC"
- export MAKECMDS="make distcheck"
# Ensure travis builds libev such that libfaketime will work:
# (force libev to *not* use syscall interface for clock_gettime())
- export CPPFLAGS="-DEV_USE_CLOCK_SYSCALL=0 -DEV_USE_MONOTONIC=1"
# Travis has limited resources, even though number of processors might
# might appear to be large. Limit session size for testing to 5 to avoid
# spurious timeouts.
- export FLUX_TEST_SIZE_MAX=5
# Invoke MPI tests
- export TEST_MPI=t
# Enable coverage for $CC-coverage build
# We can't use distcheck here, it doesn't play well with coverage testing:
- if test "$COVERAGE" = "t" ; then ARGS="$ARGS --enable-code-coverage"; MAKECMDS="make && make check-code-coverage && lcov -l flux*-coverage.info"; fi
# Use make install for T_INSTALL:
- if test "$T_INSTALL" = "t" ; then ARGS="$ARGS --prefix=/tmp/flux"; MAKECMDS="make && make install && /tmp/flux/bin/flux keygen && FLUX_TEST_INSTALLED_PATH=/tmp/flux/bin make check"; fi
# Use src/test/cppcheck.sh instead of make?:
- if test "$CPPCHECK" = "t" ; then MAKECMDS="sh -x src/test/cppcheck.sh && make"; fi
- export FLUX_TESTS_LOGFILE=t
- if test "$COVERITY_SCAN_BRANCH" != "1" ; then ./autogen.sh && ./configure ${ARGS} && eval ${MAKECMDS}; fi
after_success:
- ccache -s
# Upload results to coveralls.io for first job of N
- if test "$COVERAGE" = "t" ; then coveralls-lcov flux*-coverage.info; bash <(curl -s https://codecov.io/bash) ; fi
after_failure:
- find . -name t[0-9]*.output | xargs -i sh -c 'printf "\033[31mFound {}\033[39m\n";cat {}'
- find . -name *.broker.log | xargs -i sh -c 'printf "\033[31mFound {}\033[39m\n";cat {}'
- src/test/backtrace-all.sh
- cat config.log
# Issue #997 debugging
- cat src/common/libflux/test_reactor.log
before_deploy:
# Get anchor (formatted properly) and base URI for latest tag in NEWS file
- export ANCHOR=$(sed -n '/^flux-core version/{s/\.//g; s/\s/-/gp;Q}' NEWS.md)
- export TAG_URI="https://github.com/${TRAVIS_REPO_SLUG}/blob/${TRAVIS_TAG}"
- export TARBALL=$(echo flux-core*.tar.gz)
- ls -l $TARBALL
- echo "Deploying tag ${TRAVIS_TAG} as $TARBALL"
deploy:
provider: releases
skip_cleanup: true
file: $TARBALL
prerelease: true
body: "View [Release Notes](${TAG_URI}/NEWS.md#${ANCHOR}) for flux-core ${TRAVIS_TAG}"
api_key:
secure: I7ckZ7Ei9oLIe8WZ8OH3EgZz81IFCIekx+v/+g3sJa6q15URlfZhVVFtiUpsJRktHcb39AflWZiEIX+HdUZyXtuTt9IES1XBIKH7x/zUL0x6f1DZKAhBx9ktYzdO/M+SpmDUg6RYxcdjVmSHZ9u935TDo104U+dY0990ZSFrpco=
on:
# Only deploy from first job in build matrix
condition: $TRAVIS_JOB_NUMBER = $TRAVIS_BUILD_NUMBER.1
tags: true
repo: flux-framework/flux-core