summaryrefslogtreecommitdiffstats
path: root/src/rocksdb/.travis.yml
blob: 300d729eb01d2856cce88740bf0a2664cf7bc548 (plain)
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
dist: xenial
language: cpp
os:
  - linux
  - osx
compiler:
  - clang
  - gcc
osx_image: xcode9.4
jdk:
  - openjdk7
cache:
  - ccache

addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - libgflags-dev
      - libbz2-dev
      - liblz4-dev
      - libsnappy-dev
      - liblzma-dev  # xv
      - libzstd-dev
      - zlib1g-dev
  homebrew:
    update: true
    packages:
      - ccache
      - gflags
      - lz4
      - snappy
      - xz
      - zstd

env:
  - TEST_GROUP=platform_dependent # 16-18 minutes
  - TEST_GROUP=1 # 33-35 minutes
  - TEST_GROUP=2 # 18-20 minutes
  - TEST_GROUP=3 # 20-22 minutes
  - TEST_GROUP=4 # 12-14 minutes
  # Run java tests
  - JOB_NAME=java_test # 4-11 minutes
  # Build ROCKSDB_LITE
  - JOB_NAME=lite_build # 3-4 minutes
  # Build examples
  - JOB_NAME=examples # 5-7 minutes
  - JOB_NAME=cmake # 3-5 minutes
  - JOB_NAME=cmake-gcc8 # 3-5 minutes
  - JOB_NAME=cmake-mingw # 3 minutes

matrix:
  exclude:
  - os: osx
    env: TEST_GROUP=1
  - os: osx
    env: TEST_GROUP=2
  - os: osx
    env: TEST_GROUP=3
  - os: osx
    env: TEST_GROUP=4
  - os: osx
    env: JOB_NAME=cmake-gcc8
  - os : osx
    env: JOB_NAME=cmake-mingw
  - os : linux
    compiler: clang
  - os : osx
    compiler: gcc

install:
  - if [ "${TRAVIS_OS_NAME}" == osx ]; then
      PATH=$PATH:/usr/local/opt/ccache/libexec;
    fi
  - if [ "${JOB_NAME}" == cmake-gcc8 ]; then
      sudo apt-get install -y g++-8;
      CC=gcc-8 && CXX=g++-8;
    fi
  - if [ "${JOB_NAME}" == cmake-mingw ]; then
      sudo apt-get install -y mingw-w64 ;
    fi
  - if [[ "${JOB_NAME}" == cmake* ]] && [ "${TRAVIS_OS_NAME}" == linux ]; then
      CMAKE_DIST_URL="https://rocksdb-deps.s3-us-west-2.amazonaws.com/cmake/cmake-3.14.5-Linux-$(uname -m).tar.bz2";
      TAR_OPT="--strip-components=1 -xj";
      mkdir cmake-dist && curl --silent --fail --show-error --location "${CMAKE_DIST_URL}" | tar -C cmake-dist ${TAR_OPT} && export PATH=$PWD/cmake-dist/bin:$PATH;
    fi
  - if [[ "${JOB_NAME}" == java_test ]]; then
      java -version && echo "JAVA_HOME=${JAVA_HOME}";
    fi

before_script:
  # Increase the maximum number of open file descriptors, since some tests use
  # more FDs than the default limit.
  - ulimit -n 8192

script:
  - ${CXX} --version
  - if [ `command -v ccache` ]; then ccache -C; fi
  - case $TEST_GROUP in
    platform_dependent)
      OPT=-DTRAVIS V=1 ROCKSDBTESTS_END=db_block_cache_test make -j4 all_but_some_tests check_some
      ;;
    1)
      OPT=-DTRAVIS V=1 ROCKSDBTESTS_START=db_block_cache_test ROCKSDBTESTS_END=db_iter_test make -j4 check_some
      ;;
    2)
      OPT="-DTRAVIS -DROCKSDB_NAMESPACE=alternative_rocksdb_ns" V=1 make -j4 tools && OPT="-DTRAVIS -DROCKSDB_NAMESPACE=alternative_rocksdb_ns" V=1 ROCKSDBTESTS_START=db_iter_test ROCKSDBTESTS_END=options_file_test make -j4 check_some
      ;;
    3)
      OPT=-DTRAVIS V=1 ROCKSDBTESTS_START=options_file_test ROCKSDBTESTS_END=write_prepared_transaction_test make -j4 check_some
      ;;
    4)
      OPT=-DTRAVIS V=1 ROCKSDBTESTS_START=write_prepared_transaction_test make -j4 check_some
      ;;
    esac
  - case $JOB_NAME in
    java_test)
      OPT=-DTRAVIS V=1 make rocksdbjava jtest
      ;;
    lite_build)
      OPT='-DTRAVIS -DROCKSDB_LITE' V=1 make -j4 static_lib tools
      ;;
    examples)
      OPT=-DTRAVIS V=1 make -j4 static_lib && cd examples && make -j4
      ;;
    cmake-mingw)
      sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix;
      mkdir build && cd build && cmake -DJNI=1 -DWITH_GFLAGS=OFF .. -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ -DCMAKE_SYSTEM_NAME=Windows && make -j4 rocksdb rocksdbjni
      ;;
    cmake*)
      mkdir build && cd build && cmake -DJNI=1 .. -DCMAKE_BUILD_TYPE=Release && make -j4 rocksdb rocksdbjni
      ;;
    esac
notifications:
    email:
      - leveldb@fb.com