forked from google/certificate-transparency
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
131 lines (121 loc) · 4.23 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
sudo: false
language: cpp
env:
global:
- INSTALL_DIR=${TRAVIS_BUILD_DIR}/../install
- PROTOC="${INSTALL_DIR}/bin/protoc"
- GOPATH=${INSTALL_DIR}/go
- MAKE=make
addons:
apt:
sources: &common_sources
- ubuntu-toolchain-r-test
- kalakris-cmake
packages: &common_packages
- autoconf
- automake
- build-essential
- python-dev
- libstdc++-4.9-dev
- tcl8.5
- cmake
matrix:
include:
- compiler: clang
os: osx
env: SSL=openssl
- compiler: clang
os: linux
env: SSL=boringssl LLVM=3.6.2
addons:
apt:
sources: *common_sources
packages:
- *common_packages
- compiler: clang
os: linux
env: SSL=openssl LLVM=3.6.2
addons:
apt:
sources: *common_sources
packages:
- *common_packages
- compiler: clang
os: linux
env: SSL=openssl LLVM=3.6.2 SANITIZE="-fsanitize=address -fno-omit-frame-pointer" ASAN_OPTIONS="detect_leaks=1:check_initialization_order=1" LSAN_OPTIONS="suppressions=${HOME}/lsan.supp"
addons:
apt:
sources: *common_sources
packages:
- *common_packages
exclude:
- compiler: gcc
os: linux
env: REAL_CC=gcc-4.9 REAL_CXX=g++-4.9
addons:
apt:
sources: *common_sources
packages:
- *common_packages
- g++-4.9
cache:
apt: true
pip: true
directories:
- $HOME/.cache/pip
- $HOME/.ccache
- $TRAVIS_BUILD_DIR/../ct
- $TRAVIS_BUILD_DIR/../depot_tools
- $TRAVIS_BUILD_DIR/../install
before_install:
- eval "$(gimme 1.6)"
# Set compiler version overrides if we have any:
- if [ "${REAL_CC}" != "" ]; then export CC=${REAL_CC} CXX=${REAL_CXX}; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then . ./build/travis.osx.before_install.sh; fi
# Set up sanitizer blacklists:
- echo "leak:InitModule" > ${HOME}/lsan.supp
- echo "leak:SetExitLoopHandler" >> ${HOME}/lsan.supp
- echo "leak:masterelection_test" >> ${HOME}/lsan.supp
- if [ "${CLEAR_CACHE}" != "" ]; then echo "Clearing cache"; rm -fr ${TRAVIS_BUILD_DIR}/../ct ${TRAVIS_BUILD_DIR}/../install ${HOME}/.ccache; fi
- mkdir -p ${INSTALL_DIR}/include ${INSTALL_DIR}/lib ${INSTALL_DIR}/java
- echo "INSTALL_DIR=${INSTALL_DIR}"
- mkdir -p $GOPATH/src/github.com/google
- ln -sf $PWD $GOPATH/src/github.com/google
- echo "jars.protobuf = ${INSTALL_DIR}/java/protobuf.jar" > local.properties
- echo "protoc.bin = ${PROTOC}" >> local.properties
install:
# Workaround LLVM's apt mirror being feeble and underpowered
- |
if [ "$LLVM" != "" ]; then
CLANG_URL="http://llvm.org/releases/${LLVM}/clang+llvm-${LLVM}-x86_64-linux-gnu-ubuntu-14.04.tar.xz"
mkdir /tmp/clang && travis_retry wget --quiet -O - ${CLANG_URL} | tar --strip-components=1 -xJ -C /tmp/clang
export PATH="/tmp/clang/bin:${PATH}"
fi
- autoconf --version
- pushd ..
- mkdir -p ct
- wget http://central.maven.org/maven2/com/google/protobuf/protobuf-java/2.6.0/protobuf-java-2.6.0.jar -O ${INSTALL_DIR}/java/protobuf.jar
- if [ ! -e depot_tools/gclient ]; then git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git; fi
- export PATH="$PATH:/usr/local/bin:"`pwd`/depot_tools
- cd ct
- ln -s ../certificate-transparency certificate-transparency
- |-
gclient config --spec "solutions=[{\"name\": \"certificate-transparency\", \"url\": \"https://github.com/google/certificate-transparency.git\", \"deps_file\": \"DEPS\", \"managed\": False, \"custom_deps\": {}, \"safesync_url\": \"\", \"custom_vars\": { \"ssl_impl\": \"${SSL}\" } },]"
- gclient sync
- popd
- export PYTHONPATH=$(python -m site --user-site)
- pip install --user --upgrade -r python/requirements.txt
# Sigh, go get -t will fetch part of this package, but doesn't catch the transitive deps so grab it manually:
- pushd go
- go get github.com/stretchr/testify
- go get -v -d -t ./...
- popd
script:
- getconf _NPROCESSORS_ONLN
- ${MAKE} -j$(getconf _NPROCESSORS_ONLN) check VERBOSE=1 V=${ENV_VERBOSE}
- ant build test
- ${MAKE} -C python test
- pushd ${GOPATH}
- |
CGO_CPPFLAGS="-I${INSTALL_DIR}/include" CGO_LDFLAGS="-L${INSTALL_DIR}/lib" go test -v ./src/github.com/google/certificate-transparency/go/...
- popd