Only run biicode-build on Linux and print cmake version

This commit is contained in:
Victor Zverovich 2015-03-04 08:53:51 -08:00
parent 65cf5414c9
commit bdada10c2c

View File

@ -1,23 +1,23 @@
#!/usr/bin/env python
# Build the project with Biicode.
import bootstrap, glob, os, shutil
import bootstrap, glob, os, shutil, sys
from download import Downloader
from subprocess import check_call
os_name = os.environ['TRAVIS_OS_NAME']
if os_name != 'linux':
sys.exit()
cmake_dir = 'cmake-dir'
cmake_program = 'cmake'
if os_name == 'linux':
# Install newer version of CMake.
cmake_program = bootstrap.install_cmake(
'cmake-3.1.1-Linux-i386.tar.gz', check_installed=False, download_dir=None, install_dir='.')
cmake_dir = glob.glob('cmake*')[0]
with Downloader().download('http://www.biicode.com/downloads/latest/ubuntu64') as f:
check_call(['sudo', 'dpkg', '-i', f])
elif os_name == 'osx':
with Downloader().download('http://www.biicode.com/downloads/latest/macos') as f:
check_call(['sudo', 'installer', '-pkg', f, '-target', '/'])
# Install newer version of CMake.
cmake_program = bootstrap.install_cmake(
'cmake-3.1.1-Linux-i386.tar.gz', check_installed=False, download_dir=None, install_dir='.')
cmake_dir = glob.glob('cmake*')[0]
with Downloader().download('http://www.biicode.com/downloads/latest/ubuntu64') as f:
check_call(['sudo', 'dpkg', '-i', f])
env = os.environ.copy()
env['PATH'] = os.path.abspath(os.path.dirname(cmake_program)) + ':' + env['PATH']
@ -31,4 +31,5 @@ shutil.copytree('.', cppformat_dir,
for f in glob.glob('support/biicode/*'):
shutil.copy(f, cppformat_dir)
print env['CMAKE_ROOT']
check_call(['cmake', '--version', project_dir], env=env)
#check_call(['bii', 'cpp:build'], cwd=project_dir, env=env)