Cache protobuf3 build in TravisCI
[platform/upstream/caffe.git] / .travis.yml
1 dist: trusty
2 sudo: required
3
4 language: cpp
5 compiler: gcc
6
7 env:
8   global:
9     - NUM_THREADS=4
10   matrix:
11     # Use a build matrix to test many builds in parallel
12     # envvar defaults:
13     #   WITH_CMAKE: false
14     #   WITH_PYTHON3: false
15     #   WITH_IO: true
16     #   WITH_CUDA: false
17     #   WITH_CUDNN: false
18     - BUILD_NAME="default-make"
19 #   - BUILD_NAME="python3-make" WITH_PYTHON3=true
20     - BUILD_NAME="no-io-make" WITH_IO=false
21     - BUILD_NAME="cuda-make" WITH_CUDA=true
22     - BUILD_NAME="cudnn-make" WITH_CUDA=true WITH_CUDNN=true
23
24     - BUILD_NAME="default-cmake" WITH_CMAKE=true
25     - BUILD_NAME="python3-cmake" WITH_CMAKE=true WITH_PYTHON3=true
26     - BUILD_NAME="no-io-cmake" WITH_CMAKE=true WITH_IO=false
27     - BUILD_NAME="cuda-cmake" WITH_CMAKE=true WITH_CUDA=true
28     - BUILD_NAME="cudnn-cmake" WITH_CMAKE=true WITH_CUDA=true WITH_CUDNN=true
29
30 cache:
31   timeout: 604800  # 1 week
32   apt: true
33   directories:
34     - ~/protobuf3
35
36 before_install:
37   - source ./scripts/travis/defaults.sh
38
39 install:
40   - sudo -E ./scripts/travis/install-deps.sh
41   - ./scripts/travis/setup-venv.sh ~/venv
42   - source ~/venv/bin/activate
43   - ./scripts/travis/install-python-deps.sh
44
45 before_script:
46   - ./scripts/travis/configure.sh
47
48 script:
49   - ./scripts/travis/build.sh
50   - ./scripts/travis/test.sh
51
52 notifications:
53 # Emails are sent to the committer's git-configured email address by default,
54 # but only if they have access to the repository.  To enable Travis on your
55 # public fork of Caffe, just go to travis-ci.org and flip the switch on for
56 # your Caffe fork.  To configure your git email address, use:
57 #     git config --global user.email me@example.com
58   email:
59     on_success: always
60     on_failure: always
61
62 # IRC notifications disabled by default.
63 # Uncomment next 5 lines to send notifications to chat.freenode.net#caffe
64 #   irc:
65 #     channels:
66 #       - "chat.freenode.net#caffe"
67 #     template:
68 #       - "%{repository}/%{branch} (%{commit} - %{author}): %{message}"