-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 195d380
Showing
183 changed files
with
37,983 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# Copyright 2021 The LevelDB Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. See the AUTHORS file for names of contributors. | ||
|
||
name: ci | ||
on: [push, pull_request] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build-and-test: | ||
name: >- | ||
CI | ||
${{ matrix.os }} | ||
${{ matrix.compiler }} | ||
${{ matrix.optimized && 'release' || 'debug' }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
compiler: [clang, gcc, msvc] | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
optimized: [true, false] | ||
exclude: | ||
# MSVC only works on Windows. | ||
- os: ubuntu-latest | ||
compiler: msvc | ||
- os: macos-latest | ||
compiler: msvc | ||
# Not testing with GCC on macOS. | ||
- os: macos-latest | ||
compiler: gcc | ||
# Only testing with MSVC on Windows. | ||
- os: windows-latest | ||
compiler: clang | ||
- os: windows-latest | ||
compiler: gcc | ||
include: | ||
- compiler: clang | ||
CC: clang | ||
CXX: clang++ | ||
- compiler: gcc | ||
CC: gcc | ||
CXX: g++ | ||
- compiler: msvc | ||
CC: | ||
CXX: | ||
|
||
env: | ||
CMAKE_BUILD_DIR: ${{ github.workspace }}/build | ||
CMAKE_BUILD_TYPE: ${{ matrix.optimized && 'RelWithDebInfo' || 'Debug' }} | ||
CC: ${{ matrix.CC }} | ||
CXX: ${{ matrix.CXX }} | ||
BINARY_SUFFIX: ${{ startsWith(matrix.os, 'windows') && '.exe' || '' }} | ||
BINARY_PATH: >- | ||
${{ format( | ||
startsWith(matrix.os, 'windows') && '{0}\build\{1}\' || '{0}/build/', | ||
github.workspace, | ||
matrix.optimized && 'RelWithDebInfo' || 'Debug') }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Install dependencies on Linux | ||
if: ${{ runner.os == 'Linux' }} | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libkyotocabinet-dev libsnappy-dev libsqlite3-dev libnuma-dev | ||
- name: Generate build config | ||
run: >- | ||
cmake -S "${{ github.workspace }}" -B "${{ env.CMAKE_BUILD_DIR }}" | ||
-DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} | ||
-DCMAKE_INSTALL_PREFIX=${{ runner.temp }}/install_test/ | ||
- name: Build | ||
run: >- | ||
cmake --build "${{ env.CMAKE_BUILD_DIR }}" | ||
--config "${{ env.CMAKE_BUILD_TYPE }}" | ||
- name: Run Tests | ||
working-directory: ${{ github.workspace }}/build | ||
run: ctest -C "${{ env.CMAKE_BUILD_TYPE }}" --verbose | ||
- name: Run LevelDB Benchmarks | ||
run: ${{ env.BINARY_PATH }}db_bench${{ env.BINARY_SUFFIX }} | ||
- name: Run SQLite Benchmarks | ||
if: ${{ runner.os != 'Windows' }} | ||
run: ${{ env.BINARY_PATH }}db_bench_sqlite3${{ env.BINARY_SUFFIX }} | ||
- name: Run Kyoto Cabinet Benchmarks | ||
if: ${{ runner.os == 'Linux' && matrix.compiler == 'clang' }} | ||
run: ${{ env.BINARY_PATH }}db_bench_tree_db${{ env.BINARY_SUFFIX }} | ||
- name: Test CMake installation | ||
run: cmake --build "${{ env.CMAKE_BUILD_DIR }}" --target install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Editors. | ||
*.sw* | ||
.vscode | ||
.DS_Store | ||
|
||
# Build directory. | ||
build/ | ||
out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[submodule "third_party/googletest"] | ||
path = third_party/googletest | ||
url = https://github.com/google/googletest.git | ||
[submodule "third_party/benchmark"] | ||
path = third_party/benchmark | ||
url = https://github.com/google/benchmark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Names should be added to this file like so: | ||
# Name or Organization <email address> | ||
|
||
Google Inc. | ||
|
||
# Initial version authors: | ||
Jeffrey Dean <[email protected]> | ||
Sanjay Ghemawat <[email protected]> | ||
|
||
# Partial list of contributors: | ||
Kevin Regan <[email protected]> | ||
Johan Bilien <[email protected]> |
Oops, something went wrong.