-
Notifications
You must be signed in to change notification settings - Fork 12
/
.travis.yml
57 lines (50 loc) · 3.22 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
language: java
jdk: openjdk8
sudo: false
before_script:
# get and build protobuf
- export PROTOBUF_VERSION=2.6.1
- wget --output-document $HOME/protobuf-$PROTOBUF_VERSION.tar.gz https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/protobuf-$PROTOBUF_VERSION.tar.gz
- cd $HOME
- tar xf protobuf-$PROTOBUF_VERSION.tar.gz
- cd protobuf-$PROTOBUF_VERSION
- ./configure
- make -j2
- cd $TRAVIS_BUILD_DIR
# configure maven repositories
- echo "<settings xmlns=\"http://maven.apache.org/SETTINGS/1.0.0\"" > $HOME/settings.xml
- echo " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" >> $HOME/settings.xml
- echo " xsi:schemaLocation=\"http://maven.apache.org/SETTINGS/1.0.0" >> $HOME/settings.xml
- echo " https://maven.apache.org/xsd/settings-1.0.0.xsd\">" >> $HOME/settings.xml
- echo " <profiles>" >> $HOME/settings.xml
- echo " <profile>" >> $HOME/settings.xml
- echo " <id>babudb-dev</id>" >> $HOME/settings.xml
- echo " <repositories>" >> $HOME/settings.xml
- echo " <repository>" >> $HOME/settings.xml
- echo " <id>central</id>" >> $HOME/settings.xml
- echo " <url>http://repo.maven.apache.org/maven2</url>" >> $HOME/settings.xml
- echo " </repository>" >> $HOME/settings.xml
- echo " <repository>" >> $HOME/settings.xml
- echo " <id>xtreemfs-repository</id>" >> $HOME/settings.xml
- echo " <url>https://xtreemfs.github.io/xtreemfs/maven</url>" >> $HOME/settings.xml
- echo " <snapshots><enabled>true</enabled></snapshots>" >> $HOME/settings.xml
- echo " </repository>" >> $HOME/settings.xml
- echo " </repositories>" >> $HOME/settings.xml
- echo " </profile>" >> $HOME/settings.xml
- echo " </profiles>" >> $HOME/settings.xml
- echo "</settings>" >> $HOME/settings.xml
# build jars without tests, as they depend on the built jars
- mvn --settings $HOME/settings.xml --activate-profiles babudb-dev --file $TRAVIS_BUILD_DIR/java/pom.xml -Dprotoc.bin=$HOME/protobuf-$PROTOBUF_VERSION/src/protoc -Dprotoc.include=$HOME/protobuf-$PROTOBUF_VERSION/src -DskipTests install
# build C++ tests
- mkdir -p $TRAVIS_BUILD_DIR/cpp/build
- cd $TRAVIS_BUILD_DIR/cpp/build
- cmake ..
- make -j2
- cd $TRAVIS_BUILD_DIR
script:
# run Java tests
- mvn --settings $HOME/settings.xml --activate-profiles babudb-dev --file $TRAVIS_BUILD_DIR/java/pom.xml -Dprotoc.bin=$HOME/protobuf-$PROTOBUF_VERSION/src/protoc -Dprotoc.include=$HOME/protobuf-$PROTOBUF_VERSION/src test
# FIXME: run C++ tests
# - cd $TRAVIS_BUILD_DIR/cpp/build
# - ./babudb_tests
# - cd $TRAVIS_BUILD_DIR