Skip to content
This repository has been archived by the owner on Feb 1, 2020. It is now read-only.

Commit

Permalink
[WIP] Migrate ds2 builds to travis container-based infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
fjricci committed Mar 2, 2016
1 parent 19f3703 commit 039cae5
Show file tree
Hide file tree
Showing 4 changed files with 165 additions and 50 deletions.
83 changes: 79 additions & 4 deletions .travis.yml
Expand Up @@ -8,14 +8,91 @@
## PATENTS file in the same directory.
##

sudo: required
dist: trusty
sudo: false
dist: precise
branches:
only:
- master
matrix:
fast_finish: true

addons:
apt:
sources:
# - ubuntu-toolchain-r-test
# - llvm-toolchain-precise-3.7
- augeas
- augeas-0.10.0
- augeas-1.0.0
- augeas-1.1.0
- augeas-1.2.0
- augeas-1.3.0
- augeas-dev
- augeas-old
- avsm
- boost-latest
- cassou-emacs
- chef-current-precise
- chef-stable-precise
- couchbase-precise
- deadsnakes
- debian-sid
- elasticsearch-1.6
- elasticsearch-1.7
- elasticsearch-2.0
- elasticsearch-2.1
- extras-precise
- gammu
- gearman-developers
- george-edison55-precise-backports
- git-core
- google-chrome
- heroku
- hvr-ghc
- kalakris-cmake
- kubuntu-backports
- llvm-toolchain-precise
- llvm-toolchain-precise-3.5
- llvm-toolchain-precise-3.6
- llvm-toolchain-precise-3.7
- lucid
- mariadb-10.0
- mongodb-3.0-precise
- mongodb-3.2-precise
- mongodb-upstart
- mono
- mono-alpha
- mono-beta
- mono-libtiff-compat
- mono-nightly
- mopidy-stable
- partner-precise
- pgavin-ghdl
- pov-wkhtmltopdf
- precise-pgdg-9.5
- pypy
- pythonxy-devel
- r-packages-precise
- r-packages-trusty
- rabbitmq-precise
- rabbitmq-testing
- tmate
- ubuntu-sdk-team
- ubuntu-toolchain-r-test
packages:
- clang-format-3.7
- flex
- bison
- swig
- g++-4.8
- clang-3.7
- g++-4.8-multilib
- g++-mingw-w64-i686
- lldb-3.7
- liblldb-3.7
- python-lldb-3.7
- realpath

env:
- TARGET="Style"
- TARGET="Registers"
Expand All @@ -26,7 +103,6 @@ env:
- TARGET="Android-ARM64"
- TARGET="Android-X86"
- TARGET="Android-X86_64"
- TARGET="Linux-ARM"
- TARGET="MinGW-X86"
- TARGET="Tizen-ARM"
- TARGET="Tizen-X86"
Expand All @@ -45,6 +121,5 @@ env:
- TARGET="Linux-X86_64" LLDB_TESTS="all" CLANG="1"
- TARGET="Linux-X86_64" LLDB_TESTS="all" CLANG="1" RELEASE="1"

before_install: ./Support/Testing/Travis/before-install.py
install: ./Support/Testing/Travis/install.py
script: ./Support/Testing/Travis/script.sh
47 changes: 1 addition & 46 deletions Support/Testing/Travis/install.py
Expand Up @@ -12,12 +12,6 @@
import os, platform
from subprocess import check_call

packages = []

linux_packages = { 'Linux-ARM': 'g++-4.8-arm-linux-gnueabihf',
'Linux-X86': 'g++-5-multilib',
'Linux-X86_64': 'g++-5' }

android_toolchains = { 'Android-ARM': 'arm',
'Android-ARM64': 'aarch64',
'Android-X86': 'x86',
Expand All @@ -28,49 +22,10 @@

target = os.getenv('TARGET')

if target == 'Style':
packages.append('clang-format-3.7')
elif target == 'Registers':
packages.append('flex')
packages.append('bison')
packages.append('g++-5')
packages.append('clang-format-3.7')
elif target in linux_packages:
if "CentOS Linux" in platform.linux_distribution():
packages.append('gcc')
else:
# Install gcc even when using clang, so we can run llgs tests.
packages.append(linux_packages[target])
if os.getenv('CLANG') == '1':
packages.append('clang-3.7')
elif target == 'MinGW-X86':
packages.append('g++-mingw-w64-i686')
elif target in android_toolchains:
if target in android_toolchains:
# Android builds get the toolchain from AOSP.
check_call('./Support/Scripts/prepare-android-toolchain.sh "%s"' % android_toolchains[target], shell=True)
elif target in tizen_toolchains:
# Tizen builds use the android toolchain and link statically.
check_call('./Support/Scripts/prepare-android-toolchain.sh "%s"' % tizen_toolchains[target], shell=True)

# Running LLDB tests requires an install of lldb (for the tests to be able to
# use the lldb python library without us building it).
if os.getenv('LLDB_TESTS') != None:
packages.append('swig')
if "CentOS Linux" in platform.linux_distribution():
packages.append('libedit-devel')
packages.append('libxml2-devel')
packages.append('ncurses-devel')
packages.append('python-devel')
else:
packages.append('lldb-3.7')
packages.append('liblldb-3.7')
packages.append('python-lldb-3.7')

if "Ubuntu" in platform.linux_distribution():
packages.append('realpath')

if len(packages) > 0:
if "CentOS Linux" in platform.linux_distribution():
check_call('sudo yum install -y "%s"' % '" "'.join(packages), shell=True)
else:
check_call('sudo apt-get install -y "%s"' % '" "'.join(packages), shell=True)
9 changes: 9 additions & 0 deletions Support/Testing/Travis/script.sh
Expand Up @@ -107,6 +107,15 @@ else
cmake_options+=(-DCMAKE_BUILD_TYPE="Debug")
fi

echo "mingw?"
echo $(which i686-w64-mingw32-gcc)
echo "gcc?"
echo $(which gcc)
echo "gcc-4.8?"
echo $(which gcc-4.8)
echo "gcc-5?"
echo $(which gcc-5)

cmake "${cmake_options[@]}" "$top"
make -j$(num_cpus)

Expand Down
76 changes: 76 additions & 0 deletions Support/Testing/Travis/trusty_install.py
@@ -0,0 +1,76 @@
#!/usr/bin/env python
##
## Copyright (c) 2014, Facebook, Inc.
## All rights reserved.
##
## This source code is licensed under the University of Illinois/NCSA Open
## Source License found in the LICENSE file in the root directory of this
## source tree. An additional grant of patent rights can be found in the
## PATENTS file in the same directory.
##

import os, platform
from subprocess import check_call

packages = []

linux_packages = { 'Linux-ARM': 'g++-4.7-arm-linux-gnueabi',
'Linux-X86': 'g++-4.8-multilib',
'Linux-X86_64': 'g++-4.8' }

android_toolchains = { 'Android-ARM': 'arm',
'Android-ARM64': 'aarch64',
'Android-X86': 'x86',
'Android-X86_64': 'x86' }

tizen_toolchains = { 'Tizen-ARM': 'arm',
'Tizen-X86': 'x86' }

target = os.getenv('TARGET')

if target == 'Style':
packages.append('clang-format-3.7')
elif target == 'Registers':
packages.append('flex')
packages.append('bison')
packages.append('g++-4.8')
packages.append('clang-format-3.7')
elif target in linux_packages:
if "CentOS Linux" in platform.linux_distribution():
packages.append('gcc')
else:
# Install gcc even when using clang, so we can run llgs tests.
packages.append(linux_packages[target])
if os.getenv('CLANG') == '1':
packages.append('clang-3.7')
elif target == 'MinGW-X86':
packages.append('g++-mingw-w64-i686')
elif target in android_toolchains:
# Android builds get the toolchain from AOSP.
check_call('./Support/Scripts/prepare-android-toolchain.sh "%s"' % android_toolchains[target], shell=True)
elif target in tizen_toolchains:
# Tizen builds use the android toolchain and link statically.
check_call('./Support/Scripts/prepare-android-toolchain.sh "%s"' % tizen_toolchains[target], shell=True)

# Running LLDB tests requires an install of lldb (for the tests to be able to
# use the lldb python library without us building it).
if os.getenv('LLDB_TESTS') != None:
packages.append('swig')
if "CentOS Linux" in platform.linux_distribution():
packages.append('libedit-devel')
packages.append('libxml2-devel')
packages.append('ncurses-devel')
packages.append('python-devel')
else:
packages.append('lldb-3.7')
packages.append('liblldb-3.7')
packages.append('python-lldb-3.7')

if "Ubuntu" in platform.linux_distribution():
packages.append('realpath')

if len(packages) > 0:
if "CentOS Linux" in platform.linux_distribution():
check_call('sudo yum install -y "%s"' % '" "'.join(packages), shell=True)
else:
check_call('sudo apt-get install -y "%s"' % '" "'.join(packages), shell=True)

0 comments on commit 039cae5

Please sign in to comment.