forked from DynamoRIO/dynamorio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
165 lines (155 loc) · 7.38 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# **********************************************************
# Copyright (c) 2016-2018 Google, Inc. All rights reserved.
# **********************************************************
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# * Neither the name of Google, Inc. nor the names of its contributors may be
# used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.
# Travis CI configuration:
notifications:
email:
# This overrides the default of sending to the committer and author.
# Temporarily sending to bruening too to help diagnose email problems.
recipients:
on_success: always
on_failure: always
# Don't run Travis on pushes to feature branches: pull requests cover those.
branches:
only:
- master
# We use Trusty to get cmake 3.5 via the cmake3 package.
sudo: required
dist: trusty
language:
- c
# We use a jobs include approach rather than an os, compiler, env matrix
# with excludes so we can use conditional builds (plus it's clearer this way).
jobs:
include:
# 32-bit Linux build with gcc and run tests:
- os: linux
compiler: gcc
env: DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY=no DEPLOY=yes EXTRA_ARGS="32_only package"
# 64-bit Linux build with gcc and run tests:
- os: linux
compiler: gcc
env: DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY=no DEPLOY=yes EXTRA_ARGS="64_only package"
# AArchXX cross-compile with gcc, no tests:
- os: linux
compiler: gcc
env: DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY=yes DEPLOY=no
# Android ARM cross-compile with gcc, no tests:
- os: linux
compiler: gcc
env: DYNAMORIO_CROSS_ANDROID_ONLY=yes DEPLOY=no DYNAMORIO_ANDROID_TOOLCHAIN='/tmp/android-gcc-arm-ndk-10e'
# 32-bit Linux build with clang, no tests (runsuite.cmake disables the tests):
- os: linux
compiler: clang
env: DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY=no DEPLOY=no EXTRA_ARGS=32_only
# 64-bit Linux build with clang, no tests (runsuite.cmake disables the tests),
# install and require clang-format:
- os: linux
compiler: clang
env: DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY=no DEPLOY=no EXTRA_ARGS="64_only require_format"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-6.0
packages:
- clang-format-6.0
# 32-bit OSX build with clang and run tests:
- os: osx
# gcc on Travis claims to not be CMAKE_COMPILER_IS_GNUCC so we only run clang.
compiler: clang
# We do not have 64-bit support on OSX yet (i#1979).
env: DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY=no DEPLOY=no EXTRA_ARGS=32_only
# XXX i#2764: Travis OSX resources are over-subscribed and it can take
# hours to get an OSX machine, so we skip running PR's for now.
if: type = push
# For C/C++ there is no default install, so we set "install", not "before_install".
install:
- uname -a
# FIXME: remove the "brew update" step once Travis fixes their Mac VM's
# on 11/15/17. Xref https://github.com/travis-ci/travis-ci/issues/8552.
- if [[ "`uname`" == "Darwin" ]]; then brew update; brew install nasm; fi
# ImageMagick is present but these are not:
- >
if [[ "`uname`" == "Linux" ]]; then
sudo apt-get -y install doxygen transfig vera++ cmake3; fi
# Install multilib for non-cross-compiling Linux builds:
- >
if [[ "`uname`" == "Linux" && $DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY == no ]]; then
sudo apt-get -y install g++-multilib; fi
# Install cross-compilers for cross-compiling Linux build:
- >
if [[ "`uname`" == "Linux" && $DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY == yes ]]; then
sudo apt-get -y install g++-arm-linux-gnueabihf g++-aarch64-linux-gnu; fi
# Fetch and install Android NDK for Andoid cross-compile build only.
- >
if [[ "`uname`" == "Linux" && $DYNAMORIO_CROSS_ANDROID_ONLY == yes ]]; then
cd /tmp
wget https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip
unzip -q android-ndk-r10e-linux-x86_64.zip
android-ndk-r10e/build/tools/make-standalone-toolchain.sh --arch=arm \
--toolchain=arm-linux-androideabi-4.9 \
--platform=android-21 \
--install-dir=/tmp/android-gcc-arm-ndk-10e
# Manually force using ld.bfd, setting CMAKE_LINKER does not work.
ln -sf ld.bfd /tmp/android-gcc-arm-ndk-10e/arm-linux-androideabi/bin/ld
ln -sf arm-linux-androideabi-ld.bfd /tmp/android-gcc-arm-ndk-10e/bin/arm-linux-androideabi-ld
cd -
fi
script:
- suite/runsuite_wrapper.pl travis $EXTRA_ARGS
# For now we create packages as part of each (enabled) job.
# We disable test running for these package builds in runsuite.cmake by
# looking for $TRAVIS_EVENT_TYPE=="cron".
# Longer-term we may want to use package.cmake instead and even make official
# builds on Travis (i#2861).
before_deploy:
- git config --local user.name "Travis Auto-Tag"
- git config --local user.email "[email protected]"
# XXX: for now we duplicate this version number here with CMakeLists.txt.
# We should find a way to share (xref i#1565).
# We support setting TAG_SUFFIX on triggered builds so we can have
# multiple unique tags in one day (the patchlevel here is the day number).
- export GIT_TAG="cronbuild-7.0.$((`git log -n 1 --format=%ct` / (60*60*24)))${TAG_SUFFIX}"
- git tag $GIT_TAG -a -m "Travis auto-generated tag for build $TRAVIS_BUILD_NUMBER."
deploy:
provider: releases
api_key:
secure: V3kgcRiwijjpmcSuVio1+/oZ8cqJGaVlL42hN0w/jjO6LoELy2kknT5h80H7wMVKpZnMg+2v/yWj5hawlrwh8nCS51lYllPHN7K+ivzkyJ3R4cp1WAzL56vnYFYz1/twYpeS10Zl6JL6wt788WcibpShMOIlAnXnm1kU9BBVtYE=
file_glob: true
file: "build*/DynamoRIO*.tar.gz"
skip_cleanup: true
# The name must just be the tag in order to match Appveyor.
name: $GIT_TAG
# This body is clobbered by Appveyor.
body: "Auto-generated periodic build (Travis build $TRAVIS_BUILD_NUMBER). Unlike official release builds, Dr. Memory is not included in this build, and i686 is separated from x86_64 rather than combined in one package."
on:
repo: DynamoRIO/dynamorio
branch: master
condition: $TRAVIS_EVENT_TYPE = cron && $DEPLOY = yes