2019-06-17 19:15:58 +02:00
|
|
|
dist: xenial
|
2014-05-11 06:18:23 +02:00
|
|
|
language: cpp
|
2016-04-13 00:05:56 +02:00
|
|
|
os:
|
2016-06-30 23:34:50 +02:00
|
|
|
- linux
|
2016-04-13 00:05:56 +02:00
|
|
|
- osx
|
2020-03-11 20:31:06 +01:00
|
|
|
arch:
|
|
|
|
- amd64
|
2020-03-13 04:58:26 +01:00
|
|
|
- arm64
|
2020-03-11 20:31:06 +01:00
|
|
|
- ppc64le
|
2017-06-06 00:34:40 +02:00
|
|
|
compiler:
|
|
|
|
- clang
|
|
|
|
- gcc
|
2019-12-17 22:52:09 +01:00
|
|
|
osx_image: xcode9.4
|
2017-01-09 22:45:04 +01:00
|
|
|
cache:
|
|
|
|
- ccache
|
2015-09-10 02:55:33 +02:00
|
|
|
|
2016-04-13 00:05:56 +02:00
|
|
|
addons:
|
2018-07-13 19:47:49 +02:00
|
|
|
apt:
|
|
|
|
sources:
|
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
packages:
|
|
|
|
- libgflags-dev
|
2019-12-17 22:52:09 +01:00
|
|
|
- libbz2-dev
|
|
|
|
- liblz4-dev
|
2018-07-13 19:47:49 +02:00
|
|
|
- libsnappy-dev
|
2019-12-17 22:52:09 +01:00
|
|
|
- liblzma-dev # xv
|
|
|
|
- libzstd-dev
|
2018-07-13 19:47:49 +02:00
|
|
|
- zlib1g-dev
|
2019-12-17 22:52:09 +01:00
|
|
|
homebrew:
|
|
|
|
update: true
|
|
|
|
packages:
|
|
|
|
- ccache
|
|
|
|
- gflags
|
|
|
|
- lz4
|
|
|
|
- snappy
|
|
|
|
- xz
|
|
|
|
- zstd
|
|
|
|
|
2016-04-13 00:05:56 +02:00
|
|
|
env:
|
2017-05-30 19:32:16 +02:00
|
|
|
- TEST_GROUP=platform_dependent # 16-18 minutes
|
|
|
|
- TEST_GROUP=1 # 33-35 minutes
|
2018-03-14 02:47:38 +01:00
|
|
|
- TEST_GROUP=2 # 18-20 minutes
|
|
|
|
- TEST_GROUP=3 # 20-22 minutes
|
|
|
|
- TEST_GROUP=4 # 12-14 minutes
|
2016-04-13 23:22:29 +02:00
|
|
|
# Run java tests
|
2017-05-30 19:32:16 +02:00
|
|
|
- JOB_NAME=java_test # 4-11 minutes
|
2016-04-13 23:22:29 +02:00
|
|
|
# Build ROCKSDB_LITE
|
2017-05-30 19:32:16 +02:00
|
|
|
- JOB_NAME=lite_build # 3-4 minutes
|
2017-04-07 19:36:09 +02:00
|
|
|
# Build examples
|
2017-05-30 19:32:16 +02:00
|
|
|
- JOB_NAME=examples # 5-7 minutes
|
|
|
|
- JOB_NAME=cmake # 3-5 minutes
|
2018-07-13 19:47:49 +02:00
|
|
|
- JOB_NAME=cmake-gcc8 # 3-5 minutes
|
2020-04-20 22:21:34 +02:00
|
|
|
- JOB_NAME=cmake-gcc9 # 3-5 minutes
|
|
|
|
- JOB_NAME=cmake-gcc9-c++20 # 3-5 minutes
|
2017-05-30 19:32:16 +02:00
|
|
|
- JOB_NAME=cmake-mingw # 3 minutes
|
2020-05-22 20:15:44 +02:00
|
|
|
- JOB_NAME=status_checked
|
2015-09-10 03:53:55 +02:00
|
|
|
|
2017-01-09 22:45:04 +01:00
|
|
|
matrix:
|
|
|
|
exclude:
|
2018-07-13 19:47:49 +02:00
|
|
|
- os: osx
|
|
|
|
env: JOB_NAME=cmake-gcc8
|
2020-04-20 22:21:34 +02:00
|
|
|
- os: osx
|
|
|
|
env: JOB_NAME=cmake-gcc9
|
|
|
|
- os: osx
|
|
|
|
env: JOB_NAME=cmake-gcc9-c++20
|
2020-03-11 20:31:06 +01:00
|
|
|
- os: osx
|
2017-05-06 01:09:24 +02:00
|
|
|
env: JOB_NAME=cmake-mingw
|
2020-03-11 20:31:06 +01:00
|
|
|
- os: osx
|
|
|
|
arch: ppc64le
|
|
|
|
- os: osx
|
2017-06-06 00:34:40 +02:00
|
|
|
compiler: gcc
|
2020-03-13 04:58:26 +01:00
|
|
|
- os : linux
|
|
|
|
arch: arm64
|
|
|
|
env: JOB_NAME=cmake-mingw
|
2020-03-11 20:31:06 +01:00
|
|
|
- os: linux
|
|
|
|
arch: ppc64le
|
|
|
|
env: JOB_NAME=cmake-mingw
|
|
|
|
- os: linux
|
|
|
|
compiler: clang
|
2020-04-20 22:21:34 +02: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 20:49:58 +01:00
|
|
|
# Exclude most osx, arm64 and ppc64le tests for pull requests, but build in branches
|
2020-04-10 01:40:49 +02: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 21:14:10 +01:00
|
|
|
# NB: the cmake build is a partial java test
|
|
|
|
- if: type = pull_request
|
2020-03-19 20:49:58 +01:00
|
|
|
os: osx
|
|
|
|
env: TEST_GROUP=1
|
2020-03-20 21:14:10 +01:00
|
|
|
- if: type = pull_request
|
2020-03-19 20:49:58 +01:00
|
|
|
os : linux
|
|
|
|
arch: arm64
|
|
|
|
env: TEST_GROUP=1
|
2020-03-20 21:14:10 +01:00
|
|
|
- if: type = pull_request
|
2020-03-19 20:49:58 +01:00
|
|
|
os: linux
|
|
|
|
arch: ppc64le
|
|
|
|
env: TEST_GROUP=1
|
2020-03-20 21:14:10 +01:00
|
|
|
- if: type = pull_request
|
2020-03-19 20:49:58 +01:00
|
|
|
os: osx
|
|
|
|
env: TEST_GROUP=2
|
2020-03-20 21:14:10 +01:00
|
|
|
- if: type = pull_request
|
2020-03-19 20:49:58 +01:00
|
|
|
os : linux
|
|
|
|
arch: arm64
|
|
|
|
env: TEST_GROUP=2
|
2020-03-20 21:14:10 +01:00
|
|
|
- if: type = pull_request
|
2020-03-19 20:49:58 +01:00
|
|
|
os: linux
|
|
|
|
arch: ppc64le
|
|
|
|
env: TEST_GROUP=2
|
2020-03-20 21:14:10 +01:00
|
|
|
- if: type = pull_request
|
2020-03-19 20:49:58 +01:00
|
|
|
os: osx
|
|
|
|
env: TEST_GROUP=3
|
2020-03-20 21:14:10 +01:00
|
|
|
- if: type = pull_request
|
2020-03-19 20:49:58 +01:00
|
|
|
os : linux
|
|
|
|
arch: arm64
|
|
|
|
env: TEST_GROUP=3
|
2020-03-20 21:14:10 +01:00
|
|
|
- if: type = pull_request
|
2020-03-19 20:49:58 +01:00
|
|
|
os: linux
|
|
|
|
arch: ppc64le
|
|
|
|
env: TEST_GROUP=3
|
2020-03-20 21:14:10 +01:00
|
|
|
- if: type = pull_request
|
2020-03-19 20:49:58 +01:00
|
|
|
os: osx
|
|
|
|
env: TEST_GROUP=4
|
2020-03-20 21:14:10 +01:00
|
|
|
- if: type = pull_request
|
2020-03-19 20:49:58 +01:00
|
|
|
os : linux
|
|
|
|
arch: arm64
|
|
|
|
env: TEST_GROUP=4
|
2020-03-20 21:14:10 +01:00
|
|
|
- if: type = pull_request
|
2020-03-19 20:49:58 +01:00
|
|
|
os: linux
|
|
|
|
arch: ppc64le
|
|
|
|
env: TEST_GROUP=4
|
2020-04-17 00:48:24 +02:00
|
|
|
- if: type = pull_request AND commit_message !~ /java/
|
2020-03-20 21:14:10 +01:00
|
|
|
os : osx
|
|
|
|
env: JOB_NAME=java_test
|
2020-04-17 00:48:24 +02:00
|
|
|
- if: type = pull_request AND commit_message !~ /java/
|
2020-03-19 20:49:58 +01:00
|
|
|
os : linux
|
|
|
|
arch: arm64
|
2020-03-20 21:14:10 +01:00
|
|
|
env: JOB_NAME=java_test
|
2020-04-17 00:48:24 +02:00
|
|
|
- if: type = pull_request AND commit_message !~ /java/
|
2020-03-19 20:49:58 +01:00
|
|
|
os: linux
|
|
|
|
arch: ppc64le
|
2020-03-20 21:14:10 +01:00
|
|
|
env: JOB_NAME=java_test
|
|
|
|
- if: type = pull_request
|
|
|
|
os : osx
|
|
|
|
env: JOB_NAME=lite_build
|
|
|
|
- if: type = pull_request
|
2020-03-19 20:49:58 +01:00
|
|
|
os : linux
|
|
|
|
arch: arm64
|
2020-03-20 21:14:10 +01:00
|
|
|
env: JOB_NAME=lite_build
|
|
|
|
- if: type = pull_request
|
2020-03-19 20:49:58 +01:00
|
|
|
os: linux
|
|
|
|
arch: ppc64le
|
2020-03-20 21:14:10 +01:00
|
|
|
env: JOB_NAME=lite_build
|
|
|
|
- if: type = pull_request
|
|
|
|
os : osx
|
|
|
|
env: JOB_NAME=examples
|
|
|
|
- if: type = pull_request
|
2020-03-19 20:49:58 +01:00
|
|
|
os : linux
|
|
|
|
arch: arm64
|
|
|
|
env: JOB_NAME=examples
|
2020-03-20 21:14:10 +01:00
|
|
|
- if: type = pull_request
|
2020-03-19 20:49:58 +01:00
|
|
|
os: linux
|
|
|
|
arch: ppc64le
|
|
|
|
env: JOB_NAME=examples
|
2020-03-20 21:14:10 +01:00
|
|
|
- if: type = pull_request
|
2020-03-19 20:49:58 +01:00
|
|
|
os : linux
|
|
|
|
arch: arm64
|
|
|
|
env: JOB_NAME=cmake-gcc8
|
2020-03-20 21:14:10 +01:00
|
|
|
- if: type = pull_request
|
2020-03-19 20:49:58 +01:00
|
|
|
os: linux
|
|
|
|
arch: ppc64le
|
|
|
|
env: JOB_NAME=cmake-gcc8
|
2020-04-20 22:21:34 +02: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 20:15:44 +02: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 20:31:06 +01:00
|
|
|
|
2017-05-30 19:32:16 +02:00
|
|
|
install:
|
|
|
|
- if [ "${TRAVIS_OS_NAME}" == osx ]; then
|
|
|
|
PATH=$PATH:/usr/local/opt/ccache/libexec;
|
|
|
|
fi
|
2018-07-13 19:47:49 +02:00
|
|
|
- if [ "${JOB_NAME}" == cmake-gcc8 ]; then
|
2019-12-17 22:52:09 +01:00
|
|
|
sudo apt-get install -y g++-8;
|
2018-07-13 19:47:49 +02:00
|
|
|
CC=gcc-8 && CXX=g++-8;
|
|
|
|
fi
|
2020-04-20 22:21:34 +02: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 22:52:09 +01:00
|
|
|
- if [ "${JOB_NAME}" == cmake-mingw ]; then
|
|
|
|
sudo apt-get install -y mingw-w64 ;
|
|
|
|
fi
|
2017-11-28 21:13:20 +01:00
|
|
|
- if [[ "${JOB_NAME}" == cmake* ]] && [ "${TRAVIS_OS_NAME}" == linux ]; then
|
2020-03-13 21:36:45 +01: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 20:31:06 +01:00
|
|
|
TAR_OPT="--strip-components=1 -xj";
|
2020-03-13 04:58:26 +01:00
|
|
|
if [ "aarch64" == "$(uname -m)" ]; then
|
|
|
|
sudo apt-get install -y libuv1 librhash0;
|
|
|
|
sudo apt-get upgrade -y libstdc++6;
|
|
|
|
fi;
|
2020-03-11 20:31:06 +01: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 19:15:58 +02:00
|
|
|
fi
|
2020-03-12 20:22:03 +01: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 21:13:20 +01:00
|
|
|
fi
|
2016-04-13 23:22:29 +02:00
|
|
|
|
2015-09-10 03:53:55 +02:00
|
|
|
before_script:
|
2017-05-30 19:32:16 +02: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 02:55:33 +02:00
|
|
|
|
2015-09-18 19:15:02 +02:00
|
|
|
script:
|
2020-04-04 19:00:31 +02:00
|
|
|
- date; ${CXX} --version
|
2017-10-11 07:13:39 +02:00
|
|
|
- if [ `command -v ccache` ]; then ccache -C; fi
|
2018-07-13 19:47:49 +02: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 18:49:41 +01:00
|
|
|
OPT=-DTRAVIS V=1 ROCKSDBTESTS_START=db_block_cache_test ROCKSDBTESTS_END=db_iter_test make -j4 check_some
|
2018-07-13 19:47:49 +02:00
|
|
|
;;
|
|
|
|
2)
|
2020-02-20 21:07:53 +01: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 19:47:49 +02:00
|
|
|
;;
|
|
|
|
3)
|
2019-11-07 18:49:41 +01:00
|
|
|
OPT=-DTRAVIS V=1 ROCKSDBTESTS_START=options_file_test ROCKSDBTESTS_END=write_prepared_transaction_test make -j4 check_some
|
2018-07-13 19:47:49 +02: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 19:15:58 +02:00
|
|
|
OPT=-DTRAVIS V=1 make rocksdbjava jtest
|
2018-07-13 19:47:49 +02:00
|
|
|
;;
|
|
|
|
lite_build)
|
2020-05-15 22:57:34 +02:00
|
|
|
OPT='-DTRAVIS -DROCKSDB_LITE' V=1 make -j4 all
|
2018-07-13 19:47:49 +02:00
|
|
|
;;
|
|
|
|
examples)
|
|
|
|
OPT=-DTRAVIS V=1 make -j4 static_lib && cd examples && make -j4
|
|
|
|
;;
|
|
|
|
cmake-mingw)
|
2019-06-17 19:15:58 +02:00
|
|
|
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix;
|
2019-12-13 20:33:59 +01: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 19:47:49 +02:00
|
|
|
;;
|
|
|
|
cmake*)
|
2020-04-20 22:21:34 +02: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 19:47:49 +02:00
|
|
|
;;
|
2020-05-22 20:15:44 +02:00
|
|
|
status_checked)
|
2020-05-23 15:48:40 +02:00
|
|
|
OPT=-DTRAVIS V=1 ASSERT_STATUS_CHECKED=1 make -j4 check_some
|
2020-05-22 20:15:44 +02:00
|
|
|
;;
|
2018-07-13 19:47:49 +02:00
|
|
|
esac
|
2014-05-15 01:08:02 +02:00
|
|
|
notifications:
|
2015-09-10 05:30:00 +02:00
|
|
|
email:
|
|
|
|
- leveldb@fb.com
|