forked from flux-framework/flux-sched
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
124 lines (108 loc) · 4 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
language: c
sudo: false
compiler:
- gcc
- clang
matrix:
include:
- compiler: gcc
env: COVERAGE=t
- compiler: gcc
env: TEST_INSTALL=t
- compiler: clang
env: CC=clang-3.8 CXX=clang++-3.8
- compiler: clang
env: CPPCHECK=t
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
- lua5.1
- liblua5.1-0-dev
- luarocks
- uuid-dev
- aspell
- libopenmpi-dev
- ccache
- apport # for coredumps
- gdb
- libhwloc-dev
- libmunge-dev
- munge
- lcov
before_install:
- wget https://raw.githubusercontent.com/flux-framework/flux-core/master/src/test/travis-dep-builder.sh
- eval $(bash ./travis-dep-builder.sh --printenv)
- export PKG_CONFIG_PATH=$HOME/local2/lib/pkgconfig:${PKG_CONFIG_PATH}
- test "$TRAVIS_PULL_REQUEST" == "false" || export CCACHE_READONLY=1
- if test "$CC" = "clang"; then export CCACHE_CPP2=1; fi
- depbuilder=$(pwd)/travis-dep-builder.sh
- (mkdir -p ../depbuild && cd ../depbuild && bash ${depbuilder} --cachedir=$HOME/local/.cache)
# coveralls-lcov required only for coveralls.io upload:
- if test "$COVERAGE" = "t"; then gem install coveralls-lcov; fi
script:
- ulimit -c unlimited
- export CC="ccache $CC"
- export MAKECMDS="make distcheck"
- export FLUX_TESTS_LOGFILE=t
- git clone https://github.com/flux-framework/flux-core.git $HOME/flux-core
- (cd $HOME/flux-core && ./autogen.sh && ./configure --prefix=$HOME/local2 && make -j 2 && make install)
- (rm -fr $HOME/flux-core)
- (find $HOME/local2/lib -name \*.la | xargs rm -f)
- ($HOME/local2/bin/flux keygen)
# Set LD_LIBRARY_PATH so that flux-core libs can be found
- export LD_LIBRARY_PATH=$HOME/local2/lib:${LD_LIBRARY_PATH}
# Enable coverage for $CC+coverage build
- if test "$COVERAGE" = "t" ; then ARGS=--enable-code-coverage; MAKECMDS="make && make check-code-coverage && lcov -l flux-*coverage.info" ; fi
# Use "make install" and set FLUX_SCHED_TEST_INSTALLED in environment for installed testing:
- if test "$TEST_INSTALL" = "t"; then ARGS=--prefix=$HOME/local2; MAKECMDS="make && make install && FLUX_SCHED_TEST_INSTALLED=t make check"; fi
# cppcheck instead of make
- >
if test "$CPPCHECK" = "t"; then
MAKECMDS="cppcheck --force --inline-suppr -j 2 --std=c99 --quiet
--error-exitcode=1
-i src/common/libtap
.";
fi
- autoreconf -i && ./configure ${ARGS} && echo $MAKECMDS && eval ${MAKECMDS}
after_success:
- ccache -s
- 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 -print0 | xargs -0 -I'{}' sh -c 'printf "\033[31mFound {}\033[39m\n";cat {}'
- find . -name *.broker.log -print0 | xargs -0 -I'{}' sh -c 'printf "\033[31mFound {}\033[39m\n";cat {}'
- src/test/backtrace-all.sh
before_deploy:
# Get anchor (formatted properly) and base URI for latest tag in NEWS file
- export ANCHOR=$(sed -n '/^flux-sched 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-sched*.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-sched ${TRAVIS_TAG}."
api_key:
secure: h+xiQ6lg0SNrHor+cwSKFCUBDk51maSQILAhLYZXWB8LvAib7TQ17ZCUiwYZ8Pwt6aacrqshWuYapbm7PzTv2kfQqtuVgPh0ILphXGXyokhv1PpIlz3bePKfa/cNwPr1GAHtAxqsZndqvRMKeAmkfH00iezGzK72xwhslnbqVfE=
on:
# Only deploy from first job in build matrix
condition: $TRAVIS_JOB_NUMBER = $TRAVIS_BUILD_NUMBER.1
tags: true
repo: flux-framework/flux-sched