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/04/05 12:02:22 UTC
[2/4] lucy git commit: Rework Travis setup
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/9a64e898
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/9a64e898
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/9a64e898
Branch: refs/heads/0.5
Commit: 9a64e89804194cb28d0f680ed07a2f3b80ec9a45
Parents: 06e9181
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sun Mar 6 18:39:12 2016 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Tue Apr 5 11:53:32 2016 +0200
----------------------------------------------------------------------
.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/9a64e898/.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/9a64e898/devel/bin/travis-test.sh
----------------------------------------------------------------------
diff --git a/devel/bin/travis-test.sh b/devel/bin/travis-test.sh
index 5846897..dbced44 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 -b 0.5 --depth 1 https://git-wip-us.apache.org/repos/asf/lucy-clownfish.git
+
test_c() {
# Install Clownfish.
- git clone -q -b 0.5 --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 -b 0.5 --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