forked from flux-framework/flux-sched
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
101 lines (92 loc) · 2.96 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
sudo: required
services: docker
dist: trusty
language: c
matrix:
include:
- name: "Ubuntu: gcc-8, distcheck"
compiler: gcc-8
env:
- CC=gcc-8
- CXX=g++-8
- DISTCHECK=t
- name: "Ubuntu: clang-6.0 chain-lint"
compiler: clang-6.0
env:
- CC=clang-6.0
- CXX=clang++-6.0
- chain_lint=t
- name: "Ubuntu: COVERAGE=t"
compiler: gcc
env:
- COVERAGE=t
- name: "Ubuntu: TEST_INSTALL docker-deploy"
compiler: gcc
env:
- TEST_INSTALL=t
- DOCKER_TAG=t
- name: "Centos 7: docker-deploy"
compiler: gcc
env:
- IMG=centos7
- DOCKER_TAG=t
env:
global:
- TAP_DRIVER_QUIET=1
- DOCKERREPO=fluxrm/flux-sched
- DOCKER_USERNAME=travisflux
cache:
directories:
- $HOME/.ccache
before_install:
# coveralls-lcov required only for coveralls.io upload:
- if test "$COVERAGE" = "t"; then gem install coveralls-lcov; fi
- if test -z "$IMG"; then IMG=bionic; fi
# Tag image if this build is on master or result of a tag:
- |
if test "$DOCKER_TAG" = "t" \
-a "$TRAVIS_REPO_SLUG" = "flux-framework/flux-sched" \
-a "$TRAVIS_PULL_REQUEST" = "false" \
-a \( "$TRAVIS_BRANCH" = "master" -o -n "$TRAVIS_TAG" \); then
export TAGNAME="${DOCKERREPO}:${IMG}-${TRAVIS_TAG:-latest}"
echo "Tagging new image $TAGNAME"
fi
script:
- |
src/test/docker/docker-run-checks.sh -j2 \
--image=${IMG} \
${TAGNAME:+--tag=${TAGNAME}}
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 test-suite.log | xargs -i sh -c 'printf "===XXX {} XXX===";cat {}'
- 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
notifications:
email:
recipients:
on_success: change
on_failure: always