forked from ethereum/aleth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
172 lines (165 loc) · 7.72 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
#------------------------------------------------------------------------------
# TravisCI configuration file for cpp-ethereum.
#
# The documentation for cpp-ethereum is hosted at http://cpp-ethereum.org
#
# ------------------------------------------------------------------------------
# This file is part of cpp-ethereum.
#
# cpp-ethereum is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cpp-ethereum is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>
#
# (c) 2016 cpp-ethereum contributors.
#------------------------------------------------------------------------------
language: cpp
branches:
# We need to whitelist the branches which we want to have "push" automation.
# Pull request automation is not constrained to this set of branches.
only:
- develop
- release
- /travis/
- hunter
env:
global:
- TRAVIS_BUILD_TYPE=RelWithDebInfo
- TRAVIS_TESTS=On
- secure: "Nm9HEvhW8wtbF9v44g2Vo2CfX8cFlw3UWutHMmVl5nrcri34BVPXulsPF3CrIdoGgdBQvGxzNmbmAgi0KokaWhLZ2WvuDUXRAU8wuU3SB/AV7hNIGFZDqgk1LBBzwaFngqDCqqIQ29v2Z59s3y8qakmPQbR8eNJ1YAc2F9O8iVI="
matrix:
include:
# Ubuntu 14.04 LTS "Trusty Tahr"
# https://en.wikipedia.org/wiki/List_of_Ubuntu_releases#Ubuntu_14.04_LTS_.28Trusty_Tahr.29
#
# TravisCI doesn't directly support any new Ubuntu releases. These is
# some Docker support, which we should probably investigate, at least for
# Ubuntu 16.04 LTS "Xenial Xerus"
# See https://en.wikipedia.org/wiki/List_of_Ubuntu_releases#Ubuntu_16.04_LTS_.28Xenial_Xerus.29.
# See https://github.com/ethereum/cpp-ethereum/issues/3269
- os: linux
dist: trusty
sudo: required
node_js:
- "8"
env:
- ZIP_SUFFIX=ubuntu-trusty
# OS X Mavericks (10.9)
# https://en.wikipedia.org/wiki/OS_X_Mavericks
# - disabled because it takes too long with non-binary homebrew
#- os: osx
# osx_image: beta-xcode6.2
# env:
# - ZIP_SUFFIX=osx-mavericks
# OS X Yosemite (10.10)
# https://en.wikipedia.org/wiki/OS_X_Yosemite
# - disabled because it takes too long with non-binary homebrew
#- os: osx
# osx_image: xcode7.1
# env:
# - TRAVIS_TESTS=Off
# - ZIP_SUFFIX=osx-yosemite
# OS X El Capitan (10.11)
# https://en.wikipedia.org/wiki/OS_X_El_Capitan
#
# TODO - This is currently disabled because it is consistently
# running into the 48min timeout. We need to make this process
# quicker.
#
# See https://github.com/ethereum/cpp-ethereum/issues/3267
#
#- os: osx
# osx_image: xcode7.3
# env:
# - TRAVIS_TESTS=Off
# - ZIP_SUFFIX=osx-elcapitan
# macOS Sierra (10.12)
# https://en.wikipedia.org/wiki/MacOS_Sierra
#
# TODO - Tests are currently disabled because they are consistently
# running into the 48min timeout. We need to make this process
# quicker.
#
# See https://github.com/ethereum/cpp-ethereum/issues/3268
- os: osx
osx_image: xcode8.2
env:
- TRAVIS_TESTS=Off
- ZIP_SUFFIX=macos-sierra
git:
depth: 2
cache:
ccache: true
directories:
- ~/.ethash
- ~/.local
- ~/Library/Caches/Homebrew
# Cache whole deps dir hoping you will not need to download and
# build external dependencies next build.
- $TRAVIS_BUILD_DIR/build/deps
install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then clang --version; travis_wait 150 brew install llvm; $(brew --prefix llvm)/bin/clang --version; export PATH=$(brew --prefix llvm)/bin:$PATH; export CC=$(brew --prefix llvm)/bin/clang; export CXX=$(brew --prefix llvm)/bin/clang++; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./scripts/install_cmake.sh && ./scripts/install_solc_lllc.sh; fi
- ./scripts/install_deps.sh
before_script:
- ./scripts/prepare_ccache.sh
- travis_wait 150 ./scripts/build.sh $TRAVIS_BUILD_TYPE
- ./scripts/cleanup_ccache.sh
script:
- cd $TRAVIS_BUILD_DIR/build && ../scripts/tests.sh $TRAVIS_TESTS
after_success:
- cd $TRAVIS_BUILD_DIR/build
- make coverage.data
# Get CodeCov script (fixed commit) and upload coverage report.
- bash <(curl -s https://raw.githubusercontent.com/codecov/codecov-bash/d8016a07d67d813f98afdbaf98dc4f46d9806118/codecov) -X fix -f coverage.data
after_script: |
# Hunter: upload cache to the cache server.
if [[ "$TRAVIS_EVENT_TYPE" != "pull_request" ]]; then
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo pip install --upgrade requests pyopenssl; fi
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pip install requests; fi
make -C $TRAVIS_BUILD_DIR/build hunter_upload_cache
fi
deploy:
# This is the deploy target for the native build (Linux and macOS)
# which generates ZIPs per commit. We are in agreement that
# generating ZIPs per commit for the develop branch is probably
# just noise, so we only run this deployment target on 'release'.
#
# Unlike the Appveyor GitHub Releases target, the support in TravisCI
# seemingly doesn't provide a means for passing a description, tag, etc.
# In practice, we are letting the Appveyor CI do all that stuff, and
# then this deployment flow just seems to find that most recent tag,
# and just add our Linux and macOS ZIPs into the same tag, which is
# what we want to happen. But is very accidental and brittle-looking.
#
# The 'skip_cleanup' stops the workspace being cleaned out prior to
# generation of the artifacts. Strange that we should explicitly
# need to do that, but we do.
#
# Tokens in TravisCI can be generated a few different ways. Bob had
# success using the 'travis' gem, and then using that gem to
# create/edit this .travis.yml file, and then cut-and-pasting the
# good bits back out of what it generated. The gem changes all the
# whitespace and deletes comments, so cannot be used as-is. But
# it does generate an appropriate auth token.
#
# See https://docs.travis-ci.com/user/deployment/releases
# See https://blog.travis-ci.com/2013-01-28-token-token-token/
# See https://github.com/ethereum/webthree-umbrella/issues/658
#
- provider: releases
api_key:
secure: HHcAWFjVNwf8b83KVQnEa172Eo7aur+scVCq4BzgPDXnF+v4GDXT7PAaXyWBwIyrFoIJduPCojsiIBP8QZwtjaKgnywnREjaLc0syTCLSeUHcp/+jPRdickvfgHJWG06sU7ZST8/HnGmoOqV/BUlGhHiqma1oJfGEJ6aaG4oza77ZYAxLPxwq9NOuTHVGJwlphcfeevcU3F0C/mxDEEMEz66lDolp4DCP5L4muHlrOCZ+HSjRwz5/anVNVWNO/nM1I0wmI2TRAS0RPzwClVD8iiGJHhZ/WdgenG4nosBG9UQjd/56LLKI25bIJijz/tpe89pCRUJtMYtcXR5C7w8Is05a1GMedBAiT7Bu35qHbpxJeqcw26DJL4U3+IeHfymXpK/E3RAj16bj+mtxxYSEzaae7obCm1rDA1LnPTI94kAea2ZNOUucDK5FaROX/uBXk422xrQTdJpEpg4TLa7GmQGdtyJC0OnzaOTXWg87lbVMq1PndDLE3STqXT5J/wj/WfUtXlN38x9aX7wwrmyCXY3WJ1zzShAgRO9YjRRosMBkahGDj5l75w9KX8yW3C5txcxjPVGSxQIl+bv9FPrBJmU1WOOPYQlHm92JQJus8BXXQCuhg3mEsZQfmGpgrS82NUB15V1nZB3xCXniKcKnQirzbRXLg8wjlPbT9DKGbc=
file: $TRAVIS_BUILD_DIR/cpp-ethereum-$ZIP_SUFFIX.zip
skip_cleanup: true
on:
repo: ethereum/cpp-ethereum
branch: release