From 73d84762aae2ab42b7602b0694972dea4391e41d Mon Sep 17 00:00:00 2001 From: Nicolas Bigaouette Date: Fri, 17 Mar 2017 14:14:40 -0400 Subject: [PATCH 1/8] Move environment variables to env/global --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index eb08f5374d..6b2ad13901 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,13 +6,16 @@ cache: cargo: true rust: stable +env: + global: + - RUST_BACKTRACE=1 + - CC="gcc-4.9" + - CXX="g++-4.9" install: - - export CC="gcc-4.9" CXX="g++-4.9" - source travis-ci/install.sh script: - - export RUST_BACKTRACE=1 - cargo test -vv -j 2 --features tensorflow_unstable - cargo run --example regression - cargo run --features tensorflow_unstable --example expressions From e2bb3d1573f602fbc627b6d242055046448e0958 Mon Sep 17 00:00:00 2001 From: Nicolas Bigaouette Date: Fri, 17 Mar 2017 14:16:56 -0400 Subject: [PATCH 2/8] Use Travis' 'matrix' feature to test against tensorflow built from source and pre-built --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6b2ad13901..9b9b7a10f6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,9 +11,14 @@ env: - RUST_BACKTRACE=1 - CC="gcc-4.9" - CXX="g++-4.9" + matrix: + - TF_RUST_BUILD_FROM_SRC=true + - TF_RUST_BUILD_FROM_SRC=false + install: - - source travis-ci/install.sh + # Install dependencies only if we build tensorflow from source. + - if [[ "$TF_RUST_BUILD_FROM_SRC" == "true" ]]; then source travis-ci/install.sh; fi script: - cargo test -vv -j 2 --features tensorflow_unstable From bdaa6087dd787b1996a8a388a7716328d1c4a5f9 Mon Sep 17 00:00:00 2001 From: Nicolas Bigaouette Date: Fri, 17 Mar 2017 14:55:12 -0400 Subject: [PATCH 3/8] Install numpy through pip, not apt See Travis' documentation: https://docs.travis-ci.com/user/languages/python/#pip Should fix: https://travis-ci.org/nbigaouette-eai/rust/jobs/212227182#L808-L814 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9b9b7a10f6..d12c81a7cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,7 @@ env: install: # Install dependencies only if we build tensorflow from source. - if [[ "$TF_RUST_BUILD_FROM_SRC" == "true" ]]; then source travis-ci/install.sh; fi + - if [[ "$TF_RUST_BUILD_FROM_SRC" == "true" ]]; then pip install --user numpy; fi script: - cargo test -vv -j 2 --features tensorflow_unstable @@ -37,7 +38,6 @@ addons: - g++-4.9 - gcc-4.9 - oracle-java8-installer - - python-numpy - swig notifications: From b28ade8d816efc115bb61090b7c621a7dc5356c8 Mon Sep 17 00:00:00 2001 From: Nicolas Bigaouette Date: Fri, 17 Mar 2017 15:30:03 -0400 Subject: [PATCH 4/8] Run on rust's stable, beta and nightly --- .travis.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d12c81a7cb..6ee3d33529 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,11 @@ dist: trusty # still in beta, but required for the prebuilt TF binaries cache: cargo: true -rust: stable +rust: + - stable + - beta + - nightly + env: global: - RUST_BACKTRACE=1 From cbbee8eacbd6ef3cc6c13cbd90deb90eac3579f8 Mon Sep 17 00:00:00 2001 From: Nicolas Bigaouette Date: Fri, 17 Mar 2017 15:31:01 -0400 Subject: [PATCH 5/8] Allow rust nightly to fail --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 6ee3d33529..130206cbb5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,11 @@ env: - TF_RUST_BUILD_FROM_SRC=false +matrix: + allow_failures: + - rust: nightly + + install: # Install dependencies only if we build tensorflow from source. - if [[ "$TF_RUST_BUILD_FROM_SRC" == "true" ]]; then source travis-ci/install.sh; fi From 73740af7e78eb4e0ffc7b3251313de676a511dc0 Mon Sep 17 00:00:00 2001 From: Nicolas Bigaouette Date: Fri, 17 Mar 2017 15:31:37 -0400 Subject: [PATCH 6/8] Use `fast_finish` (allowed failure are not waited upon) --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 130206cbb5..90f6e86723 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,7 @@ env: matrix: + fast_finish: true allow_failures: - rust: nightly From 3d49cedd0bd42a49507c63b5a306ead5bb3662f7 Mon Sep 17 00:00:00 2001 From: Nicolas Bigaouette Date: Mon, 20 Mar 2017 11:23:06 -0400 Subject: [PATCH 7/8] Travis: Disable building TensorFlow from source --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 90f6e86723..e9c260d532 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,9 @@ env: - CC="gcc-4.9" - CXX="g++-4.9" matrix: - - TF_RUST_BUILD_FROM_SRC=true + # Building TensorFlow in Travis is not working properly, probably due + # to resources constraints. + # - TF_RUST_BUILD_FROM_SRC=true - TF_RUST_BUILD_FROM_SRC=false From ce55c828e8681b897bd8da695b3254ce143c3165 Mon Sep 17 00:00:00 2001 From: Nicolas Bigaouette Date: Mon, 20 Mar 2017 11:43:33 -0400 Subject: [PATCH 8/8] Run on both linux and OSX --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index e9c260d532..b8ea68d993 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,9 @@ env: # - TF_RUST_BUILD_FROM_SRC=true - TF_RUST_BUILD_FROM_SRC=false +os: + - linux + - osx matrix: fast_finish: true