未验证 提交 f1be2fa0 编写于 作者: Y Yan Chunwei 提交者: GitHub

Merge pull request #49 from ChunweiYan/feature/mv_backend_out

......@@ -3,7 +3,6 @@ cache:
directories:
- $HOME/.ccache
- $HOME/.cache/pip
- $TRAVIS_BUILD_DIR/build/third_party
sudo: required
dist: trusty
os:
......@@ -20,6 +19,9 @@ addons:
- python-wheel
- clang-format-3.8
- ccache
script:
/bin/bash ./tests.sh
notifications:
email:
on_success: change
......
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.2)
project(VisualDL)
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif(CCACHE_FOUND)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "-fPIC")
......@@ -25,16 +31,16 @@ include_directories(${PROJECT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${PROJECT_SOURCE_DIR}/thirdparty/local/include)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/visualdl/backend/storage)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/visualdl/backend/logic)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/visualdl/storage)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/visualdl/logic)
add_executable(vl_test
${PROJECT_SOURCE_DIR}/visualdl/backend/test.cc
${PROJECT_SOURCE_DIR}/visualdl/backend/storage/storage_test.cc
${PROJECT_SOURCE_DIR}/visualdl/backend/utils/test_concurrency.cc
${PROJECT_SOURCE_DIR}/visualdl/backend/logic/im_test.cc
${PROJECT_SOURCE_DIR}/visualdl/backend/utils/concurrency.h
${PROJECT_SOURCE_DIR}/visualdl/backend/utils/filesystem.h
${PROJECT_SOURCE_DIR}/visualdl/test.cc
${PROJECT_SOURCE_DIR}/visualdl/storage/storage_test.cc
${PROJECT_SOURCE_DIR}/visualdl/utils/test_concurrency.cc
${PROJECT_SOURCE_DIR}/visualdl/logic/im_test.cc
${PROJECT_SOURCE_DIR}/visualdl/utils/concurrency.h
${PROJECT_SOURCE_DIR}/visualdl/utils/filesystem.h
)
target_link_libraries(vl_test storage im gtest glog protobuf gflags pthread)
......
#!/bin/bash
set -ex
sudo pip install numpy
#sudo apt-get install --only-upgrade cmake -y
mkdir -p build
cd build
cmake ..
make
make test
#if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash ./travis/run_on_pull_requests; fi
#if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./travis/run_on_non_pull_requests; fi
add_library(sdk ${PROJECT_SOURCE_DIR}/visualdl/backend/logic/sdk.cc)
add_library(im ${PROJECT_SOURCE_DIR}/visualdl/backend/logic/im.cc)
add_library(sdk ${PROJECT_SOURCE_DIR}/visualdl/logic/sdk.cc)
add_library(im ${PROJECT_SOURCE_DIR}/visualdl/logic/im.cc)
add_dependencies(im storage_proto)
add_dependencies(sdk storage_proto)
## pybind
add_library(core SHARED ${PROJECT_SOURCE_DIR}/visualdl/backend/logic/pybind.cc)
add_library(core SHARED ${PROJECT_SOURCE_DIR}/visualdl/logic/pybind.cc)
add_dependencies(core pybind python im storage sdk protobuf glog)
target_link_libraries(core PRIVATE pybind python im storage sdk protobuf glog)
#include <glog/logging.h>
#include <ctime>
#include "visualdl/backend/logic/im.h"
#include "visualdl/logic/im.h"
namespace visualdl {
......
#ifndef VISUALDL_BACKEND_LOGIC_IM_H
#define VISUALDL_BACKEND_LOGIC_IM_H
#ifndef VISUALDL_LOGIC_IM_H
#define VISUALDL_LOGIC_IM_H
#include <glog/logging.h>
#include <visualdl/backend/utils/concurrency.h>
#include <memory>
#include <string>
#include "visualdl/backend/storage/storage.h"
#include "visualdl/storage/storage.h"
#include "visualdl/utils/concurrency.h"
namespace visualdl {
......
#include "visualdl/backend/logic/im.h"
#include "visualdl/logic/im.h"
#include "gtest/gtest.h"
......
......@@ -2,7 +2,7 @@
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include "visualdl/backend/logic/sdk.h"
#include "visualdl/logic/sdk.h"
namespace py = pybind11;
namespace vs = visualdl;
......
#include "visualdl/backend/logic/sdk.h"
#include "visualdl/logic/sdk.h"
#include <google/protobuf/text_format.h>
namespace visualdl {
......
#ifndef VISUALDL_BACKEND_LOGIC_SDK_H
#define VISUALDL_BACKEND_LOGIC_SDK_H
#ifndef VISUALDL_LOGIC_SDK_H
#define VISUALDL_LOGIC_SDK_H
#include <glog/logging.h>
#include <time.h>
#include <map>
#include "visualdl/backend/logic/im.h"
#include "visualdl/logic/im.h"
namespace visualdl {
......
#include <glog/logging.h>
#include <visualdl/backend/utils/concurrency.h>
#include <fstream>
#include "visualdl/backend/storage/storage.h"
#include "visualdl/backend/utils/filesystem.h"
#include "visualdl/storage/storage.h"
#include "visualdl/utils/concurrency.h"
#include "visualdl/utils/filesystem.h"
namespace visualdl {
......
......@@ -5,7 +5,7 @@
#include <map>
#include <string>
#include "visualdl/backend/storage/storage.pb.h"
#include "visualdl/storage/storage.pb.h"
namespace visualdl {
......
#include "visualdl/backend/storage/storage.h"
#include "visualdl/storage/storage.h"
#include <glog/logging.h>
#include <gtest/gtest.h>
......
#ifndef VISUALDL_BACKEND_UTILS_CONCURRENCY_H
#define VISUALDL_BACKEND_UTILS_CONCURRENCY_H
#ifndef VISUALDL_UTILS_CONCURRENCY_H
#define VISUALDL_UTILS_CONCURRENCY_H
#include <glog/logging.h>
#include <chrono>
......
#ifndef VISUALDL_BACKEND_UTILS_FILESYSTEM_H
#define VISUALDL_BACKEND_UTILS_FILESYSTEM_H
#ifndef VISUALDL_UTILS_FILESYSTEM_H
#define VISUALDL_UTILS_FILESYSTEM_H
#include <google/protobuf/text_format.h>
#include <sys/stat.h>
......
#ifndef VISUALDL_BACKEND_UTILS_LOG_H
#define VISUALDL_BACKEND_UTILS_LOG_H
#ifndef VISUALDL_UTILS_LOG_H
#define VISUALDL_UTILS_LOG_H
#include <stdexcept>
namespace visualdl {
namespace log {
......
#include "visualdl/backend/utils/concurrency.h"
#include "visualdl/utils/concurrency.h"
#include <glog/logging.h>
#include <gtest/gtest.h>
......@@ -16,4 +16,4 @@ TEST(concurrency, test) {
cc::PeriodExector::Global()(std::move(task), 200);
}
} // namespace visualdl
\ No newline at end of file
} // namespace visualdl
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册