forked from batfish/batfish
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
76 lines (67 loc) · 1.96 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
71
72
73
74
75
76
language: java
sudo: true
dist: xenial
jdk:
- openjdk8
env:
- BF_BUILDER="mvn"
# Disable for now - no one is using it
# - BF_BUILDER="bazel" V="0.19.2"
matrix:
fast_finish: true
allow_failures:
- env: BF_BUILDER="bazel" V="0.19.2"
before_install:
- rm -rf $HOME/.cache/bazel/_bazel_$USER/install
- .travis/fix_java_format.sh
- |
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
OS=darwin
else
sysctl kernel.unprivileged_userns_clone=1
OS=linux
fi
URL="https://github.com/bazelbuild/bazel/releases/download/${V}/bazel-${V}-installer-${OS}-x86_64.sh"
wget -O install.sh "${URL}"
chmod +x install.sh
./install.sh --user
rm -f install.sh
install:
- .travis/install.sh
script:
- if [ ${BF_BUILDER} == "mvn" ]; then .travis/build.sh ; fi
- |
if [ ${BF_BUILDER} == "bazel" ]; then
bazel \
--output_base=$HOME/.cache/bazel \
--host_jvm_args=-Xmx500m \
--host_jvm_args=-Xms500m \
test \
--jobs=4 \
--curses=no \
--test_output=errors \
--verbose_failures \
--experimental_repository_cache="$HOME/.bazel_repository_cache" \
//...
fi
# Cache the Maven dependencies installed.
cache:
directories:
- $HOME/.batfish_z3_cache
- $HOME/.bazel_repository_cache
- $HOME/.cache/bazel
- $HOME/.m2
# Delete the batfish jars, which change every build, from the cache.
# Also delete the locally-built jars, which are installed every build.
#
# Otherwise the cache would be detected as updated every time.
before_cache:
- rm -rf $HOME/.m2/repository/com/jayway/jsonpath/json-path/
- rm -rf $HOME/.m2/repository/com/kjetland/mbknor-jackson-jsonschema_2.12/
- rm -rf $HOME/.m2/repository/com/microsoft/z3/z3/
- rm -rf $HOME/.m2/repository/net/sf/javabdd/
- rm -rf $HOME/.m2/repository/org/antlr/antlr4/
- rm -rf $HOME/.m2/repository/org/batfish
- rm -rf $HOME/.cache/bazel/_bazel_$USER/install
after_success:
- bash <(curl -s https://codecov.io/bash)