Enable CI for win 32bit as well

This commit is contained in:
Kovid Goyal 2017-05-24 21:38:04 +05:30
parent a5267f9afe
commit 802b1ab1e9
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 2 deletions

View File

@ -13,6 +13,7 @@ environment:
platform: platform:
- x64 - x64
- x86
before_build: before_build:
- C:\Python36-x64\python.exe setup/win-ci.py sw - C:\Python36-x64\python.exe setup/win-ci.py sw

View File

@ -164,7 +164,7 @@ def download_file(url):
for i in range(5): for i in range(5):
try: try:
printf('Downloading', url) printf('Downloading', url)
return subprocess.check_output(['curl.exe', '-fsSL', url]) return subprocess.check_output(['curl.exe', '-fSL', url])
except subprocess.CalledProcessError: except subprocess.CalledProcessError:
time.sleep(1) time.sleep(1)
raise SystemExit('Failed to download: {}'.format(url)) raise SystemExit('Failed to download: {}'.format(url))
@ -174,7 +174,8 @@ def sw():
sw = os.environ['SW'] sw = os.environ['SW']
os.makedirs(sw) os.makedirs(sw)
os.chdir(sw) os.chdir(sw)
url = 'https://download.calibre-ebook.com/travis/win-64.tar.xz' url = 'https://download.calibre-ebook.com/travis/win-{}.tar.xz'.format(
'64' if is64bit else '32')
tarball = download_file(url) tarball = download_file(url)
with tarfile.open(fileobj=io.BytesIO(tarball)) as tf: with tarfile.open(fileobj=io.BytesIO(tarball)) as tf:
tf.extractall() tf.extractall()