2016-08-01 05:25:37 +00:00
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
# TravisCI configuration file for solidity.
|
|
|
|
#
|
|
|
|
# The documentation for solidity is hosted at:
|
|
|
|
#
|
|
|
|
# http://solidity.readthedocs.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.
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
|
2016-06-24 14:25:19 +00:00
|
|
|
language: cpp
|
2016-08-01 05:25:37 +00:00
|
|
|
branches:
|
2016-08-11 21:21:07 +00:00
|
|
|
# We need to whitelist the branches which we want to have "push" automation.
|
2016-08-15 05:25:10 +00:00
|
|
|
# Pull request automation is not constrained to this set of branches.
|
2016-08-01 05:25:37 +00:00
|
|
|
only:
|
|
|
|
- develop
|
|
|
|
- release
|
2016-06-24 14:25:19 +00:00
|
|
|
matrix:
|
|
|
|
include:
|
2016-08-15 05:25:10 +00:00
|
|
|
# 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.
|
2016-08-01 22:31:08 +00:00
|
|
|
- os: linux
|
|
|
|
dist: trusty
|
2016-08-01 22:40:26 +00:00
|
|
|
sudo: required
|
2016-08-01 22:31:08 +00:00
|
|
|
compiler: gcc
|
|
|
|
env:
|
|
|
|
- ZIP_SUFFIX=ubuntu-trusty
|
2016-08-15 05:25:10 +00:00
|
|
|
|
2016-08-25 22:06:27 +00:00
|
|
|
- os: linux
|
|
|
|
dist: trusty
|
|
|
|
sudo: required
|
|
|
|
compiler: clang
|
|
|
|
env:
|
|
|
|
- ZIP_SUFFIX=ubuntu-trusty-clang
|
|
|
|
|
2016-08-15 05:25:10 +00:00
|
|
|
# Documentation target, which generates documentation using Phoenix / ReadTheDocs.
|
2016-08-01 22:31:08 +00:00
|
|
|
- os: linux
|
|
|
|
dist: trusty
|
2016-08-01 22:40:26 +00:00
|
|
|
sudo: required
|
2016-08-01 22:31:08 +00:00
|
|
|
compiler: gcc
|
|
|
|
env:
|
2016-08-15 05:25:10 +00:00
|
|
|
- TRAVIS_DOCS=On
|
|
|
|
- TRAVIS_RELEASE=Off
|
|
|
|
- TRAVIS_TESTS=Off
|
|
|
|
|
|
|
|
# Emscripten target, which compiles 'solc' to javascript and uploads the resulting .js
|
|
|
|
# files to https://github.com/ethereum/solc-bin. These binaries are used in Browser-Solidity
|
|
|
|
# and in other Ethereum web-based development contexts.
|
2016-06-24 14:25:19 +00:00
|
|
|
- os: linux
|
|
|
|
dist: trusty
|
|
|
|
sudo: required
|
2016-08-01 05:25:37 +00:00
|
|
|
compiler: gcc
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
before_install:
|
|
|
|
- docker pull trzeci/emscripten:sdk-tag-1.35.4-64bit
|
|
|
|
env:
|
2016-08-15 05:25:10 +00:00
|
|
|
- TRAVIS_EMSCRIPTEN=On
|
|
|
|
- TRAVIS_INSTALL_DEPS=Off
|
|
|
|
- TRAVIS_RELEASE=Off
|
|
|
|
- TRAVIS_TESTS=Off
|
|
|
|
|
|
|
|
# OS X Mavericks (10.9)
|
|
|
|
# https://en.wikipedia.org/wiki/OS_X_Mavericks
|
|
|
|
#
|
2016-08-25 22:06:27 +00:00
|
|
|
# - os: osx
|
|
|
|
# osx_image: beta-xcode6.2
|
|
|
|
# env:
|
|
|
|
# - ZIP_SUFFIX=osx-mavericks
|
2016-08-15 05:25:10 +00:00
|
|
|
|
|
|
|
# OS X Yosemite (10.10)
|
|
|
|
# https://en.wikipedia.org/wiki/OS_X_Yosemite
|
|
|
|
#
|
2016-08-25 22:06:27 +00:00
|
|
|
# - os: osx
|
|
|
|
# osx_image: xcode7.1
|
|
|
|
# env:
|
|
|
|
# # Workaround for "macOS - Yosemite, El Capitan and Sierra hanging?"
|
|
|
|
# # https://github.com/ethereum/solidity/issues/894
|
|
|
|
# - TRAVIS_TESTS=Off
|
|
|
|
# - ZIP_SUFFIX=osx-yosemite
|
2016-08-15 05:25:10 +00:00
|
|
|
|
|
|
|
# OS X El Capitan (10.11)
|
|
|
|
# https://en.wikipedia.org/wiki/OS_X_El_Capitan
|
|
|
|
#
|
2016-08-25 22:06:27 +00:00
|
|
|
# - os: osx
|
|
|
|
# osx_image: xcode7.3
|
|
|
|
# env:
|
|
|
|
# # The use of Debug config here ONLY for El Capitan is a workaround for "The Heisenbug"
|
|
|
|
# # See https://github.com/ethereum/webthree-umbrella/issues/565
|
|
|
|
# - TRAVIS_BUILD_TYPE=Debug
|
|
|
|
# # Workaround for "macOS - Yosemite, El Capitan and Sierra hanging?"
|
|
|
|
# # https://github.com/ethereum/solidity/issues/894
|
|
|
|
# - TRAVIS_TESTS=Off
|
|
|
|
# - ZIP_SUFFIX=osx-elcapitan
|
2016-08-15 05:25:10 +00:00
|
|
|
|
|
|
|
# macOS Sierra (10.12)
|
|
|
|
# https://en.wikipedia.org/wiki/MacOS_Sierra
|
|
|
|
#
|
2016-08-25 22:06:27 +00:00
|
|
|
# - os: osx
|
|
|
|
# osx_image: xcode8
|
|
|
|
# env:
|
|
|
|
# # Look like "The Heisenbug" is occurring here too, so we'll do the same workaround.
|
|
|
|
# # See https://travis-ci.org/ethereum/solidity/jobs/150240930
|
|
|
|
# - TRAVIS_BUILD_TYPE=Debug
|
|
|
|
# # Workaround for "macOS - Yosemite, El Capitan and Sierra hanging?"
|
|
|
|
# # https://github.com/ethereum/solidity/issues/894
|
|
|
|
# - TRAVIS_TESTS=Off
|
|
|
|
# - ZIP_SUFFIX=macos-sierra
|
|
|
|
|
2016-06-24 14:25:19 +00:00
|
|
|
git:
|
|
|
|
depth: 2
|
2016-08-01 14:51:23 +00:00
|
|
|
|
|
|
|
cache:
|
|
|
|
ccache: true
|
|
|
|
directories:
|
2016-08-02 05:04:56 +00:00
|
|
|
- cryptopp
|
|
|
|
- boost_1_57_0
|
2016-08-01 14:51:23 +00:00
|
|
|
- build
|
2016-08-01 14:51:23 +00:00
|
|
|
- jsoncpp
|
|
|
|
|
2016-08-01 05:25:37 +00:00
|
|
|
install:
|
2016-08-15 07:05:54 +00:00
|
|
|
- test $TRAVIS_INSTALL_DEPS != On || ./scripts/install_deps.sh
|
2016-08-01 05:25:37 +00:00
|
|
|
before_script:
|
2016-08-15 07:05:54 +00:00
|
|
|
- test $TRAVIS_EMSCRIPTEN != On || ./scripts/build_emscripten.sh
|
|
|
|
- test $TRAVIS_RELEASE != On || (mkdir -p build
|
2016-08-01 05:25:37 +00:00
|
|
|
&& cd build
|
|
|
|
&& cmake .. -DCMAKE_BUILD_TYPE=$TRAVIS_BUILD_TYPE
|
|
|
|
&& make -j2
|
|
|
|
&& cd ..
|
2016-08-01 22:31:08 +00:00
|
|
|
&& ./scripts/release.sh $ZIP_SUFFIX )
|
2016-08-01 05:25:37 +00:00
|
|
|
script:
|
2016-08-15 07:05:54 +00:00
|
|
|
- test $TRAVIS_DOCS != On || ./scripts/docs.sh
|
2016-08-15 05:25:10 +00:00
|
|
|
|
2016-08-01 05:25:37 +00:00
|
|
|
# There are a variety of reliability issues with the Solidity unit-tests at the time of
|
2016-08-02 05:04:56 +00:00
|
|
|
# writing (especially on macOS), so within TravisCI we will try to run the unit-tests
|
|
|
|
# up to 3 times before giving up and declaring the tests as broken.
|
|
|
|
#
|
|
|
|
# We should aim to remove this "retry logic" as soon as we can, because it is a
|
|
|
|
# band-aid for issues which need solving at their root. Some of those issues will be
|
|
|
|
# in Solidity's RPC setup and some will be in 'eth'. It seems unlikely that Solidity
|
|
|
|
# itself is broken from the failure messages which we are seeing.
|
|
|
|
#
|
|
|
|
# More details on known issues at https://github.com/ethereum/solidity/issues/769
|
2016-08-15 07:05:54 +00:00
|
|
|
- test $TRAVIS_TESTS != On || (cd $TRAVIS_BUILD_DIR && (./scripts/tests.sh || ./scripts/tests.sh || ./scripts/tests.sh) )
|
2016-08-01 05:25:37 +00:00
|
|
|
env:
|
|
|
|
global:
|
2016-08-03 12:24:18 +00:00
|
|
|
- ENCRYPTION_LABEL="6d4541b72666"
|
2016-08-15 05:25:10 +00:00
|
|
|
- TRAVIS_BUILD_TYPE=RelWithDebInfo
|
|
|
|
- TRAVIS_DOCS=Off
|
|
|
|
- TRAVIS_EMSCRIPTEN=Off
|
|
|
|
- TRAVIS_INSTALL_DEPS=On
|
|
|
|
- TRAVIS_RELEASE=On
|
|
|
|
- TRAVIS_TESTS=On
|
2016-08-01 05:25:37 +00:00
|
|
|
|
2016-08-02 05:04:56 +00:00
|
|
|
deploy:
|
2016-08-10 19:43:09 +00:00
|
|
|
# This is the deploy target for the Emscripten build.
|
|
|
|
# It publishes the JS file which was compiled as part of the earlier 'build_emscripten.sh'
|
|
|
|
# step to https://github.com/ethereum/solc-bin/tree/gh-pages/bin.
|
|
|
|
# Both the build and deploy steps for Emscripten are only run within the Ubuntu
|
|
|
|
# configurations (not for macOS). That is controlled by conditionals within the bash
|
|
|
|
# scripts because TravisCI doesn't provide much in the way of conditional logic.
|
|
|
|
- provider: script
|
2016-08-15 05:25:10 +00:00
|
|
|
script: test $TRAVIS_EMSCRIPTEN != On || scripts/release_emscripten.sh
|
2016-08-10 19:43:09 +00:00
|
|
|
skip_cleanup: true
|
|
|
|
on:
|
|
|
|
branch: develop
|
2016-08-01 05:25:37 +00:00
|
|
|
|
2016-08-10 19:43:09 +00:00
|
|
|
# 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'.
|
2016-08-11 21:21:07 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
# TODO - I do not know if the api_key below which work correctly
|
|
|
|
# for ethereum/solidity. I suspect not, for the same reason as
|
|
|
|
# my auth token does not work for Appveyor. I don't have enough
|
|
|
|
# permissions to enable this myself. Christian should be able to.
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
#
|
2016-08-10 19:43:09 +00:00
|
|
|
- provider: releases
|
|
|
|
api_key:
|
2016-08-12 10:05:12 +00:00
|
|
|
secure: PWH37xVBCF0XiSjl+eH7XIdkrfxZXjzvqF4PiBOnD3VnFz+odrdnIwBmCeBYTHTWF8efpp8fmzWJk2UVq1JcpyZiC+SVxO8dx91W2ia1a+wKrEQuDgkUrZBkl5IQNCv0QS81DDQhliyZEaYh8wHO/7RReyMpGpw2U2u85WkFiZ+LdlHEZPfzUeh9lxQ9n8qwFL8Rja+Q05d4cQ8zaVEtofJJT4T6DUWhc3TzuxDYxOmjwg37rC9CkGSLn6VadSh8b3j5R0SZupFsAEvBL/imBLP9r9ewoo7o4p6By3jwiIgH9yNg7LM618xbffcNaYF/KtLBi9uPHfqF7hRD4PlECz+D0PR78nQItOX5HKm1QMg5kCnghRVCA0IVjpV5fiYQnMLM7dCRv34I5b3zLpa69wQ/GLYB2FViqNUfvPeiZTEeIJ2OmATlFx8AH2JoqpY1XJknWb35+vMfa8LSiJJW++SLWeV+ncC92hrvyZ1cy3trepRRZIfyYepxHifnfdWMkddQUJk5b2WS5Fy/TJLZNPeombnpvRhUC38dsYItarKeXTc6k4oADCEDZ2rgGIcEiqRxXV11Y5xHJekLDWzUs+YJNcCuL4pnAP//LOnbnH2w9rLpwhQYSl0anCd097NivAXQJXO2JI/byIYz1kiCVQWnW6EM8+72mLOklf/Qr8k=
|
2016-08-10 19:43:09 +00:00
|
|
|
file: $TRAVIS_BUILD_DIR/solidity-$ZIP_SUFFIX.zip
|
|
|
|
skip_cleanup: true
|
|
|
|
on:
|
|
|
|
repo: ethereum/solidity
|
2016-08-15 23:01:19 +00:00
|
|
|
branch: release
|
2016-08-15 07:05:54 +00:00
|
|
|
condition: $TRAVIS_RELEASE == On
|