forked from pinterest/rocksplicator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
70 lines (69 loc) · 2.98 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
58
59
60
61
62
63
64
65
66
67
68
69
70
matrix:
include:
- language: cpp
sudo: required
services:
- docker
cache:
- ccache
before_install:
- docker pull gopalrajpurohit/rocksplicator-build:librdkafka_1_4_0
script:
- cd $HOME/.ccache
- |
if [ -e previous_git_commit.txt ]
then
read PREVIOUS_GIT_COMMIT < previous_git_commit.txt
cd "${TRAVIS_BUILD_DIR}"
if git branch -r --contains $PREVIOUS_GIT_COMMIT; then
cd $HOME/.ccache
if [[ -f touch_order.txt ]]; then
while read fn; do
touch $fn
done < touch_order.txt
else
echo "touch_order.txt not found, full build ..."
fi
# touch changed git files to trigger their rebuild
cd "${TRAVIS_BUILD_DIR}"
changed_files=`git diff --name-only $PREVIOUS_GIT_COMMIT HEAD`
echo "Previously cached Travis build based on git commit ${PREVIOUS_GIT_COMMIT}."
echo "... changed files since then:"
echo $changed_files
if [ -z "$changed_files" ]
then
echo "No files changed"
else
touch `echo $changed_files`
fi
else
echo "Unknown previous commit, full build ..."
fi
else
echo "Full build ..."
fi
- docker run -v $HOME/.ccache:/rocksplicator/build -v $TRAVIS_BUILD_DIR:/rocksplicator gopalrajpurohit/rocksplicator-build:librdkafka_1_4_0 /bin/sh -c "cd /rocksplicator/build && cmake .. && make && env CTEST_OUTPUT_ON_FAILURE=1 make test"
before_cache:
- cd $HOME/.ccache && find . -type f -printf "%T+\t%p\n" | sort | cut -f 2 > touch_order.txt
- cd "${TRAVIS_BUILD_DIR}" && git rev-parse HEAD > $HOME/.ccache/previous_git_commit.txt
- language: java
sudo: required
dist: trusty
group: edge
jdk: oraclejdk8
cache:
directories:
- $HOME/.m2
notifications:
email: false
before_install:
- sudo apt-get update -qq
- sudo apt-get install -q -y --force-yes libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev
- wget http://archive.apache.org/dist/thrift/0.9.1/thrift-0.9.1.tar.gz
- tar xfz thrift-0.9.1.tar.gz
- sed -i -e "s|http://repo1.maven.org/maven2|https://repo1.maven.org/maven2|" thrift-0.9.1/lib/java/build.properties
- sudo mkdir -p /root/.ant
- sudo cp ./settings.xml /root/.ant/settings.xml
- cd thrift-0.9.1 && ./configure --with-cpp=no --with-c_glib=no --with-java=yes --with-python=no --with-ruby=no --with-erlang=no --with-go=no --with-nodejs=no --with-php=no && sudo make install
script:
- cd ../cluster_management; mvn clean package -DskipTests # if you want to test: mvn "-DfailIfNoTests=false" test