forked from deepvision/libdispatch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
59 lines (54 loc) · 1.35 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
language: cpp
sudo: required
dist: trusty
addons:
artifacts: true
matrix:
include:
- compiler: clang
- compiler: clang
env: DISPATCH_BUILD_TYPE=Debug
- compiler: gcc
- compiler: gcc
env: DISPATCH_BUILD_TYPE=Debug
- compiler: clang
env: DISPATCH_ENABLE_TEST_SUITE=1
- compiler: clang
env: DISPATCH_SANITIZE=address,undefined DISPATCH_ENABLE_TEST_SUITE=1 LSAN_OPTIONS=exitcode=0
install:
- |
sudo apt-get update -qq
sudo apt-get install -qq \
clang-3.6 \
libblocksruntime-dev \
libkqueue-dev \
libpthread-workqueue-dev \
ninja-build \
python-pytest \
wbritish
- |
if [[ "$CC" =~ clang ]]; then
# Force use of our clang.
export CC=/usr/bin/clang-3.6
export CXX=/usr/bin/clang++-3.6
fi
before_script:
- |
if [[ "${DISPATCH_ENABLE_TEST_SUITE:-}" -eq 1 ]]; then
if [[ "${DISPATCH_BUILD_TYPE:-}" == "Debug" ]]; then
export "LIBDISPATCH_LOG=file"
fi
fi
script:
- mkdir travis-build && cd travis-build
- ../configure -GNinja
- ninja
- ninja package package_source
- env DESTDIR=$PWD/staging ninja install
- |
if [[ "${DISPATCH_ENABLE_TEST_SUITE:-}" -eq 1 ]]; then
for n in $(seq 2); do
# Run tests twice to flush out flaky tests.
ctest -j 2 --output-on-failure --schedule-random
done
fi