mirror of
https://github.com/Naios/continuable.git
synced 2025-12-06 16:56:44 +08:00
change to container based travis
This commit is contained in:
parent
1454ba1593
commit
862c2bb765
44
.travis.yml
44
.travis.yml
@ -1,35 +1,43 @@
|
|||||||
|
sudo: false
|
||||||
language: cpp
|
language: cpp
|
||||||
|
cache: apt
|
||||||
|
|
||||||
|
git:
|
||||||
|
depth: 1
|
||||||
|
|
||||||
compiler:
|
compiler:
|
||||||
- gcc
|
- gcc
|
||||||
- clang
|
- clang
|
||||||
|
|
||||||
before_install:
|
addons:
|
||||||
- sudo add-apt-repository -y ppa:kalakris/cmake
|
apt:
|
||||||
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
sources:
|
||||||
- sudo add-apt-repository -y ppa:boost-latest/ppa
|
- kalakris-cmake
|
||||||
|
- boost-latest
|
||||||
# clang 3.4
|
- ubuntu-toolchain-r-test
|
||||||
- if [ "$CXX" == "clang++" ]; then sudo add-apt-repository -y ppa:h-rayflood/llvm; fi
|
packages:
|
||||||
|
- build-essential
|
||||||
- sudo apt-get -qq update
|
- libtool
|
||||||
- sudo apt-get -qq install build-essential libtool make cmake
|
- gcc-4.8
|
||||||
- sudo apt-get install -qq gcc-4.8 g++-4.8
|
- g++-4.8
|
||||||
- sudo apt-get -qq install libboost1.55-dev libboost-thread1.55-dev libboost-filesystem1.55-dev libboost-system1.55-dev libboost-program-options1.55-dev libboost-iostreams1.55-dev
|
- clang-3.4
|
||||||
|
- make
|
||||||
|
- cmake
|
||||||
|
- libboost1.55-dev
|
||||||
|
|
||||||
install:
|
install:
|
||||||
# g++4.8.1
|
# gcc 4.8
|
||||||
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8"; fi
|
- if [ "$CXX" == "g++" ]; then export CXX="g++-4.8"; fi
|
||||||
|
|
||||||
# clang 3.4
|
# clang 3.4
|
||||||
- if [ "$CXX" == "clang++" ]; then sudo apt-get install --allow-unauthenticated -qq clang-3.4; fi
|
# - if [ "$CXX" == "clang++" ]; then export CXX="clang++-3.4"; fi
|
||||||
- if [ "$CXX" == "clang++" ]; then export CXX="clang++-3.4"; fi
|
|
||||||
|
- $CXX --version
|
||||||
|
|
||||||
- mkdir bin
|
- mkdir bin
|
||||||
- cd bin
|
- cd bin
|
||||||
- cmake ../ -DCMAKE_BUILD_TYPE=Release
|
- cmake ../ -DCMAKE_BUILD_TYPE=Release
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- $CXX --version
|
|
||||||
- make -j 4
|
- make -j 4
|
||||||
- ./ContinuableTest
|
- ./ContinuableTests
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
project(Continue.cpp C CXX)
|
project(Continuable CXX)
|
||||||
cmake_minimum_required(VERSION 2.8)
|
cmake_minimum_required(VERSION 2.8)
|
||||||
|
|
||||||
include(CheckCXXCompilerFlag)
|
include(CheckCXXCompilerFlag)
|
||||||
@ -10,7 +10,6 @@ if(MSVC)
|
|||||||
message(FATAL_ERROR "You are using an unsupported version of Visual Studio "
|
message(FATAL_ERROR "You are using an unsupported version of Visual Studio "
|
||||||
"which doesn't support all required C++11 features. "
|
"which doesn't support all required C++11 features. "
|
||||||
"(Visual Studio 2013 (Version >= 1800) is required!)")
|
"(Visual Studio 2013 (Version >= 1800) is required!)")
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PLATFORM EQUAL 64)
|
if(PLATFORM EQUAL 64)
|
||||||
@ -40,9 +39,6 @@ else()
|
|||||||
|
|
||||||
# Enable full warnings
|
# Enable full warnings
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra")
|
||||||
|
|
||||||
# Find Threads
|
|
||||||
find_package (Threads)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(Boost 1.55 REQUIRED)
|
find_package(Boost 1.55 REQUIRED)
|
||||||
@ -51,16 +47,15 @@ if(Boost_FOUND)
|
|||||||
include_directories(${Boost_INCLUDE_DIRS})
|
include_directories(${Boost_INCLUDE_DIRS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file(GLOB_RECURSE LIB_SOURCES include/*.cpp include/*.hpp include/*.h)
|
file(GLOB_RECURSE LIB_SOURCES include/*.cpp include/*.hpp)
|
||||||
add_library(Continuable STATIC ${LIB_SOURCES})
|
add_library(Continuable STATIC ${LIB_SOURCES})
|
||||||
|
|
||||||
include_directories(include testing)
|
include_directories(src testing)
|
||||||
|
|
||||||
file(GLOB TEST_SOURCES *.cpp *.hpp *.h)
|
file(GLOB TEST_SOURCES *.cpp *.hpp *.h)
|
||||||
|
|
||||||
add_executable(ContinuableTest ${TEST_SOURCES})
|
add_executable(ContinuableTests ${TEST_SOURCES})
|
||||||
|
|
||||||
target_link_libraries(ContinuableTest
|
target_link_libraries(ContinuableTests
|
||||||
Continuable
|
Continuable
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user