Skip to content

Commit

Permalink
Update to leveldb upstream using subtree merge
Browse files Browse the repository at this point in the history
  • Loading branch information
laanwj committed Jan 28, 2020
2 parents 2755b2b + 6648082 commit 20a6bab
Show file tree
Hide file tree
Showing 156 changed files with 8,569 additions and 7,863 deletions.
35 changes: 35 additions & 0 deletions src/leveldb/.appveyor.yml
@@ -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 src/leveldb/.clang-format
@@ -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
21 changes: 8 additions & 13 deletions src/leveldb/.gitignore
@@ -1,13 +1,8 @@
build_config.mk
*.a
*.o
*.dylib*
*.so
*.so.*
*_test
db_bench
leveldbutil
Release
Debug
Benchmark
vs2010.*
# Editors.
*.sw*
.vscode
.DS_Store

# Build directory.
build/
out/
81 changes: 75 additions & 6 deletions src/leveldb/.travis.yml
@@ -1,13 +1,82 @@
# 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: bionic
osx_image: xcode10.3

compiler:
- clang
- gcc
- clang
os:
- linux
- osx
sudo: false
before_install:
- echo $LANG
- echo $LC_ALL

env:
- BUILD_TYPE=Debug
- BUILD_TYPE=RelWithDebInfo

addons:
apt:
sources:
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages:
- clang-9
- cmake
- gcc-9
- g++-9
- libgoogle-perftools-dev
- libkyotocabinet-dev
- libsnappy-dev
- libsqlite3-dev
- ninja-build
homebrew:
packages:
- cmake
- crc32c
- gcc@9
- gperftools
- kyoto-cabinet
- llvm@9
- 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++-9" CC="gcc-9"; 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++-9" CC="clang-9"; 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
-DCMAKE_INSTALL_PREFIX=$HOME/.local
- cmake --build .
- cd ..

script:
- make -j 4 check
- 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"
- cd build && cmake --build . --target install

0 comments on commit 20a6bab

Please sign in to comment.