-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* change build system to bazel Using bazel allows for using travis-docker infrastructure without sudo privileges. * adapt README file for the new changes * remove sudo
- Loading branch information
Showing
24 changed files
with
450 additions
and
731 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,35 @@ | ||
sudo: required | ||
dist: precise | ||
language: cpp | ||
dist: trusty | ||
|
||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- wget | ||
- pkg-config | ||
- g++ | ||
- g++-4.9 | ||
- g++-5 | ||
- pkg-config | ||
- zip | ||
- zlib1g-dev | ||
- unzip | ||
|
||
matrix: | ||
include: | ||
- compiler: gcc | ||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- g++-4.9 | ||
env: COMPILER=g++-4.9 | ||
- compiler: gcc | ||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- g++-5 | ||
env: COMPILER=g++-5 | ||
|
||
before_install: | ||
- sudo apt-get update -qq | ||
- chmod u+x get_dependencies.sh | ||
- ./get_dependencies.sh | ||
- git submodule update --init --recursive | ||
- wget https://github.com/bazelbuild/bazel/releases/download/0.4.4/bazel-0.4.4-installer-linux-x86_64.sh | ||
- wget https://github.com/bazelbuild/bazel/releases/download/0.4.4/bazel-0.4.4-installer-linux-x86_64.sh.sha256 | ||
- sha256sum -c bazel-0.4.4-installer-linux-x86_64.sh.sha256 | ||
- chmod +x bazel-0.4.4-installer-linux-x86_64.sh | ||
- ./bazel-0.4.4-installer-linux-x86_64.sh --user | ||
- export PATH="$PATH:$HOME/bin" | ||
|
||
install: | ||
############################################################################ | ||
# Install a recent CMake | ||
############################################################################ | ||
- | | ||
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then | ||
CMAKE_DIR="install_cmake" | ||
CMAKE_URL="http://www.cmake.org/files/v3.3/cmake-3.3.2-Linux-x86_64.tar.gz" | ||
mkdir $CMAKE_DIR && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C $CMAKE_DIR | ||
export PATH=${TRAVIS_BUILD_DIR}/${CMAKE_DIR}/bin:${PATH} | ||
else | ||
brew install cmake | ||
fi | ||
|
||
script: | ||
- mkdir build | ||
- cd build | ||
- cmake -DEIGEN3_INCLUDE_DIR=eigen -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release .. | ||
- make all -j | ||
- make lint | ||
- ./bin/verify | ||
- bazel run verify | ||
- python lint.py | ||
|
||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- gcc-4.8 | ||
- g++-4.8 | ||
|
||
notifications: | ||
email: false | ||
|
||
branches: | ||
except: | ||
-gtest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package(default_visibility = ["//visibility:public"]) | ||
|
||
load("//:generator.bzl", "build_example", "build_test") | ||
|
||
build_example("linearregression") | ||
build_example("logisticregression") | ||
build_example("rosenbrock") | ||
build_example("rosenbrock_float") | ||
build_example("simple") | ||
build_example("simple_withoptions") | ||
build_example("neldermead") | ||
build_example("neldermead-customized") | ||
|
||
build_test("verify") | ||
|
||
|
||
py_binary( | ||
name = "lint", | ||
args = ["src/test/verify.cpp"], | ||
srcs = ["lint.py"], | ||
) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
new_http_archive( | ||
name = "eigen_archive", | ||
url = "https://bitbucket.org/eigen/eigen/get/3.2.10.tar.gz", | ||
build_file = "eigen.BUILD", | ||
strip_prefix = "eigen-eigen-b9cd8366d4e8", | ||
) | ||
|
||
|
||
new_http_archive( | ||
name = "gtest", | ||
url = "https://github.com/google/googletest/archive/release-1.7.0.zip", | ||
sha256 = "b58cb7547a28b2c718d1e38aee18a3659c9e3ff52440297e965f5edffe34b6d0", | ||
build_file = "gtest.BUILD", | ||
strip_prefix = "googletest-release-1.7.0", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# This is from Bazel's former travis setup, to avoid blowing up the RAM usage. | ||
startup --host_jvm_args=-Xmx2500m | ||
startup --host_jvm_args=-Xms2500m | ||
startup --batch | ||
test --ram_utilization_factor=10 | ||
|
||
# This is so we understand failures better | ||
build --verbose_failures | ||
|
||
# This is so we don't use sandboxed execution. Sandboxed execution | ||
# runs stuff in a container, and since Travis already runs its script | ||
# in a container (unless you require sudo in your .travis.yml) this | ||
# fails to run tests. | ||
build --spawn_strategy=standalone --genrule_strategy=standalone | ||
test --test_strategy=standalone | ||
|
||
# Below this line, .travis.yml will cat the default bazelrc. | ||
# This is needed so Bazel starts with the base workspace in its | ||
# package path. |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.