2121# You should have received a copy of the GNU General Public License
2222# along with solidity. If not, see <http://www.gnu.org/licenses/>
2323#
24- # (c) 2016 solidity contributors.
24+ # (c) 2016-2017 solidity contributors.
2525# ------------------------------------------------------------------------------
2626
2727language : cpp
28+
2829branches :
2930 # We need to whitelist the branches which we want to have "push" automation,
3031 # this includes tags (which are treated as branches by travis).
@@ -33,6 +34,18 @@ branches:
3334 - develop
3435 - release
3536 - /^v[0-9]/
37+
38+ env :
39+ global :
40+ - ENCRYPTION_LABEL="6d4541b72666"
41+ - SOLC_BUILD_TYPE=RelWithDebInfo
42+ - SOLC_DOCS=Off
43+ - SOLC_EMSCRIPTEN=Off
44+ - SOLC_INSTALL_DEPS_TRAVIS=On
45+ - SOLC_RELEASE=On
46+ - SOLC_TESTS=On
47+ - SOLC_DOCKER=Off
48+
3649matrix :
3750 include :
3851 # Ubuntu 14.04 LTS "Trusty Tahr"
@@ -61,10 +74,24 @@ matrix:
6174 dist : trusty
6275 sudo : required
6376 compiler : gcc
77+ before_install :
78+ - sudo apt-get -y install python-sphinx
6479 env :
65- - TRAVIS_DOCS=On
66- - TRAVIS_RELEASE=Off
67- - TRAVIS_TESTS=Off
80+ - SOLC_DOCS=On
81+ - SOLC_RELEASE=Off
82+ - SOLC_TESTS=Off
83+
84+ # Docker target, which generates a statically linked alpine image
85+ - os : linux
86+ dist : trusty
87+ sudo : required
88+ services :
89+ - docker
90+ env :
91+ - SOLC_DOCKER=On
92+ - SOLC_INSTALL_DEPS_TRAVIS=Off
93+ - SOLC_RELEASE=Off
94+ - SOLC_TESTS=Off
6895
6996 # Emscripten target, which compiles 'solc' to javascript and uploads the resulting .js
7097 # files to https://github.com/ethereum/solc-bin. These binaries are used in Browser-Solidity
@@ -73,16 +100,19 @@ matrix:
73100 dist : trusty
74101 sudo : required
75102 compiler : gcc
76- node_js : stable
103+ node_js :
104+ - " 6"
77105 services :
78106 - docker
79107 before_install :
108+ - nvm install 6
109+ - nvm use 6
80110 - docker pull trzeci/emscripten:sdk-tag-1.35.4-64bit
81111 env :
82- - TRAVIS_EMSCRIPTEN =On
83- - TRAVIS_INSTALL_DEPS =Off
84- - TRAVIS_RELEASE =Off
85- - TRAVIS_TESTS =Off
112+ - SOLC_EMSCRIPTEN =On
113+ - SOLC_INSTALL_DEPS_TRAVIS =Off
114+ - SOLC_RELEASE =Off
115+ - SOLC_TESTS =Off
86116
87117 # OS X Mavericks (10.9)
88118 # https://en.wikipedia.org/wiki/OS_X_Mavericks
@@ -101,7 +131,7 @@ matrix:
101131# env:
102132# # Workaround for "macOS - Yosemite, El Capitan and Sierra hanging?"
103133# # https://github.com/ethereum/solidity/issues/894
104- # - TRAVIS_TESTS =Off
134+ # - SOLC_TESTS =Off
105135# - ZIP_SUFFIX=osx-yosemite
106136
107137 # OS X El Capitan (10.11)
@@ -112,10 +142,10 @@ matrix:
112142# env:
113143# # The use of Debug config here ONLY for El Capitan is a workaround for "The Heisenbug"
114144# # See https://github.com/ethereum/webthree-umbrella/issues/565
115- # - TRAVIS_BUILD_TYPE =Debug
145+ # - SOLC_BUILD_TYPE =Debug
116146# # Workaround for "macOS - Yosemite, El Capitan and Sierra hanging?"
117147# # https://github.com/ethereum/solidity/issues/894
118- # - TRAVIS_TESTS =Off
148+ # - SOLC_TESTS =Off
119149# - ZIP_SUFFIX=osx-elcapitan
120150
121151 # macOS Sierra (10.12)
@@ -126,10 +156,10 @@ matrix:
126156# env:
127157# # Look like "The Heisenbug" is occurring here too, so we'll do the same workaround.
128158# # See https://travis-ci.org/ethereum/solidity/jobs/150240930
129- # - TRAVIS_BUILD_TYPE =Debug
159+ # - SOLC_BUILD_TYPE =Debug
130160# # Workaround for "macOS - Yosemite, El Capitan and Sierra hanging?"
131161# # https://github.com/ethereum/solidity/issues/894
132- # - TRAVIS_TESTS =Off
162+ # - SOLC_TESTS =Off
133163# - ZIP_SUFFIX=macos-sierra
134164
135165git :
@@ -143,41 +173,20 @@ cache:
143173 - $HOME/.local
144174
145175install :
146- - test $TRAVIS_INSTALL_DEPS != On || ./ scripts/install_deps.sh
147- - test "$TRAVIS_OS_NAME" != "linux" || ./ scripts/install_cmake.sh
176+ - test $SOLC_INSTALL_DEPS_TRAVIS != On || ( scripts/install_deps.sh)
177+ - test "$TRAVIS_OS_NAME" != "linux" || ( scripts/install_cmake.sh)
148178 - echo -n "$TRAVIS_COMMIT" > commit_hash.txt
179+ - test $SOLC_DOCKER != On || (docker build -t ethereum/solc:build -f scripts/Dockerfile .)
180+
149181before_script :
150- - test $TRAVIS_EMSCRIPTEN != On || ./scripts/build_emscripten.sh
151- - test $TRAVIS_RELEASE != On || (mkdir -p build
152- && cd build
153- && cmake .. -DCMAKE_BUILD_TYPE=$TRAVIS_BUILD_TYPE
154- && make -j2
155- && cd ..
156- && ./scripts/release.sh $ZIP_SUFFIX
157- && ./scripts/create_source_tarball.sh )
158- script :
159- - test $TRAVIS_DOCS != On || ./scripts/docs.sh
182+ - test $SOLC_EMSCRIPTEN != On || (scripts/build_emscripten.sh)
183+ - test $SOLC_RELEASE != On || (scripts/build.sh $SOLC_BUILD_TYPE
184+ && scripts/release.sh $ZIP_SUFFIX
185+ && scripts/create_source_tarball.sh)
160186
161- # There are a variety of reliability issues with the Solidity unit-tests at the time of
162- # writing (especially on macOS), so within TravisCI we will try to run the unit-tests
163- # up to 3 times before giving up and declaring the tests as broken.
164- #
165- # We should aim to remove this "retry logic" as soon as we can, because it is a
166- # band-aid for issues which need solving at their root. Some of those issues will be
167- # in Solidity's RPC setup and some will be in 'eth'. It seems unlikely that Solidity
168- # itself is broken from the failure messages which we are seeing.
169- #
170- # More details on known issues at https://github.com/ethereum/solidity/issues/769
171- - test $TRAVIS_TESTS != On || (cd $TRAVIS_BUILD_DIR && (./scripts/tests.sh || ./scripts/tests.sh || ./scripts/tests.sh) )
172- env :
173- global :
174- - ENCRYPTION_LABEL="6d4541b72666"
175- - TRAVIS_BUILD_TYPE=RelWithDebInfo
176- - TRAVIS_DOCS=Off
177- - TRAVIS_EMSCRIPTEN=Off
178- - TRAVIS_INSTALL_DEPS=On
179- - TRAVIS_RELEASE=On
180- - TRAVIS_TESTS=On
187+ script :
188+ - test $SOLC_DOCS != On || (scripts/docs.sh)
189+ - test $SOLC_TESTS != On || (cd $TRAVIS_BUILD_DIR && scripts/tests.sh)
181190
182191deploy :
183192 # This is the deploy target for the Emscripten build.
@@ -186,14 +195,24 @@ deploy:
186195 # Both the build and deploy steps for Emscripten are only run within the Ubuntu
187196 # configurations (not for macOS). That is controlled by conditionals within the bash
188197 # scripts because TravisCI doesn't provide much in the way of conditional logic.
198+
189199 - provider : script
190- script : test $TRAVIS_EMSCRIPTEN != On || scripts/release_emscripten.sh
200+ script : test $SOLC_EMSCRIPTEN != On || (scripts/release_emscripten.sh)
201+ skip_cleanup : true
202+ on :
203+ branch :
204+ - develop
205+ - release
206+ # This is the deploy target for the dockerfile. If we are pushing into a develop branch, it will be tagged
207+ # as a nightly and appended the commit of the branch it was pushed in. If we are pushing to master it will
208+ # be tagged as "stable" and given the version tag as well.
209+ - provider : script
210+ script : test $SOLC_DOCKER != On || (scripts/docker_deploy.sh)
191211 skip_cleanup : true
192212 on :
193213 branch :
194214 - develop
195215 - release
196-
197216 # This is the deploy target for the native build (Linux and macOS)
198217 # which generates ZIPs per commit and the source tarball.
199218 #
@@ -211,4 +230,4 @@ deploy:
211230 on :
212231 all_branches : true
213232 tags : true
214- condition : $TRAVIS_RELEASE == On
233+ condition : $SOLC_RELEASE == On
0 commit comments