forked from flux-framework/flux-sched-v0.7
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
132 lines (122 loc) · 5.35 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
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
- GITHUB_RELEASES_DEPLOY=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: "Centos 7: docker-deploy"
compiler: gcc
env:
- ARGS="--prefix=/usr"
- IMG=centos7
- DOCKER_TAG=t
env:
global:
- TAP_DRIVER_QUIET=1
- DOCKERREPO=fluxrm/flux-sched
- DOCKER_STABLE_BRANCH=v0.7
- DOCKER_USERNAME=travisflux
# echo DOCKER_PASSWORD=xxx | travis encrypt -r flux-framework/flux-sched-v0.7
- secure: "l3o8dDIkYDGV8IU0MXlI768KnaOrWspwg7CU/beTzJluqFB1O7fhtZwbXBTIA/f3Be6Eet28hIRjHno2wjgRFFqeRNb/JsrdM1hM66vYC/trdO7Fuyq5xgKgXyd906WgS4n+IeIEX+XMwbbG0a2teo9OPATG/UKBeeKxNSbhUJItbzgoDRsGmJLWpMQVlR1QdkMceBXfHzkjo6ivpuRQ79Znwz02RVtSi75dgBdFl70TDHH5/qZcTNckkQZrOwjphYmc0wf2dq99ElzGxt9LdOUxBBN6TTZB+7j4HUIVZxIG0mrfZ55JeN2uxnvyjuxAZt0N+LUUBII0KGtw7G+x5scLJxxD9oTDSV6ppuOAKcxvHO2y4inIqLnJN727rxMa4j7131qqjRyCdT3jMVghY5D7gvExO9DjKSkkHoIUTEMKqnbfai9PQJ85qKyxjm4JrXau/bN3hZlZ6c7QylCHCW17YiTshaXBuJYvVWPr3xC77JKu0/7ClNZb+YdIwN7DgvtgrPDBvi3fZwSdAT7zBrFH+BPADmRu2KRk1/7qAjPb9RPyqW5me1cGLadMF8VaPHceI/EK2VruGCJXEem/OHyE35P+GtjBJF/ecYguDC/yI9TZ81ZnZ2jjTiX/9udFus8/cZjG3GSpYR+Vh/CkglrCxDJePcFVs3ZNdpSP8/A="
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-v0.7" \
-a "$TRAVIS_PULL_REQUEST" = "false"; then
if test -n "$TRAVIS_TAG"; then
# Normal tag: use tag as suffix:
export TAGNAME="${DOCKERREPO}:${IMG}-${TRAVIS_TAG}"
elif test "$TRAVIS_BRANCH" = "master"; then
# Builds on master get tagged with "stable branch" suffix:
export TAGNAME="${DOCKERREPO}:${IMG}${DOCKER_STABLE_BRANCH:+-$DOCKER_STABLE_BRANCH}"
fi
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 && \
echo "docker push ${TAGNAME}"
docker push ${TAGNAME}
# If this is the bionic build, then also tag without image name:
# Either use TRAVIS_TAG if set, or DOCKER_STABLE_BRANCH if set, or "latest"
if echo "$TAGNAME" | grep -q "bionic"; then
t="${DOCKERREPO}:${TRAVIS_TAG:-${DOCKER_STABLE_BRANCH:-latest}}"
echo "docker push ${t}"
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:
# Generate personal access token at github.com/settings/token, encrypt with
# cat <secure token> | travis encrypt -r <repo_slug>
secure: "MXbnDeXX+nDuQWZcp7qm/S3RDw501P7j21mOq9g7x6vWL5yX9EPIfi+ZGm0DENZAn7j74Wz/bgd4Bi7BkKlcYDPuFjIkTFsyg6jS8RukZzEsy1D6rFbwuQWGMvIq1BYsjyP1NfYHoe6QwrQYegqWGduzbTTBoC7q69jxukLofPO9c6C/mXfAPCoqpsnNqqk81eL3xA3+BXgLHm1D6uY0udbYoiSEYneDAKVejvMizGikWeJTzB9GU+vPQth3utbClxR/7i6mp3JQV2JrwB/GjoT/1oXxHxMzUvxyJxTqZpeqpmsTphe/uTwto0mUoFD3seOyRuFqIM+uyB7P6q69d37gyqpdiXLNY+cWs0vdNu1/9AH360j7qkD5wglaaZlc7O9Ids86h7Mkdj9e1kg0S59s4rfz+8Zp91HEbpm55LWoWRm7gjS9ivf9bSFyFxEeNiTwtwIm8hdxOBDhdp+sgAqdEWD+dY1ycvVlgOxxFhpvbMwFm4YLF1cSpcLN+tYWMM3et28vCmkF80bn8IiZwb9+bVOhkpMf93cMqZQ2HNHCUv/DEr/a8ectXGY896RX21RfMDSWwOMvdT9o16o5D7MwhW7PREccLHYW4H7QvQN7MrOvr//71M2azOaLXwDf1cfa5cm6StHEjH0lmxiZ/xzDnZf4Rs3UrrNGgPuIpkY="
on:
# Only deploy if GITHUB_RELEASES_DEPLOY is set
condition: $GITHUB_RELEASES_DEPLOY = "t"
tags: true
repo: flux-framework/flux-sched-v0.7
notifications:
email:
recipients:
on_success: change
on_failure: always