forked from flux-framework/flux-sched
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
132 lines (122 loc) · 3.99 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
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
- GITHUB_RELEASES_DEPLOY=t
- TEST_CHECK_PREREQS=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:
- ARGS="--prefix=/usr"
- TEST_INSTALL=t
- DOCKER_TAG=t
- name: "Ubuntu: 20.04"
compiler: gcc
env:
- ARGS="--prefix=/usr"
- IMG=focal
- DOCKER_TAG=t
- name: "Centos 7: docker-deploy"
compiler: gcc
env:
- ARGS="--prefix=/usr"
- IMG=centos7
- DOCKER_TAG=t
- name: "Centos 8: docker-deploy"
compiler: gcc
env:
- ARGS="--prefix=/usr"
- IMG=centos8
- DOCKER_TAG=t
env:
global:
- TAP_DRIVER_QUIET=1
- DOCKERREPO=fluxrm/flux-sched
- DOCKER_USERNAME=travisflux
- secure: "r/VnyLaR1NPcErRnfktopohrMPo8GSJokJiQwDr2XDrglPiL4T7Qppu42ihdvtWd3U3ZYFYLImeqipZqqz7+rhWxvao6k+NTAyQWkrsAmfC8B2czUR52ozcDF3jV2C4EJth/xlzsx54Gy7YNUEITfnUbnHCZ+/FmXXjuAyEPJ3c="
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:+-${TRAVIS_TAG}}"
echo "Tagging new image $TAGNAME"
fi
script:
- |
src/test/docker/docker-run-checks.sh -j2 \
--image=${IMG} \
${TAGNAME:+--tag=${TAGNAME}} \
-- ${ARGS}
after_success:
- ccache -s
- if test "$COVERAGE" = "t"; then coveralls-lcov flux*-coverage.info; bash <(curl -s https://codecov.io/bash); fi
# Deploy resulting docker image to Docker Hub with appropriate tag
- |
if test -n "$TAGNAME"; then
echo "$DOCKER_PASSWORD" | \
docker login -u "$DOCKER_USERNAME" --password-stdin && \
docker push ${TAGNAME}
# If this is the bionic build, then also tag without image name:
if echo "$TAGNAME" | grep -q "bionic"; then
t="${DOCKERREPO}:${TRAVIS_TAG:-latest}"
docker tag "$TAGNAME" ${t} && \
docker push ${t}
fi
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 if GITHUB_RELEASES_DEPLOY is set
condition: $GITHUB_RELEASES_DEPLOY = "t"
tags: true
repo: flux-framework/flux-sched
notifications:
email:
recipients:
on_success: change
on_failure: always