forked from cmu-db/noisepage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
103 lines (101 loc) · 4.53 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
sudo: required
language: cpp
matrix:
fast_finish: true
include:
- os: osx
osx_image: xcode9.4
compiler: clang
env:
- NAME="Mac [dbg/clang]" CMAKE_BUILD_TYPE=debug TERRIER_USE_ASAN=On
install:
- echo 'y' | ./script/installation/packages.sh
- export PATH=/usr/local/opt/llvm/bin:$PATH
- os: linux
dist: trusty
env:
- NAME="Docker[dbg/packages.sh]" CMAKE_BUILD_TYPE=debug TERRIER_USE_ASAN=On DOCKER=true
install:
- docker pull ubuntu:18.04
- docker run -itd --name build ubuntu:18.04
- docker cp . build:/repo
- docker exec build /bin/sh -c "echo 'y' | /repo/script/installation/packages.sh"
- os: linux
dist: trusty
env:
- NAME="Docker[dbg/Dockerfile]" CMAKE_BUILD_TYPE=debug TERRIER_USE_ASAN=On DOCKER=true
install:
- docker build -t cmu-db/terrier .
- docker run -itd --name build cmu-db/terrier
- docker cp . build:/repo
# Release builds. Will be replaced by Jenkins.
- os: osx
osx_image: xcode9.4
compiler: clang
env:
- NAME="Mac [rel/clang]" CMAKE_BUILD_TYPE=release TERRIER_USE_ASAN=Off
install:
- echo 'y' | ./script/installation/packages.sh
- export PATH=/usr/local/opt/llvm/bin:$PATH
- os: linux
dist: trusty
env:
- NAME="Docker[rel/packages.sh]" CMAKE_BUILD_TYPE=release TERRIER_USE_ASAN=Off DOCKER=true
install:
- docker pull ubuntu:18.04
- docker run -itd --name build ubuntu:18.04
- docker cp . build:/repo
- docker exec build /bin/sh -c "echo 'y' | /repo/script/installation/packages.sh"
- os: linux
dist: trusty
env:
- NAME="Docker[rel/Dockerfile]" CMAKE_BUILD_TYPE=release TERRIER_USE_ASAN=Off DOCKER=true
install:
- docker build -t cmu-db/terrier .
- docker run -itd --name build cmu-db/terrier
- docker cp . build:/repo
# Coverage. Will be replaced by Jenkins.
- os: linux
dist: trusty
env:
- NAME="Docker[Coverage/Dockerfile]" CMAKE_BUILD_TYPE=debug TERRIER_USE_ASAN=Off DOCKER=true
install:
- docker build -t cmu-db/terrier .
- docker run -itd --name build cmu-db/terrier
- docker cp . build:/repo
before_script:
- docker exec build /bin/sh -c "apt-get -y install curl"
- docker exec build /bin/sh -c "mkdir -p /repo/build"
- docker exec -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" -e TRAVIS_BRANCH="$TRAVIS_BRANCH" build /bin/sh -c "cd /repo/build && cmake -DCMAKE_BUILD_TYPE=debug -DTERRIER_GENERATE_COVERAGE=On .."
- docker exec -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" -e TRAVIS_BRANCH="$TRAVIS_BRANCH" build /bin/sh -c "cd /repo/build && make"
- docker exec -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" -e TRAVIS_BRANCH="$TRAVIS_BRANCH" build /bin/sh -c "cd /repo/build && make coveralls"
before_script:
- if [[ "$DOCKER" = true ]]; then
docker exec build /bin/sh -c "cd /repo/apidoc && touch warnings.txt && doxygen Doxyfile.in 2>warnings.txt && (cat warnings.txt | grep -v Doxyfile.in > warnings.txt || true) && if [ -s warnings.txt ]; then cat warnings.txt; false; fi" &&
docker exec build /bin/sh -c "mkdir -p /repo/build" &&
docker exec -e CMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE" -e TERRIER_USE_ASAN="$TERRIER_USE_ASAN" build /bin/sh -c "cd /repo/build && cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DTERRIER_USE_ASAN=$TERRIER_USE_ASAN .." &&
docker exec build /bin/sh -c "cd /repo/build && make check-clang-tidy" &&
docker exec build /bin/sh -c "cd /repo/build && make check-format" &&
docker exec build /bin/sh -c "cd /repo/build && make check-lint" ;
else
cd apidoc &&
touch warnings.txt &&
doxygen Doxyfile.in 2>warnings.txt &&
(cat warnings.txt | grep -v Doxyfile.in > warnings.txt || true) &&
if [ -s warnings.txt ]; then cat warnings.txt; false; fi &&
cd .. &&
mkdir build &&
cd build &&
cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DTERRIER_USE_ASAN=$TERRIER_USE_ASAN .. &&
ASAN_OPTIONS=detect_container_overflow=0 make check-clang-tidy &&
ASAN_OPTIONS=detect_container_overflow=0 make check-format &&
ASAN_OPTIONS=detect_container_overflow=0 make check-lint;
fi
script:
- if [[ "$DOCKER" = true ]]; then
docker exec build /bin/sh -c "cd /repo/build && make" &&
docker exec build /bin/sh -c "cd /repo/build && make unittest" ;
else
ASAN_OPTIONS=detect_container_overflow=0 make &&
ASAN_OPTIONS=detect_container_overflow=0 make unittest ;
fi