solidity/.travis.yml

208 lines
8.3 KiB
YAML

#------------------------------------------------------------------------------
# TravisCI configuration file for solidity.
#
# The documentation for solidity is hosted at:
#
# http://solidity.readthedocs.org
#
# ------------------------------------------------------------------------------
# This file is part of solidity.
#
# solidity 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.
#
# solidity 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 solidity. If not, see <http://www.gnu.org/licenses/>
#
# (c) 2016 solidity 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
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.
- os: linux
dist: trusty
sudo: required
compiler: gcc
env:
- ZIP_SUFFIX=ubuntu-trusty
- os: linux
dist: trusty
sudo: required
compiler: clang
env:
- ZIP_SUFFIX=ubuntu-trusty-clang
# Documentation target, which generates documentation using Phoenix / ReadTheDocs.
- os: linux
dist: trusty
sudo: required
compiler: gcc
env:
- 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.
- os: linux
dist: trusty
sudo: required
compiler: gcc
services:
- docker
before_install:
- docker pull trzeci/emscripten:sdk-tag-1.35.4-64bit
env:
- 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
#
# Disabled because of problems on travis.
# - 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
#
# - 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
# OS X El Capitan (10.11)
# https://en.wikipedia.org/wiki/OS_X_El_Capitan
#
# - 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
# macOS Sierra (10.12)
# https://en.wikipedia.org/wiki/MacOS_Sierra
#
# - 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
git:
depth: 2
cache:
ccache: true
directories:
- boost_1_57_0
- build
install:
- test $TRAVIS_INSTALL_DEPS != On || ./scripts/install_deps.sh
- echo -n "$TRAVIS_COMMIT" > commit_hash.txt
- test "$TRAVIS_PULL_REQUESTS" != "false" || test "$TRAVIS_BRANCH" != release || echo -n > prerelease.txt # this is a proper release
before_script:
- test $TRAVIS_EMSCRIPTEN != On || ./scripts/build_emscripten.sh
- test $TRAVIS_RELEASE != On || (mkdir -p build
&& cd build
&& cmake .. -DCMAKE_BUILD_TYPE=$TRAVIS_BUILD_TYPE
&& make -j2
&& cd ..
&& ./scripts/release.sh $ZIP_SUFFIX )
script:
- test $TRAVIS_DOCS != On || ./scripts/docs.sh
# There are a variety of reliability issues with the Solidity unit-tests at the time of
# 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
- test $TRAVIS_TESTS != On || (cd $TRAVIS_BUILD_DIR && (./scripts/tests.sh || ./scripts/tests.sh || ./scripts/tests.sh) )
env:
global:
- ENCRYPTION_LABEL="6d4541b72666"
- TRAVIS_BUILD_TYPE=RelWithDebInfo
- TRAVIS_DOCS=Off
- TRAVIS_EMSCRIPTEN=Off
- TRAVIS_INSTALL_DEPS=On
- TRAVIS_RELEASE=On
- TRAVIS_TESTS=On
deploy:
# 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
script: test $TRAVIS_EMSCRIPTEN != On || scripts/release_emscripten.sh
skip_cleanup: true
on:
branch:
- develop
- release
# This is the deploy target for the native build (Linux and macOS)
# which generates ZIPs per commit and the source tarball.
#
# This runs for each tag that is created and adds the corresponding files.
- provider: releases
api_key:
secure: "kyDTn9taQWSzALK2CbtJ9VC1KhIO3DzIM1aIwpJexPsEq6h1Wnjp3PoyyzJGf+09AjWZLM5lNcHy6/F9AEINgnEeekdMVNT1YIYsGSJ76z/pDXB4AOZKqGXdZgLNvmxZy9dWQJykBSV65kGgEZlihW/5gF0/ouxyZafYOYlwseA7H2NDDTdIzf5uV9oIPo/y3phXG1nxGcmE3tOH/bEJL+dv0C6hI3dhL7mQhmmBCgyo/ZlAEsdj0hbBF332dxqojGwfPeuFDrxvnWLX4jhbJAkrqKgcU+1lnsr7aI+RBHu7mV3/Fj+XfTrs3J9HvCjVfe0d9s1dMsIhdY8xT8NnZX618AiZYMIoQ1gE89R8uL/mN5BpcYG7U654FDG/+OTIa6VBMDxB9J85kYdnLq3XBlcr1YoPMfTJ1UV7mpG4D1EDJObgToyCEDNbKS1Nf+osVcP8UcsrvhBCNXhPsFud8ZemaXmrVNhJOcf8sAHZx2N/HSfm7Im74ZFqJbHrWlx9aFKZ71BvSCPAbcp4hGw0A0Anynn9hOfxZjh5aqwxhz4ieTolCWaZCVyMveLJccu2ib2LVza2soHiSX2maFFlXqkoPd8h3vIGMR4CbqWfxAhXuxzMivOc24kPVHLEt5zq9635V519eOEEPYUs4X1ArZySKvJBbEcJ2RP+AZrZlj4="
overwrite: true
file:
- $TRAVIS_BUILD_DIR/solidity-$ZIP_SUFFIX.zip
- $TRAVIS_BUILD_DIR/solidity_source.tar.gz
skip_cleanup: true
on:
tags: true
condition: $TRAVIS_RELEASE == On