You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2016/03/06 18:54:10 UTC

lucy git commit: Rework Travis setup

Repository: lucy
Updated Branches:
  refs/heads/master 2dec3cec6 -> f7798ced6


Rework Travis setup

- Test Go bindings.
- Test without sudo.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/f7798ced
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/f7798ced
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/f7798ced

Branch: refs/heads/master
Commit: f7798ced681eeeff0e6621c28c741082f0db13f9
Parents: 2dec3ce
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sun Mar 6 18:39:12 2016 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sun Mar 6 18:49:58 2016 +0100

----------------------------------------------------------------------
 .travis.yml              |  4 ++--
 devel/bin/travis-test.sh | 35 +++++++++++++++++++++++++----------
 2 files changed, 27 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/f7798ced/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index a84cc40..052e274 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -14,13 +14,13 @@
 # limitations under the License.
 
 language: perl
-sudo: required
+sudo: false
 # Override Travis' default Perl installation script.
 install: 'true'
 script: devel/bin/travis-test.sh
 env:
   - LUCY_DEBUG=1 CLOWNFISH_HOST=c
-#  - LUCY_DEBUG=1 CLOWNFISH_HOST=go
+  - LUCY_DEBUG=1 CLOWNFISH_HOST=go
   - LUCY_DEBUG=1 CLOWNFISH_HOST=perl PERL_VERSION=5.20
   - LUCY_DEBUG=1 CLOWNFISH_HOST=perl PERL_VERSION=5.18
   - LUCY_DEBUG=1 CLOWNFISH_HOST=perl PERL_VERSION=5.16

http://git-wip-us.apache.org/repos/asf/lucy/blob/f7798ced/devel/bin/travis-test.sh
----------------------------------------------------------------------
diff --git a/devel/bin/travis-test.sh b/devel/bin/travis-test.sh
index 8b99f4f..69bc4e2 100755
--- a/devel/bin/travis-test.sh
+++ b/devel/bin/travis-test.sh
@@ -21,31 +21,33 @@ set -e
 # Print all commands before executing.
 set -x
 
+install_dir="$TRAVIS_BUILD_DIR/install"
+
+# Fetch Clownfish.
+git clone -q --depth 1 https://git-wip-us.apache.org/repos/asf/lucy-clownfish.git
+
 test_c() {
     # Install Clownfish.
-    git clone -q --depth 1 https://git-wip-us.apache.org/repos/asf/lucy-clownfish.git
     cd lucy-clownfish/runtime/c
     ./configure
     make -j
-    sudo ./install.sh --prefix /usr/local
-    sudo ldconfig
+    ./install.sh --prefix "$install_dir"
 
     cd ../../../c
-    ./configure
+    ./configure --clownfish-prefix "$install_dir"
     make -j test
 }
 
 test_perl() {
     perlbrew switch $PERL_VERSION
+    export PERL5LIB="$install_dir/lib/perl5"
 
     # Install Clownfish.
-    git clone -q --depth 1 https://git-wip-us.apache.org/repos/asf/lucy-clownfish.git
     cd lucy-clownfish/runtime/perl
     perl Build.PL
-    ./Build
-    sudo ./Build install
+    ./Build install --install-base "$install_dir"
     cd ../../compiler/perl
-    sudo ./Build install
+    ./Build install --install-base "$install_dir"
 
     cd ../../../perl
     perl Build.PL
@@ -53,8 +55,21 @@ test_perl() {
 }
 
 test_go() {
-    # TODO
-    exit 1
+    export GOPATH="$install_dir"
+    mkdir -p "$install_dir/src/git-wip-us.apache.org/repos/asf"
+    ln -s "$TRAVIS_BUILD_DIR/lucy-clownfish" \
+        "$install_dir/src/git-wip-us.apache.org/repos/asf/lucy-clownfish.git"
+    ln -s "$TRAVIS_BUILD_DIR" \
+        "$install_dir/src/git-wip-us.apache.org/repos/asf/lucy.git"
+
+    # Install Clownfish.
+    cd lucy-clownfish/compiler/go
+    go run build.go install
+    cd ../../runtime/go
+    go run build.go install
+
+    cd ../../../go
+    go run build.go test
 }
 
 case $CLOWNFISH_HOST in