mirror of
https://github.com/MaskRay/ccls.git
synced 2025-03-31 05:52:09 +00:00
[travis] Retry. (#221)
This commit is contained in:
parent
c8040a3b9e
commit
f23a79b01d
@ -32,7 +32,7 @@ os: linux
|
|||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- build/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/
|
- build/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/
|
||||||
- build/clang+llvm-5.0.1-final-x86_64-apple-darwin/
|
- build/clang+llvm-5.0.1-x86_64-apple-darwin/
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
@ -193,7 +193,7 @@ before_script:
|
|||||||
- ${CXX} --version
|
- ${CXX} --version
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- ./waf configure
|
- travis_retry ./waf configure
|
||||||
- ./waf build
|
- ./waf build
|
||||||
- ./build/release/bin/cquery --log-all-to-stderr --test-unit
|
- ./build/release/bin/cquery --log-all-to-stderr --test-unit
|
||||||
- ./build/release/bin/cquery --log-all-to-stderr --test-index
|
- ./build/release/bin/cquery --log-all-to-stderr --test-index
|
||||||
|
10
wscript
10
wscript
@ -2,9 +2,9 @@
|
|||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from urllib2 import urlopen, URLError # Python 2
|
from urllib2 import urlopen # Python 2
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from urllib.request import urlopen, URLError # Python 3
|
from urllib.request import urlopen # Python 3
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
import string
|
import string
|
||||||
@ -100,13 +100,7 @@ def download_and_extract(destdir, url, ext):
|
|||||||
print(' destination: {0}'.format(dest))
|
print(' destination: {0}'.format(dest))
|
||||||
print(' source: {0}'.format(url))
|
print(' source: {0}'.format(url))
|
||||||
# TODO: verify checksum
|
# TODO: verify checksum
|
||||||
for _ in range(5):
|
|
||||||
try:
|
|
||||||
response = urlopen(url, timeout=60)
|
response = urlopen(url, timeout=60)
|
||||||
break
|
|
||||||
except URLError:
|
|
||||||
print('Retry')
|
|
||||||
continue
|
|
||||||
with open(dest, 'wb') as f:
|
with open(dest, 'wb') as f:
|
||||||
f.write(response.read())
|
f.write(response.read())
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user