forked from cmu-db/bustub
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
61 lines (59 loc) · 2.15 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
sudo: required
language: cpp
matrix:
fast_finish: true
include:
- os: osx
osx_image: xcode10.1
compiler: clang
env:
- NAME="macos-10.14/AppleClang-1001.0.46.4 (Debug/packages.sh)" CMAKE_BUILD_TYPE=debug
install:
- echo 'y' | ./build_support/packages.sh
- export LLVM_DIR=/usr/local/Cellar/llvm/8.0.1
- os: linux
dist: trusty
env:
- NAME="ubuntu-18.04/gcc-7.3.0 (Debug/packages.sh)" CMAKE_BUILD_TYPE=debug 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/build_support/packages.sh"
- os: linux
dist: trusty
env:
- NAME="ubuntu-18.04/gcc-7.3.0 (Debug/Dockerfile)" CMAKE_BUILD_TYPE=debug DOCKER=true
install:
- docker build -t cmu-db/bustub .
- docker run -itd --name build cmu-db/bustub
- docker cp . build:/repo
- os: linux
dist: trusty
env:
- NAME="ubuntu-18.04/clang-8.0.0 (Debug/Dockerfile)" CMAKE_BUILD_TYPE=debug DOCKER=true
install:
- docker build -t cmu-db/bustub .
- docker run -itd -e "CC=/usr/bin/clang-8" -e "CXX=/usr/bin/clang++-8" --name build cmu-db/bustub
- docker cp . build:/repo
before_script:
- if [[ "$DOCKER" = true ]]; then
docker exec build /bin/sh -c "mkdir -p /repo/build" &&
docker exec -e CMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE" build /bin/sh -c "cd /repo/build && cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE .." &&
docker exec build /bin/sh -c "cd /repo/build && make check-format" &&
docker exec build /bin/sh -c "cd /repo/build && make check-lint" &&
docker exec build /bin/sh -c "cd /repo/build && make check-clang-tidy" &&
docker exec build /bin/sh -c "cd /repo/build && make check-tests";
else
mkdir build &&
cd build &&
cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE .. &&
make check-lint &&
make check-tests;
fi
script:
- if [[ "$DOCKER" = true ]]; then
docker exec build /bin/sh -c "cd /repo/build && make -j4";
else
make -j4;
fi