From 066e3b874f9437130cdbfce3cb8cb587a987145f Mon Sep 17 00:00:00 2001 From: Roman Proskuryakov Date: Thu, 22 Jun 2017 20:40:05 +0300 Subject: [PATCH] Added .travis.yml --- .travis.yml | 41 +++++++++++++++++++++++++++++++++++++++++ CMakeLists.txt | 8 +++++++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..b37999795 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,41 @@ +language: c++ +compiler: gcc + +os: linux +dist: trusty +sudo: false + +notifications: + email: false + +addons: + apt: + sources: + - sourceline: 'deb http://pl.archive.ubuntu.com/ubuntu xenial main universe' + - sourceline: 'deb http://pl.archive.ubuntu.com/ubuntu xenial main' + packages: + - g++ + - libsdl2-dev + artifacts: + paths: + - $(ls *.gz | tr "\n" :) + +matrix: + include: + - env: + - BUILD_TYPE=Release + - ENABLE_UI=1 + - env: + - BUILD_TYPE=Debug + - ENABLE_UI=1 + +before_script: + - pushd $HOME + - git clone https://github.com/openbw/openbw + - popd + - mkdir build + - cd build + - cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DOPENBW_DIR=$HOME/openbw -DOPENBW_ENABLE_UI=$ENABLE_UI + +script: + - cmake --build . -- -j4 package diff --git a/CMakeLists.txt b/CMakeLists.txt index c19f120c6..6c25f2645 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.1) -project(BWAPI) +project(BWAPI VERSION 4.1.12) set(CMAKE_DISABLE_SOURCE_CHANGES ON) set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) @@ -18,3 +18,9 @@ if (MSVC) endif() add_subdirectory(bwapi) + +# Package + +set(CPACK_GENERATOR "TGZ") +set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) +include(CPack)