Skip to content

Commit

Permalink
Merge pull request #3 from bigartm/master
Browse files Browse the repository at this point in the history
update
  • Loading branch information
Seriont authored May 10, 2018
2 parents 123684a + 76f137d commit 69b7c87
Show file tree
Hide file tree
Showing 356 changed files with 17,260 additions and 9,089 deletions.
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ datasets/docword.*.txt
*/ipch/*
*.vcxproj.user

# CLion garbage
.idea/

# Auto-generated files (by pdflatex)
collateral/*.aux
collateral/*.log
Expand All @@ -59,6 +62,8 @@ src/Win32/*
*.log.ERROR.*
*.batch

*\#*\#*

# Binaries
/src/artm/unittests/
/src/cpp_client/cpp_client
Expand Down Expand Up @@ -128,6 +133,7 @@ src/Win32/*
docs/_build/*

build*
cmake-build-debug*

# protobuf generated files
/python/artm/wrapper/messages_pb2.py
Expand All @@ -153,3 +159,14 @@ src/artm/messages.pb.h
.ycm_extra_conf.py

src/artm/version.h

# MAC OS temp files
*.DS_Store

# bigartm logs
*bigartm.ERROR
*bigartm.INFO
*bigartm.WARNING

# test data
kos/
44 changes: 30 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,55 @@ language:
# Currently Travis doesn't support multiple values for language variable
# - cpp

# compiler:
#compiler:
# - gcc

# not sure whether the following configuration will be available
# with non-C/C++ language (e.g python)
#cache: ccache

cache:
directories:
- $HOME/.ccache

python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"

addons:
apt:
sources:
- boost-latest # for boost 1.55
- ubuntu-toolchain-r-test # for g++-4.9
- george-edison55-precise-backports # for cmake 3
packages:
- cmake
- cmake-data
- libboost1.55-all-dev
- g++-4.9
- libboost1.54-all-dev

env:
- COMPILER=g++-4.9
global:
# variables for caching
- CCACHE_DIR=$HOME/.ccache
- CCACHE_COMPILERCHECK=content
- CCACHE_COMPRESS=true
- CCACHE_NODISABLE=true
- CCACHE_MAXSIZE=500M
matrix:
- GCC_VER=4.8

before_install:
# we need latest pip to work with only-binary option
- pip install -U pip
- pip install -U pytest pep8
- pip install -U numpy pandas tqdm --only-binary numpy pandas
- pip install protobuf==3.0.0
- pip install -U pytest pep8 wheel
- pip install -U numpy scipy pandas tqdm --only-binary numpy,scipy,pandas
- pip install -U protobuf
# configure ccache
# code from https://github.com/urho3d/Urho3D/blob/master/.travis.yml
- export PATH=$(whereis -b ccache |grep -o '\S*lib\S*'):$PATH
- export CXX=g++-$GCC_VER CC=gcc-$GCC_VER
- for compiler in gcc g++; do ln -s $(which ccache) $HOME/$compiler-$GCC_VER; done && export PATH=$HOME:$PATH

install:
- if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then ./codestyle_checks.sh; fi
- mkdir build
- pushd build && export CXX=$COMPILER && cmake -DBUILD_BIGARTM_CLI_STATIC=OFF .. && make -j2 && file ./bin/bigartm && popd
- pushd build && cmake .. && make -j2 && file ./bin/bigartm && popd
- pushd python && python setup.py install && popd

before_script:
Expand Down
35 changes: 32 additions & 3 deletions 3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,36 @@ else (MSVC)
add_definitions("-w")
endif (MSVC)

add_subdirectory(gflags)
add_subdirectory(glog)
# Disable tests and install rules for glog
# Enabled install rules will cause configuration failure
set(BUILD_TESTING "OFF" CACHE "" INTERNAL)
set(CMAKE_SKIP_INSTALL_RULES TRUE)

add_subdirectory(protobuf-3.0.0/cmake)
add_subdirectory(gflags EXCLUDE_FROM_ALL)

# Do not call find_package for gflags and pretend it exists
set(WITH_GFLAGS "OFF" CACHE "" INTERNAL)
set(HAVE_LIB_GFLAGS "ON")
set(gflags_NAMESPACE "gflags")
set(gflags_FOUND "ON")

# Make glog link to gflags target directly, cmake will handle the rest
set(gflags_LIBRARIES gflags)

add_subdirectory(glog EXCLUDE_FROM_ALL)

# We need to ask CMake to compile gflags before compiling glog, so that
# ${gflags_LIBRARIES} actually exists
add_dependencies(glog gflags)

set(CMAKE_SKIP_INSTALL_RULES FALSE)

set(CMAKE_INSTALL_INCLUDEDIR include/artm)
add_subdirectory(protobuf-3.0.0/cmake EXCLUDE_FROM_ALL)
set(PROTOBUF_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/protobuf-3.0.0/cmake CACHE "" INTERNAL)

# This is a hack. We build libprotobuf (a STATIC library) with __dllexport
# so that when we later link it into SHARED library artm.dll all protobuf
# symbols would get exported and cause no linking errors when using the
# library
target_compile_definitions(libprotobuf PRIVATE PROTOBUF_USE_DLLS LIBPROTOBUF_EXPORTS)
10 changes: 10 additions & 0 deletions 3rdparty/gflags/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/xcode/
/build/
/builds/
/build-*/
.DS_Store
CMakeCache.txt
DartConfiguration.tcl
Expand All @@ -12,3 +16,9 @@ CMakeFiles/
/test/gflags_unittest_main.cc
/test/gflags_unittest-main.cc
/packages/
CMakeLists.txt.user
/bazel-bin
/bazel-genfiles
/bazel-gflags
/bazel-out
/bazel-testlogs
Loading

0 comments on commit 69b7c87

Please sign in to comment.