diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..92da83fa5 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,25 @@ +language: cpp + +os: +- linux + +env: + matrix: + - BUILD_TYPE=Debug BIICODE=false + - BUILD_TYPE=Release BIICODE=false + - BUILD_TYPE=Release BIICODE=true + - BUILD_TYPE=Debug BIICODE=true + global: + - GCC_VERSION="4.9" + +before_install: +- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test +- sudo apt-get update -qq +- sudo apt-get install -qq g++-$GCC_VERSION +- sudo apt-get install -qq gcc-$GCC_VERSION +- sudo ln -s -v -f $(which g++-$GCC_VERSION) /usr/bin/g++ +- sudo ln -s -v -f $(which gcc-$GCC_VERSION) /usr/bin/gcc + +script: +- if [ "$BIICODE" == "false" ]; then cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE . && make && make test; fi +- if [ "$BIICODE" == "true" ]; then ./biicode/support/bii-travis.sh $BUILD_TYPE; fi diff --git a/CMakeLists.txt b/CMakeLists.txt index 183263906..617f67b05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,10 +85,9 @@ if(FLATBUFFERS_CODE_COVERAGE) endif() if(BIICODE) - # Execute biicode building - include(CMake/biicode.cmake) + include(biicode/cmake/biicode.cmake) return() -endif(BIICODE) +endif() include_directories(include) diff --git a/biicode.conf b/biicode.conf index f619c3372..b205168be 100644 --- a/biicode.conf +++ b/biicode.conf @@ -1,5 +1,7 @@ # Biicode configuration file - [paths] - # Local directories to look for headers (within block) include +[mains] + !android/* +[tests] + tests/* diff --git a/biicode/README.md b/biicode/README.md new file mode 100644 index 000000000..8b0a18560 --- /dev/null +++ b/biicode/README.md @@ -0,0 +1,21 @@ +Biicode C/C++ dependency manager +================================= + +[![Build Status](https://webapi.biicode.com/v1/badges/fenix/fenix/flatbuffers/master)](https://www.biicode.com/fenix/flatbuffers) + +New with biicode? Check the [Getting Started Guide](http://docs.biicode.com/c++/gettingstarted.html). + +How to build it? +------------------ +Building it is too easy: + + $ git clone git@github.com:google/flatbuffers.git + $ cd flatbuffers + $ bii init -L && bii build + $ ./bin/any_executable + +Or run its tests: + + $ bii test + +You can check [the examples/flatbuffers block](https://www.biicode.com/examples/flatbuffers). \ No newline at end of file diff --git a/CMake/biicode.cmake b/biicode/cmake/biicode.cmake similarity index 75% rename from CMake/biicode.cmake rename to biicode/cmake/biicode.cmake index 225b669ac..85b15ed92 100644 --- a/CMake/biicode.cmake +++ b/biicode/cmake/biicode.cmake @@ -1,6 +1,4 @@ -# Initializes block variables -INIT_BIICODE_BLOCK() - +set(BII_TESTS_WORKING_DIR ${CMAKE_CURRENT_SOURCE_DIR}) # Copying data files to project/bin folder if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/samples") file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/samples/monster.fbs" @@ -14,9 +12,7 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tests") "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}") endif() -# Actually create targets: EXEcutables and libraries. ADD_BIICODE_TARGETS() string(REPLACE " " ";" REPLACED_FLAGS ${CMAKE_CXX_FLAGS}) -target_compile_options(${BII_BLOCK_TARGET} INTERFACE ${REPLACED_FLAGS}) -target_include_directories(${BII_BLOCK_TARGET} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include) \ No newline at end of file +target_compile_options(${BII_BLOCK_TARGET} INTERFACE ${REPLACED_FLAGS}) \ No newline at end of file diff --git a/biicode/support/bii-travis.sh b/biicode/support/bii-travis.sh new file mode 100755 index 000000000..0f5d2f960 --- /dev/null +++ b/biicode/support/bii-travis.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +sudo apt-get update -qq +sudo apt-get install libglu1-mesa-dev xorg-dev +wget http://www.biicode.com/downloads/latest/ubuntu64 +mv ubuntu64 bii-ubuntu64.deb +(sudo dpkg -i bii-ubuntu64.deb) && sudo apt-get -f install +rm bii-ubuntu64.deb +wget https://s3.amazonaws.com/biibinaries/thirdparty/cmake-3.0.2-Linux-64.tar.gz +tar -xzf cmake-3.0.2-Linux-64.tar.gz +sudo cp -fR cmake-3.0.2-Linux-64/* /usr +rm -rf cmake-3.0.2-Linux-64 +rm cmake-3.0.2-Linux-64.tar.gz + +cmake --version +bii init -l && bii configure -DCMAKE_BUILD_TYPE=$1 && bii test \ No newline at end of file diff --git a/readme.md b/readme.md index 0ceaee9fa..40430e20c 100755 --- a/readme.md +++ b/readme.md @@ -2,6 +2,12 @@ FlatBuffers Version 1.1.0 # Welcome to FlatBuffers! +## Build Status + +- Travis: [![Build Status](https://travis-ci.org/google/flatbuffers.svg?branch=master)](https://travis-ci.org/google/flatbuffers) + +---- + FlatBuffers is a serialization library for games and other memory constrained apps. Go to our [landing page][] to browse our documentation.