|
26 | 26 |
|
27 | 27 | language: cpp
|
28 | 28 | branches:
|
29 |
| - # We need to whitelist the branches which we want to have "push" automation. |
| 29 | + # We need to whitelist the branches which we want to have "push" automation, |
| 30 | + # this includes tags (which are treated as branches by travis). |
30 | 31 | # Pull request automation is not constrained to this set of branches.
|
31 | 32 | only:
|
32 | 33 | - develop
|
33 | 34 | - release
|
| 35 | + - /^v[0-9]/ |
34 | 36 | matrix:
|
35 | 37 | include:
|
36 | 38 | # Ubuntu 14.04 LTS "Trusty Tahr"
|
@@ -71,6 +73,7 @@ matrix:
|
71 | 73 | dist: trusty
|
72 | 74 | sudo: required
|
73 | 75 | compiler: gcc
|
| 76 | + node_js: stable |
74 | 77 | services:
|
75 | 78 | - docker
|
76 | 79 | before_install:
|
@@ -137,19 +140,21 @@ cache:
|
137 | 140 | directories:
|
138 | 141 | - boost_1_57_0
|
139 | 142 | - build
|
| 143 | + - $HOME/.local |
140 | 144 |
|
141 | 145 | install:
|
142 | 146 | - test $TRAVIS_INSTALL_DEPS != On || ./scripts/install_deps.sh
|
| 147 | + - test "$TRAVIS_OS_NAME" != "linux" || ./scripts/install_cmake.sh |
143 | 148 | - echo -n "$TRAVIS_COMMIT" > commit_hash.txt
|
144 |
| - - test "$TRAVIS_PULL_REQUESTS" != "false" || test "$TRAVIS_BRANCH" != release || echo -n > prerelease.txt # this is a proper release |
145 | 149 | before_script:
|
146 | 150 | - test $TRAVIS_EMSCRIPTEN != On || ./scripts/build_emscripten.sh
|
147 | 151 | - test $TRAVIS_RELEASE != On || (mkdir -p build
|
148 | 152 | && cd build
|
149 | 153 | && cmake .. -DCMAKE_BUILD_TYPE=$TRAVIS_BUILD_TYPE
|
150 | 154 | && make -j2
|
151 | 155 | && cd ..
|
152 |
| - && ./scripts/release.sh $ZIP_SUFFIX ) |
| 156 | + && ./scripts/release.sh $ZIP_SUFFIX |
| 157 | + && ./scripts/create_source_tarball.sh ) |
153 | 158 | script:
|
154 | 159 | - test $TRAVIS_DOCS != On || ./scripts/docs.sh
|
155 | 160 |
|
@@ -190,43 +195,20 @@ deploy:
|
190 | 195 | - release
|
191 | 196 |
|
192 | 197 | # This is the deploy target for the native build (Linux and macOS)
|
193 |
| - # which generates ZIPs per commit. We are in agreement that |
194 |
| - # generating ZIPs per commit for the develop branch is probably |
195 |
| - # just noise, so we only run this deployment target on 'release'. |
196 |
| - # |
197 |
| - # Unlike the Appveyor GitHub Releases target, the support in TravisCI |
198 |
| - # seemingly doesn't provide a means for passing a description, tag, etc. |
199 |
| - # In practice, we are letting the Appveyor CI do all that stuff, and |
200 |
| - # then this deployment flow just seems to find that most recent tag, |
201 |
| - # and just add our Linux and macOS ZIPs into the same tag, which is |
202 |
| - # what we want to happen. But is very accidental and brittle-looking. |
203 |
| - # |
204 |
| - # The 'skip_cleanup' stops the workspace being cleaned out prior to |
205 |
| - # generation of the artifacts. Strange that we should explicitly |
206 |
| - # need to do that, but we do. |
207 |
| - # |
208 |
| - # Tokens in TravisCI can be generated a few different ways. Bob had |
209 |
| - # success using the 'travis' gem, and then using that gem to |
210 |
| - # create/edit this .travis.yml file, and then cut-and-pasting the |
211 |
| - # good bits back out of what it generated. The gem changes all the |
212 |
| - # whitespace and deletes comments, so cannot be used as-is. But |
213 |
| - # it does generate an appropriate auth token. |
214 |
| - # |
215 |
| - # TODO - I do not know if the api_key below which work correctly |
216 |
| - # for ethereum/solidity. I suspect not, for the same reason as |
217 |
| - # my auth token does not work for Appveyor. I don't have enough |
218 |
| - # permissions to enable this myself. Christian should be able to. |
219 |
| - # |
220 |
| - # See https://docs.travis-ci.com/user/deployment/releases |
221 |
| - # See https://blog.travis-ci.com/2013-01-28-token-token-token/ |
222 |
| - # See https://github.com/ethereum/webthree-umbrella/issues/658 |
| 198 | + # which generates ZIPs per commit and the source tarball. |
223 | 199 | #
|
| 200 | + # This runs for each tag that is created and adds the corresponding files. |
224 | 201 | - provider: releases
|
225 | 202 | api_key:
|
226 | 203 | secure: PWH37xVBCF0XiSjl+eH7XIdkrfxZXjzvqF4PiBOnD3VnFz+odrdnIwBmCeBYTHTWF8efpp8fmzWJk2UVq1JcpyZiC+SVxO8dx91W2ia1a+wKrEQuDgkUrZBkl5IQNCv0QS81DDQhliyZEaYh8wHO/7RReyMpGpw2U2u85WkFiZ+LdlHEZPfzUeh9lxQ9n8qwFL8Rja+Q05d4cQ8zaVEtofJJT4T6DUWhc3TzuxDYxOmjwg37rC9CkGSLn6VadSh8b3j5R0SZupFsAEvBL/imBLP9r9ewoo7o4p6By3jwiIgH9yNg7LM618xbffcNaYF/KtLBi9uPHfqF7hRD4PlECz+D0PR78nQItOX5HKm1QMg5kCnghRVCA0IVjpV5fiYQnMLM7dCRv34I5b3zLpa69wQ/GLYB2FViqNUfvPeiZTEeIJ2OmATlFx8AH2JoqpY1XJknWb35+vMfa8LSiJJW++SLWeV+ncC92hrvyZ1cy3trepRRZIfyYepxHifnfdWMkddQUJk5b2WS5Fy/TJLZNPeombnpvRhUC38dsYItarKeXTc6k4oADCEDZ2rgGIcEiqRxXV11Y5xHJekLDWzUs+YJNcCuL4pnAP//LOnbnH2w9rLpwhQYSl0anCd097NivAXQJXO2JI/byIYz1kiCVQWnW6EM8+72mLOklf/Qr8k=
|
227 |
| - file: $TRAVIS_BUILD_DIR/solidity-$ZIP_SUFFIX.zip |
| 204 | + |
| 205 | + overwrite: true |
| 206 | + file_glob: true |
| 207 | + file: |
| 208 | + - $TRAVIS_BUILD_DIR/solidity*.zip |
| 209 | + - $TRAVIS_BUILD_DIR/solidity*tar.gz |
228 | 210 | skip_cleanup: true
|
229 | 211 | on:
|
230 |
| - repo: ethereum/solidity |
231 |
| - branch: release |
| 212 | + all_branches: true |
| 213 | + tags: true |
232 | 214 | condition: $TRAVIS_RELEASE == On
|
0 commit comments