forked from eisop/checker-framework.demos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis-build.sh
executable file
·34 lines (24 loc) · 890 Bytes
/
.travis-build.sh
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
#!/bin/bash
echo "Entering `pwd`/.travis-build.sh"
# Fail the whole script if any command fails
set -e
export SHELLOPTS
ROOT=`readlink -f ..`
export CHECKERFRAMEWORK=`readlink -f ${CHECKERFRAMEWORK:-$ROOT/checker-framework}`
if [ -d "/tmp/plume-scripts" ] ; then
(cd /tmp/plume-scripts && git pull -q) > /dev/null 2>&1
else
(cd /tmp && git clone --depth 1 -q https://github.com/plume-lib/plume-scripts.git)
fi
## Build Checker Framework
if [ -d $CHECKERFRAMEWORK ] ; then
# Fails if not currently on a branch
git -C $CHECKERFRAMEWORK pull || true
else
/tmp/plume-scripts/git-clone-related typetools checker-framework ${CHECKERFRAMEWORK}
fi
# This also builds annotation-tools and jsr308-langtools
(cd $CHECKERFRAMEWORK && ./.travis-build-without-test.sh downloadjdk jdk8)
## Run test
ant -Djsr308.home=$ROOT
echo "Exiting checker-framework.demos/.travis-build.sh"