Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanabc committed May 23, 2019
2 parents 2883fcd + c00e177 commit 63d5315
Show file tree
Hide file tree
Showing 160 changed files with 10,265 additions and 7,134 deletions.
35 changes: 35 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Build matrix / environment variables are explained on:
# https://www.appveyor.com/docs/appveyor-yml/
# This file can be validated on: https://ci.appveyor.com/tools/validate-yaml

version: "{build}"

environment:
matrix:
# AppVeyor currently has no custom job name feature.
# http://help.appveyor.com/discussions/questions/1623-can-i-provide-a-friendly-name-for-jobs
- JOB: Visual Studio 2017
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
CMAKE_GENERATOR: Visual Studio 15 2017

platform:
- x86
- x64

configuration:
- RelWithDebInfo
- Debug

build_script:
- git submodule update --init --recursive
- mkdir build
- cd build
- if "%platform%"=="x64" set CMAKE_GENERATOR=%CMAKE_GENERATOR% Win64
- cmake --version
- cmake .. -G "%CMAKE_GENERATOR%"
-DCMAKE_CONFIGURATION_TYPES="%CONFIGURATION%"
- cmake --build . --config "%CONFIGURATION%"
- cd ..

test_script:
- cd build && ctest --verbose --build-config "%CONFIGURATION%" && cd ..
18 changes: 18 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Run manually to reformat a file:
# clang-format -i --style=file <file>
# find . -iname '*.cc' -o -iname '*.h' -o -iname '*.h.in' | xargs clang-format -i --style=file
BasedOnStyle: Google
DerivePointerAlignment: false

# Public headers are in a different location in the internal Google repository.
# Order them so that when imported to the authoritative repository they will be
# in correct alphabetical order.
IncludeCategories:
- Regex: '^(<|"(benchmarks|db|helpers)/)'
Priority: 1
- Regex: '^"(leveldb)/'
Priority: 2
- Regex: '^(<|"(issues|port|table|third_party|util)/)'
Priority: 3
- Regex: '.*'
Priority: 4
17 changes: 8 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
build_config.mk
*.a
*.o
*.dylib*
*.so
*.so.*
*_test
db_bench
leveldbutil
# Editors.
*.sw*
.vscode
.DS_Store

# Build directory.
build/
out/
79 changes: 79 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Build matrix / environment variables are explained on:
# http://about.travis-ci.org/docs/user/build-configuration/
# This file can be validated on: http://lint.travis-ci.org/

language: cpp
dist: xenial
osx_image: xcode10.2

compiler:
- gcc
- clang
os:
- linux
- osx

env:
- BUILD_TYPE=Debug
- BUILD_TYPE=RelWithDebInfo

addons:
apt:
sources:
- llvm-toolchain-xenial-8
- ubuntu-toolchain-r-test
packages:
- clang-8
- cmake
- gcc-8
- g++-8
- libgoogle-perftools-dev
- libkyotocabinet-dev
- libsnappy-dev
- libsqlite3-dev
- ninja-build
homebrew:
packages:
- cmake
- crc32c
- gcc@8
- gperftools
- kyotocabinet
- llvm@8
- ninja
- snappy
- sqlite3
update: true

install:
# The following Homebrew packages aren't linked by default, and need to be
# prepended to the path explicitly.
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
export PATH="$(brew --prefix llvm)/bin:$PATH";
fi
# /usr/bin/gcc points to an older compiler on both Linux and macOS.
- if [ "$CXX" = "g++" ]; then export CXX="g++-8" CC="gcc-8"; fi
# /usr/bin/clang points to an older compiler on both Linux and macOS.
#
# Homebrew's llvm package doesn't ship a versioned clang++ binary, so the values
# below don't work on macOS. Fortunately, the path change above makes the
# default values (clang and clang++) resolve to the correct compiler on macOS.
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
if [ "$CXX" = "clang++" ]; then export CXX="clang++-8" CC="clang-8"; fi;
fi
- echo ${CC}
- echo ${CXX}
- ${CXX} --version
- cmake --version

before_script:
- mkdir -p build && cd build
- cmake .. -G Ninja -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- cmake --build .
- cd ..

script:
- cd build && ctest --verbose && cd ..
- "if [ -f build/db_bench ] ; then build/db_bench ; fi"
- "if [ -f build/db_bench_sqlite3 ] ; then build/db_bench_sqlite3 ; fi"
- "if [ -f build/db_bench_tree_db ] ; then build/db_bench_tree_db ; fi"
Loading

0 comments on commit 63d5315

Please sign in to comment.