Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
titan
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangzongwu
titan
Commits
0e700ad1
Commit
0e700ad1
authored
May 06, 2019
by
Yi Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
travis config
Signed-off-by:
Yi Wu
<
yiwu@pingcap.com
>
parent
61563ee8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
10 deletions
+49
-10
.travis.yml
.travis.yml
+33
-0
CMakeLists.txt
CMakeLists.txt
+16
-10
No files found.
.travis.yml
0 → 100644
View file @
0e700ad1
language
:
cpp
os
:
-
linux
addons
:
apt
:
sources
:
-
ubuntu-toolchain-r-test
packages
:
-
g++-8
-
libgflags-dev
matrix
:
include
:
-
compiler
:
clang
-
compiler
:
clang
env
:
SANITIZER="-DWITH_ASAN=ON"
-
compiler
:
clang
env
:
SANITIZER="-DWITH_TSAN=ON"
-
compiler
:
clang
env
:
SANITIZER="-DWITH_UBSAN=ON"
-
env
:
COMPILER=gcc8
install
:
-
git clone --depth=1 --branch=tikv-3.0 https://github.com/pingcap/rocksdb.git
-
if [ "${COMPILER}" == gcc8 ]; then
CC=gcc-8 && CXX=g++-8;
fi
script
:
-
${CXX} --version
-
cmake . -DROCKSDB_DIR=./rocksdb -DTRAVIS=ON ${SANITIZER} && make -j4 && ctest -R titan
CMakeLists.txt
View file @
0e700ad1
...
@@ -41,6 +41,7 @@ add_library(titan STATIC ${SOURCES})
...
@@ -41,6 +41,7 @@ add_library(titan STATIC ${SOURCES})
option
(
WITH_TITAN_TESTS
"Build with tests."
ON
)
option
(
WITH_TITAN_TESTS
"Build with tests."
ON
)
option
(
WITH_TITAN_TOOLS
"Build with tools."
ON
)
option
(
WITH_TITAN_TOOLS
"Build with tools."
ON
)
option
(
TRAVIS
"Building in Travis."
OFF
)
if
(
CMAKE_BUILD_TYPE STREQUAL
"Release"
)
if
(
CMAKE_BUILD_TYPE STREQUAL
"Release"
)
set
(
WITH_TITAN_TESTS OFF
)
set
(
WITH_TITAN_TESTS OFF
)
...
@@ -49,12 +50,13 @@ endif()
...
@@ -49,12 +50,13 @@ endif()
if
(
WITH_TITAN_TESTS OR WITH_TITAN_TOOLS
)
if
(
WITH_TITAN_TESTS OR WITH_TITAN_TOOLS
)
add_subdirectory
(
${
ROCKSDB_DIR
}
rocksdb EXCLUDE_FROM_ALL
)
add_subdirectory
(
${
ROCKSDB_DIR
}
rocksdb EXCLUDE_FROM_ALL
)
# -latomic is needed when building titandb_stress using clang.
link_libraries
(
atomic
)
endif
()
endif
()
if
(
WITH_TITAN_TESTS
)
if
(
WITH_TITAN_TESTS
)
include
(
CTest
)
include
(
CTest
)
find_package
(
Threads REQUIRED
)
include_directories
(
SYSTEM
${
ROCKSDB_DIR
}
/third-party/gtest-1.7.0/fused-src
)
find_package
(
GTest REQUIRED
)
set
(
TESTS
set
(
TESTS
blob_file_iterator_test
blob_file_iterator_test
blob_file_size_collector_test
blob_file_size_collector_test
...
@@ -69,27 +71,31 @@ if (WITH_TITAN_TESTS)
...
@@ -69,27 +71,31 @@ if (WITH_TITAN_TESTS)
set
(
TEST_LIBS
set
(
TEST_LIBS
titan
titan
rocksdb
rocksdb
testharness
testutillib
testutillib
Threads::Threads
gtest
)
GTest::GTest
)
foreach
(
test
${
TESTS
}
)
foreach
(
test
${
TESTS
}
)
add_executable
(
titan_
${
test
}
src/
${
test
}
.cc
)
add_executable
(
titan_
${
test
}
src/
${
test
}
.cc $<TARGET_OBJECTS:testharness>
)
target_include_directories
(
titan_
${
test
}
PRIVATE
${
GTEST_INCLUDE_DIRS
}
)
target_link_libraries
(
titan_
${
test
}
${
TEST_LIBS
}
)
target_link_libraries
(
titan_
${
test
}
${
TEST_LIBS
}
)
add_test
(
titan_
${
test
}
titan_
${
test
}
)
add_test
(
titan_
${
test
}
titan_
${
test
}
)
endforeach
(
test
${
TESTS
}
)
endforeach
(
test
${
TESTS
}
)
endif
()
endif
()
if
(
WITH_TITAN_TOOLS
)
if
(
WITH_TITAN_TOOLS
)
find_package
(
gflags REQUIRED
)
add_definitions
(
-DGFLAGS
)
set
(
TOOLS_LIBS
set
(
TOOLS_LIBS
titan
titan
rocksdb
)
rocksdb
)
if
(
NOT TRAVIS
)
find_package
(
gflags REQUIRED
)
else
()
# Hack: On Travis (with Ubuntu xenial or before), libgflags-dev package doesn't come with
# gflags-config.cmake, so find_package will fail. Hard-code gflag path for now.
set
(
gflags_INCLUDE_DIR
"/usr/include/gflags"
)
list
(
APPEND TOOLS_LIBS
"/usr/lib/x86_64-linux-gnu/libgflags.a"
)
endif
()
add_definitions
(
-DGFLAGS
)
add_executable
(
titandb_stress tools/titandb_stress.cc
)
add_executable
(
titandb_stress tools/titandb_stress.cc
)
target_include_directories
(
titandb_stress PRIVATE
${
gflags_INCLUDE_DIR
}
)
target_include_directories
(
titandb_stress PRIVATE
${
gflags_INCLUDE_DIR
}
)
target_link_libraries
(
titandb_stress
${
TOOLS_LIBS
}
)
target_link_libraries
(
titandb_stress
${
TOOLS_LIBS
}
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment