Add a travis script

Add a build script and ask Travis to run it. It downloads the tip of
libgit2's dev branch and tests against that.
This commit is contained in:
Carlos Martín Nieto 2014-02-28 14:26:03 +01:00
parent 639b66345c
commit f5f8e13744
2 changed files with 29 additions and 0 deletions

12
.travis.yml Normal file
View File

@ -0,0 +1,12 @@
language: go
go:
- 1.0
- 1.1
- tip
env:
- PKG_CONFIG_PATH=libgit2/install/lib/pkgconfig LD_LIBRARY_PATH=libgit2/install/lib
install:
- script/build-libgit2.sh

17
script/build-libgit2.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh
set -ex
git clone --depth 1 --single-branch git://github.com/libgit2/libgit2 libgit2
cd libgit2
cmake -DTHREADSAFE=ON \
-DBUILD_CLAR=OFF \
-DCMAKE_INSTALL_PREFIX=$PWD/install \
.
make install
# Let the Go build system know where to find libgit2
export LD_LIBRARY_PATH="$TMPDIR/libgit2/install/lib"
export PKG_CONFIG_PATH="$TMPDIR/libgit2/install/lib/pkgconfig"