2019-06-17 17:15:58 +00:00
|
|
|
dist: xenial
|
2014-05-11 04:18:23 +00:00
|
|
|
language: cpp
|
2016-04-12 22:05:56 +00:00
|
|
|
os:
|
2016-06-30 21:34:50 +00:00
|
|
|
- linux
|
2016-04-12 22:05:56 +00:00
|
|
|
- osx
|
2020-03-11 19:31:06 +00:00
|
|
|
arch:
|
|
|
|
- amd64
|
2020-03-13 03:58:26 +00:00
|
|
|
- arm64
|
2020-03-11 19:31:06 +00:00
|
|
|
- ppc64le
|
2017-06-05 22:34:40 +00:00
|
|
|
compiler:
|
|
|
|
- clang
|
|
|
|
- gcc
|
2019-12-17 21:52:09 +00:00
|
|
|
osx_image: xcode9.4
|
2017-01-09 21:45:04 +00:00
|
|
|
cache:
|
|
|
|
- ccache
|
2015-09-10 00:55:33 +00:00
|
|
|
|
2016-04-12 22:05:56 +00:00
|
|
|
addons:
|
2018-07-13 17:47:49 +00:00
|
|
|
apt:
|
|
|
|
sources:
|
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
packages:
|
|
|
|
- libgflags-dev
|
2019-12-17 21:52:09 +00:00
|
|
|
- libbz2-dev
|
|
|
|
- liblz4-dev
|
2018-07-13 17:47:49 +00:00
|
|
|
- libsnappy-dev
|
2019-12-17 21:52:09 +00:00
|
|
|
- liblzma-dev # xv
|
|
|
|
- libzstd-dev
|
2018-07-13 17:47:49 +00:00
|
|
|
- zlib1g-dev
|
2019-12-17 21:52:09 +00:00
|
|
|
homebrew:
|
|
|
|
update: true
|
|
|
|
packages:
|
|
|
|
- ccache
|
|
|
|
- gflags
|
|
|
|
- lz4
|
|
|
|
- snappy
|
|
|
|
- xz
|
|
|
|
- zstd
|
|
|
|
|
2016-04-12 22:05:56 +00:00
|
|
|
env:
|
2017-05-30 17:32:16 +00:00
|
|
|
- TEST_GROUP=platform_dependent # 16-18 minutes
|
|
|
|
- TEST_GROUP=1 # 33-35 minutes
|
2018-03-14 01:47:38 +00:00
|
|
|
- TEST_GROUP=2 # 18-20 minutes
|
|
|
|
- TEST_GROUP=3 # 20-22 minutes
|
|
|
|
- TEST_GROUP=4 # 12-14 minutes
|
2016-04-13 21:22:29 +00:00
|
|
|
# Run java tests
|
2017-05-30 17:32:16 +00:00
|
|
|
- JOB_NAME=java_test # 4-11 minutes
|
2016-04-13 21:22:29 +00:00
|
|
|
# Build ROCKSDB_LITE
|
2017-05-30 17:32:16 +00:00
|
|
|
- JOB_NAME=lite_build # 3-4 minutes
|
2017-04-07 17:36:09 +00:00
|
|
|
# Build examples
|
2017-05-30 17:32:16 +00:00
|
|
|
- JOB_NAME=examples # 5-7 minutes
|
|
|
|
- JOB_NAME=cmake # 3-5 minutes
|
2018-07-13 17:47:49 +00:00
|
|
|
- JOB_NAME=cmake-gcc8 # 3-5 minutes
|
2020-04-20 20:21:34 +00:00
|
|
|
- JOB_NAME=cmake-gcc9 # 3-5 minutes
|
|
|
|
- JOB_NAME=cmake-gcc9-c++20 # 3-5 minutes
|
2017-05-30 17:32:16 +00:00
|
|
|
- JOB_NAME=cmake-mingw # 3 minutes
|
2020-05-22 18:15:44 +00:00
|
|
|
- JOB_NAME=status_checked
|
2015-09-10 01:53:55 +00:00
|
|
|
|
2017-01-09 21:45:04 +00:00
|
|
|
matrix:
|
|
|
|
exclude:
|
2018-07-13 17:47:49 +00:00
|
|
|
- os: osx
|
|
|
|
env: JOB_NAME=cmake-gcc8
|
2020-04-20 20:21:34 +00:00
|
|
|
- os: osx
|
|
|
|
env: JOB_NAME=cmake-gcc9
|
|
|
|
- os: osx
|
|
|
|
env: JOB_NAME=cmake-gcc9-c++20
|
2020-03-11 19:31:06 +00:00
|
|
|
- os: osx
|
2017-05-05 23:09:24 +00:00
|
|
|
env: JOB_NAME=cmake-mingw
|
2020-03-11 19:31:06 +00:00
|
|
|
- os: osx
|
|
|
|
arch: ppc64le
|
|
|
|
- os: osx
|
2017-06-05 22:34:40 +00:00
|
|
|
compiler: gcc
|
2020-03-13 03:58:26 +00:00
|
|
|
- os : linux
|
|
|
|
arch: arm64
|
|
|
|
env: JOB_NAME=cmake-mingw
|
2020-03-11 19:31:06 +00:00
|
|
|
- os: linux
|
|
|
|
arch: ppc64le
|
|
|
|
env: JOB_NAME=cmake-mingw
|
|
|
|
- os: linux
|
|
|
|
compiler: clang
|
2020-04-20 20:21:34 +00:00
|
|
|
# Exclude all but most unique cmake variants for pull requests, but build all in branches
|
|
|
|
- if: type = pull_request
|
|
|
|
os : linux
|
|
|
|
arch: amd64
|
|
|
|
env: JOB_NAME=cmake
|
|
|
|
- if: type = pull_request
|
|
|
|
os : linux
|
|
|
|
arch: amd64
|
|
|
|
env: JOB_NAME=cmake-gcc8
|
|
|
|
- if: type = pull_request
|
|
|
|
os : linux
|
|
|
|
arch: amd64
|
|
|
|
env: JOB_NAME=cmake-gcc9
|
2020-03-19 19:49:58 +00:00
|
|
|
# Exclude most osx, arm64 and ppc64le tests for pull requests, but build in branches
|
2020-04-09 23:40:49 +00:00
|
|
|
# Temporarily disable ppc64le unit tests in PRs until Travis gets its act together (#6653)
|
|
|
|
- if: type = pull_request
|
|
|
|
os: linux
|
|
|
|
arch: ppc64le
|
|
|
|
env: TEST_GROUP=platform_dependent
|
2020-03-20 20:14:10 +00:00
|
|
|
# NB: the cmake build is a partial java test
|
|
|
|
- if: type = pull_request
|
2020-03-19 19:49:58 +00:00
|
|
|
os: osx
|
|
|
|
env: TEST_GROUP=1
|
2020-03-20 20:14:10 +00:00
|
|
|
- if: type = pull_request
|
2020-03-19 19:49:58 +00:00
|
|
|
os : linux
|
|
|
|
arch: arm64
|
|
|
|
env: TEST_GROUP=1
|
2020-03-20 20:14:10 +00:00
|
|
|
- if: type = pull_request
|
2020-03-19 19:49:58 +00:00
|
|
|
os: linux
|
|
|
|
arch: ppc64le
|
|
|
|
env: TEST_GROUP=1
|
2020-03-20 20:14:10 +00:00
|
|
|
- if: type = pull_request
|
2020-03-19 19:49:58 +00:00
|
|
|
os: osx
|
|
|
|
env: TEST_GROUP=2
|
2020-03-20 20:14:10 +00:00
|
|
|
- if: type = pull_request
|
2020-03-19 19:49:58 +00:00
|
|
|
os : linux
|
|
|
|
arch: arm64
|
|
|
|
env: TEST_GROUP=2
|
2020-03-20 20:14:10 +00:00
|
|
|
- if: type = pull_request
|
2020-03-19 19:49:58 +00:00
|
|
|
os: linux
|
|
|
|
arch: ppc64le
|
|
|
|
env: TEST_GROUP=2
|
2020-03-20 20:14:10 +00:00
|
|
|
- if: type = pull_request
|
2020-03-19 19:49:58 +00:00
|
|
|
os: osx
|
|
|
|
env: TEST_GROUP=3
|
2020-03-20 20:14:10 +00:00
|
|
|
- if: type = pull_request
|
2020-03-19 19:49:58 +00:00
|
|
|
os : linux
|
|
|
|
arch: arm64
|
|
|
|
env: TEST_GROUP=3
|
2020-03-20 20:14:10 +00:00
|
|
|
- if: type = pull_request
|
2020-03-19 19:49:58 +00:00
|
|
|
os: linux
|
|
|
|
arch: ppc64le
|
|
|
|
env: TEST_GROUP=3
|
2020-03-20 20:14:10 +00:00
|
|
|
- if: type = pull_request
|
2020-03-19 19:49:58 +00:00
|
|
|
os: osx
|
|
|
|
env: TEST_GROUP=4
|
2020-03-20 20:14:10 +00:00
|
|
|
- if: type = pull_request
|
2020-03-19 19:49:58 +00:00
|
|
|
os : linux
|
|
|
|
arch: arm64
|
|
|
|
env: TEST_GROUP=4
|
2020-03-20 20:14:10 +00:00
|
|
|
- if: type = pull_request
|
2020-03-19 19:49:58 +00:00
|
|
|
os: linux
|
|
|
|
arch: ppc64le
|
|
|
|
env: TEST_GROUP=4
|
2020-04-16 22:48:24 +00:00
|
|
|
- if: type = pull_request AND commit_message !~ /java/
|
2020-03-20 20:14:10 +00:00
|
|
|
os : osx
|
|
|
|
env: JOB_NAME=java_test
|
2020-04-16 22:48:24 +00:00
|
|
|
- if: type = pull_request AND commit_message !~ /java/
|
2020-03-19 19:49:58 +00:00
|
|
|
os : linux
|
|
|
|
arch: arm64
|
2020-03-20 20:14:10 +00:00
|
|
|
env: JOB_NAME=java_test
|
2020-04-16 22:48:24 +00:00
|
|
|
- if: type = pull_request AND commit_message !~ /java/
|
2020-03-19 19:49:58 +00:00
|
|
|
os: linux
|
|
|
|
arch: ppc64le
|
2020-03-20 20:14:10 +00:00
|
|
|
env: JOB_NAME=java_test
|
|
|
|
- if: type = pull_request
|
|
|
|
os : osx
|
|
|
|
env: JOB_NAME=lite_build
|
|
|
|
- if: type = pull_request
|
2020-03-19 19:49:58 +00:00
|
|
|
os : linux
|
|
|
|
arch: arm64
|
2020-03-20 20:14:10 +00:00
|
|
|
env: JOB_NAME=lite_build
|
|
|
|
- if: type = pull_request
|
2020-03-19 19:49:58 +00:00
|
|
|
os: linux
|
|
|
|
arch: ppc64le
|
2020-03-20 20:14:10 +00:00
|
|
|
env: JOB_NAME=lite_build
|
|
|
|
- if: type = pull_request
|
|
|
|
os : osx
|
|
|
|
env: JOB_NAME=examples
|
|
|
|
- if: type = pull_request
|
2020-03-19 19:49:58 +00:00
|
|
|
os : linux
|
|
|
|
arch: arm64
|
|
|
|
env: JOB_NAME=examples
|
2020-03-20 20:14:10 +00:00
|
|
|
- if: type = pull_request
|
2020-03-19 19:49:58 +00:00
|
|
|
os: linux
|
|
|
|
arch: ppc64le
|
|
|
|
env: JOB_NAME=examples
|
2020-03-20 20:14:10 +00:00
|
|
|
- if: type = pull_request
|
2020-03-19 19:49:58 +00:00
|
|
|
os : linux
|
|
|
|
arch: arm64
|
|
|
|
env: JOB_NAME=cmake-gcc8
|
2020-03-20 20:14:10 +00:00
|
|
|
- if: type = pull_request
|
2020-03-19 19:49:58 +00:00
|
|
|
os: linux
|
|
|
|
arch: ppc64le
|
|
|
|
env: JOB_NAME=cmake-gcc8
|
2020-04-20 20:21:34 +00:00
|
|
|
- if: type = pull_request
|
|
|
|
os : linux
|
|
|
|
arch: arm64
|
|
|
|
env: JOB_NAME=cmake-gcc9
|
|
|
|
- if: type = pull_request
|
|
|
|
os: linux
|
|
|
|
arch: ppc64le
|
|
|
|
env: JOB_NAME=cmake-gcc9
|
|
|
|
- if: type = pull_request
|
|
|
|
os : linux
|
|
|
|
arch: arm64
|
|
|
|
env: JOB_NAME=cmake-gcc9-c++20
|
|
|
|
- if: type = pull_request
|
|
|
|
os: linux
|
|
|
|
arch: ppc64le
|
|
|
|
env: JOB_NAME=cmake-gcc9-c++20
|
2020-05-22 18:15:44 +00:00
|
|
|
- if: type = pull_request
|
|
|
|
os : osx
|
|
|
|
env: JOB_NAME=status_checked
|
|
|
|
- if: type = pull_request
|
|
|
|
os : linux
|
|
|
|
arch: arm64
|
|
|
|
env: JOB_NAME=status_checked
|
|
|
|
- if: type = pull_request
|
|
|
|
os: linux
|
|
|
|
arch: ppc64le
|
|
|
|
env: JOB_NAME=status_checked
|
2020-03-11 19:31:06 +00:00
|
|
|
|
2017-05-30 17:32:16 +00:00
|
|
|
install:
|
|
|
|
- if [ "${TRAVIS_OS_NAME}" == osx ]; then
|
|
|
|
PATH=$PATH:/usr/local/opt/ccache/libexec;
|
|
|
|
fi
|
2018-07-13 17:47:49 +00:00
|
|
|
- if [ "${JOB_NAME}" == cmake-gcc8 ]; then
|
2019-12-17 21:52:09 +00:00
|
|
|
sudo apt-get install -y g++-8;
|
2018-07-13 17:47:49 +00:00
|
|
|
CC=gcc-8 && CXX=g++-8;
|
|
|
|
fi
|
2020-04-20 20:21:34 +00:00
|
|
|
- if [ "${JOB_NAME}" == cmake-gcc9 ] || [ "${JOB_NAME}" == cmake-gcc9-c++20 ]; then
|
|
|
|
sudo apt-get install -y g++-9;
|
|
|
|
CC=gcc-9 && CXX=g++-9;
|
|
|
|
fi
|
2019-12-17 21:52:09 +00:00
|
|
|
- if [ "${JOB_NAME}" == cmake-mingw ]; then
|
|
|
|
sudo apt-get install -y mingw-w64 ;
|
|
|
|
fi
|
2017-11-28 20:13:20 +00:00
|
|
|
- if [[ "${JOB_NAME}" == cmake* ]] && [ "${TRAVIS_OS_NAME}" == linux ]; then
|
2020-03-13 20:36:45 +00:00
|
|
|
CMAKE_DIST_URL="https://rocksdb-deps.s3-us-west-2.amazonaws.com/cmake/cmake-3.14.5-Linux-$(uname -m).tar.bz2";
|
2020-03-11 19:31:06 +00:00
|
|
|
TAR_OPT="--strip-components=1 -xj";
|
2020-03-13 03:58:26 +00:00
|
|
|
if [ "aarch64" == "$(uname -m)" ]; then
|
|
|
|
sudo apt-get install -y libuv1 librhash0;
|
|
|
|
sudo apt-get upgrade -y libstdc++6;
|
|
|
|
fi;
|
2020-03-11 19:31:06 +00:00
|
|
|
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;
|
2019-06-17 17:15:58 +00:00
|
|
|
fi
|
2020-03-12 19:22:03 +00:00
|
|
|
- |
|
|
|
|
if [[ "${JOB_NAME}" == java_test || "${JOB_NAME}" == cmake* ]]; then
|
|
|
|
# Ensure JDK 8
|
|
|
|
if [ "${TRAVIS_OS_NAME}" == osx ]; then
|
|
|
|
brew tap AdoptOpenJDK/openjdk
|
|
|
|
brew cask install adoptopenjdk8
|
|
|
|
export JAVA_HOME=$(/usr/libexec/java_home)
|
|
|
|
else
|
|
|
|
sudo apt-get install -y openjdk-8-jdk
|
|
|
|
export PATH=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)/bin:$PATH
|
|
|
|
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)
|
|
|
|
fi
|
|
|
|
echo "JAVA_HOME=${JAVA_HOME}"
|
|
|
|
which java && java -version
|
|
|
|
which javac && javac -version
|
2017-11-28 20:13:20 +00:00
|
|
|
fi
|
2016-04-13 21:22:29 +00:00
|
|
|
|
2015-09-10 01:53:55 +00:00
|
|
|
before_script:
|
2017-05-30 17:32:16 +00:00
|
|
|
# Increase the maximum number of open file descriptors, since some tests use
|
|
|
|
# more FDs than the default limit.
|
|
|
|
- ulimit -n 8192
|
2015-09-10 00:55:33 +00:00
|
|
|
|
2015-09-18 17:15:02 +00:00
|
|
|
script:
|
2020-04-04 17:00:31 +00:00
|
|
|
- date; ${CXX} --version
|
2017-10-11 05:13:39 +00:00
|
|
|
- if [ `command -v ccache` ]; then ccache -C; fi
|
2018-07-13 17:47:49 +00:00
|
|
|
- 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)
|
2019-11-07 17:49:41 +00:00
|
|
|
OPT=-DTRAVIS V=1 ROCKSDBTESTS_START=db_block_cache_test ROCKSDBTESTS_END=db_iter_test make -j4 check_some
|
2018-07-13 17:47:49 +00:00
|
|
|
;;
|
|
|
|
2)
|
2020-02-20 20:07:53 +00:00
|
|
|
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
|
2018-07-13 17:47:49 +00:00
|
|
|
;;
|
|
|
|
3)
|
2019-11-07 17:49:41 +00:00
|
|
|
OPT=-DTRAVIS V=1 ROCKSDBTESTS_START=options_file_test ROCKSDBTESTS_END=write_prepared_transaction_test make -j4 check_some
|
2018-07-13 17:47:49 +00:00
|
|
|
;;
|
|
|
|
4)
|
|
|
|
OPT=-DTRAVIS V=1 ROCKSDBTESTS_START=write_prepared_transaction_test make -j4 check_some
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
- case $JOB_NAME in
|
|
|
|
java_test)
|
2019-06-17 17:15:58 +00:00
|
|
|
OPT=-DTRAVIS V=1 make rocksdbjava jtest
|
2018-07-13 17:47:49 +00:00
|
|
|
;;
|
|
|
|
lite_build)
|
2020-05-15 20:57:34 +00:00
|
|
|
OPT='-DTRAVIS -DROCKSDB_LITE' V=1 make -j4 all
|
2018-07-13 17:47:49 +00:00
|
|
|
;;
|
|
|
|
examples)
|
|
|
|
OPT=-DTRAVIS V=1 make -j4 static_lib && cd examples && make -j4
|
|
|
|
;;
|
|
|
|
cmake-mingw)
|
2019-06-17 17:15:58 +00:00
|
|
|
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix;
|
2019-12-13 19:33:59 +00:00
|
|
|
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
|
2018-07-13 17:47:49 +00:00
|
|
|
;;
|
|
|
|
cmake*)
|
2020-04-20 20:21:34 +00:00
|
|
|
case $JOB_NAME in
|
|
|
|
*-c++20)
|
|
|
|
OPT=-DCMAKE_CXX_STANDARD=20
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
mkdir build && cd build && cmake -DJNI=1 .. -DCMAKE_BUILD_TYPE=Release $OPT && make -j4 rocksdb rocksdbjni
|
2018-07-13 17:47:49 +00:00
|
|
|
;;
|
2020-05-22 18:15:44 +00:00
|
|
|
status_checked)
|
2020-05-23 13:48:40 +00:00
|
|
|
OPT=-DTRAVIS V=1 ASSERT_STATUS_CHECKED=1 make -j4 check_some
|
2020-05-22 18:15:44 +00:00
|
|
|
;;
|
2018-07-13 17:47:49 +00:00
|
|
|
esac
|
2014-05-14 23:08:02 +00:00
|
|
|
notifications:
|
2015-09-10 03:30:00 +00:00
|
|
|
email:
|
|
|
|
- leveldb@fb.com
|