-
Notifications
You must be signed in to change notification settings - Fork 115
/
.travis.yml
213 lines (213 loc) · 7.49 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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
group: travis_latest
language: python
cache: pip
matrix:
fast_finish: true
include:
- python: "3.6"
dist: xenial
env: >
BUILD="--enable-debug --disable-optimize --enable-more-deterministic
--enable-oom-breakpoint --enable-valgrind"
addons:
apt:
update: true
config:
retries: true
# sources:
# - ubuntu-toolchain-r-test
packages:
- autoconf2.13
- expect-dev # unbuffer requires this
- gdb
- lib32z1 # needed by 32-bit builds
- libc6-dbg # needed by Valgrind
- valgrind
- python: "3.6"
dist: xenial
env: >
BUILD="--disable-debug --disable-profiling --without-intl-api"
addons:
apt:
update: true
config:
retries: true
# sources:
# - ubuntu-toolchain-r-test
packages:
- autoconf2.13
- expect-dev # unbuffer requires this
- gdb
- lib32z1 # needed by 32-bit builds
- libc6-dbg # needed by Valgrind
- valgrind
- python: "3.7"
dist: xenial
env: >
BUILD="--enable-debug --disable-optimize --enable-more-deterministic
--enable-oom-breakpoint --enable-valgrind"
addons:
apt:
update: true
config:
retries: true
# sources:
# - ubuntu-toolchain-r-test
packages:
- autoconf2.13
- expect-dev # unbuffer requires this
- gdb
- lib32z1 # needed by 32-bit builds
- libc6-dbg # needed by Valgrind
- valgrind
- python: "3.7"
dist: xenial
env: >
BUILD="--disable-debug --disable-profiling --without-intl-api"
addons:
apt:
update: true
config:
retries: true
# sources:
# - ubuntu-toolchain-r-test
packages:
- autoconf2.13
- expect-dev # unbuffer requires this
- gdb
- lib32z1 # needed by 32-bit builds
- libc6-dbg # needed by Valgrind
- valgrind
- python: "3.7"
os: osx
language: sh
osx_image: xcode10.1
before_install:
- travis_retry brew update
- travis_retry brew install [email protected] shellcheck
- travis_retry brew upgrade python
- python3 -m venv venv
- source venv/bin/activate
- python: "3.7"
os: windows
language: sh
before_install:
- travis_retry choco install hg shellcheck
- travis_retry choco install python3 --version 3.7.5
- export PATH="/c/Python37:/c/Python37/Scripts:$PATH"
- travis_retry python -m pip install --upgrade pip wheel
# Sanity checks, so only run debug builds
- python: "nightly"
dist: xenial
env: >
BUILD="--enable-debug --disable-optimize --enable-more-deterministic
--enable-oom-breakpoint --enable-valgrind"
addons:
apt:
update: true
config:
retries: true
# sources:
# - ubuntu-toolchain-r-test
packages:
- autoconf2.13
- expect-dev # unbuffer requires this
- gdb
- lib32z1 # needed by 32-bit builds
- libc6-dbg # needed by Valgrind
- valgrind
allow_failures:
- python: "nightly"
before_install:
- |
if [ $TRAVIS_OS_NAME == "linux" ] ; then
gcc --version
g++ --version
clang --version
clang++ --version
llvm-symbolizer --version || true # Ignore exit code if llvm-symbolizer does not exist
which llvm-config || true # Find out location of llvm-config
export LLVM_CONFIG=/usr/local/clang-7.0.0/bin/llvm-config # From llvm-config location
llvm-config --version || true # Ignore exit code if llvm-config does not exist
/usr/bin/llvm-config --version || true # Ignore exit code if llvm-config does not exist
# Ensure latest Rust is installed
curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path
source $HOME/.cargo/env
rustup update stable
which rustup
rustup --version
which rustc
rustc --version
npm --version
fi
install:
# Already in venv, no need for --user
- travis_retry python -m pip install --upgrade setuptools pip
- travis_retry python -m pip --version
- travis_retry python -m pip install --upgrade google-compute-engine # For boto to work in Travis
- travis_retry python -m pip install --upgrade .[test] # Installs python testing-related packages
- travis_retry python -m pip install --upgrade -r requirements.txt # Gets FuzzManager, lithium-reducer from GitHub
- git --version
- hg --version || true # Windows Travis does not seem to detect installed Mercurial, unknown why for now
- python --version
- python3 --version || true # Windows Travis does not seem to detect installed python3, unknown why for now
# Linters may not work properly in latest Python nightly on Linux
- |
if [[ (! $TRAVIS_OS_NAME == "linux") || (! $TRAVIS_PYTHON_VERSION == "nightly") ]] ; then
python -m flake8 --version
fi
- |
if [[ (! $TRAVIS_OS_NAME == "linux") || (! $TRAVIS_PYTHON_VERSION == "nightly") ]] ; then
python -m pylint --version
fi
before_script:
- |
if [ ! $TRAVIS_OS_NAME == "windows" ] ; then
# Run shellcheck on shell scripts
(find . -type d \( -name venv \) -prune -o -type f -name "*.sh" -print0 | xargs -n 1 -0 shellcheck; exit;)
fi
- if [ ! $TRAVIS_OS_NAME == "windows" ] ; then travis_retry python -m pip install --upgrade bashate; fi
- |
if [ ! $TRAVIS_OS_NAME == "windows" ] ; then
# Run bashate on shell scripts
(find . -type d \( -name venv \) -prune -o -type f -name "*.sh" -print0 | xargs -n 1 -0 bashate; exit;)
fi
script:
# To run everything locally in local funfuzz github repository directory:
# python -m pytest --flake8 --pylint --cov=`pwd` --cov-report term-missing
# Compile-related tests are expected to fail at this stage (skip pylint with development Python versions)
- |
if [[ ($TRAVIS_OS_NAME == "linux") && ($TRAVIS_PYTHON_VERSION == "nightly") ]] ; then
# Work around astroid failing in Python nightly
python -m pip uninstall -y pylint astroid pytest-pylint
# Work around flake8 failing in Python nightly
python -m pytest -s -p no:flake8 -m "not slow" --cov --cov-report term-missing
# python -m pytest -s --flake8 -p no:pylint,cov -m "not slow"
else
python -m pytest -s --flake8 --pylint --pylint-jobs=2 -m "not slow" --cov --cov-report term-missing
fi
- |
if [ $TRAVIS_OS_NAME == "linux" ] ; then
pushd src/funfuzz/js/
npm install || travis_terminate 1
npm run lint:version || travis_terminate 1
npm run lint || travis_terminate 1
popd
fi
- |
if [ $TRAVIS_OS_NAME == "linux" ] ; then
mkdir -p $HOME/trees/
# aria2 / wget do not seem to have greater reliability than hg clone, so not using get_hg_repo.sh
time hg clone --stream https://hg.mozilla.org/mozilla-central/ $HOME/trees/mozilla-central
fi
- |
if [ $TRAVIS_OS_NAME == "linux" ] ; then
travis_wait 50 unbuffer python -m pytest -s -p no:flake8,pylint --cov --cov-report term-missing
fi
after_failure:
- |
if [ $TRAVIS_OS_NAME == "linux" ] ; then
tail -n 100 $HOME/shell-cache/*/*.busted*
fi
after_success:
- travis_retry codecov