diff --git a/.travis.yml b/.travis.yml index c60d87f..c3815c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,45 @@ language: cpp -compiler: clang matrix: include: - - os: linux - dist: trusty - env: PYTHON_BINDING=0 - - os: linux - dist: trusty - env: PYTHON_BINDING=1 - - os: osx - env: PYTHON_BINDING=0 - - os: osx - env: PYTHON_BINDING=1 + - os: linux + compiler: gcc + dist: trusty + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-5 + env: + - CC_COMPILER=gcc-5 CXX_COMPILER=g++-5 PYTHON_BINDING=0 -install: travis/install.sh + - os: linux + compiler: gcc + dist: trusty + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-5 + env: + - CC_COMPILER=gcc-5 CXX_COMPILER=g++-5 PYTHON_BINDING=1 + + - os: osx + compiler: clang + env: + - PYTHON_BINDING=0 + + - os: osx + compiler: clang + env: + - PYTHON_BINDING=1 + +install: + - travis/install.sh + - if [[ "${CXX_COMPILER}" != "" ]]; then export CXX=${CXX_COMPILER}; export CXX_FOR_BUILD=${CXX_COMPILER}; fi + - if [[ "${CC_COMPILER}" != "" ]]; then export CC=${CC_COMPILER}; export CC_FOR_BUILD=${CC_COMPILER}; fi script: travis/script.sh diff --git a/README.md b/README.md index aaed6fa..b11f5ef 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ## CI Pipelines Windows Builds: [![Build status](https://ci.appveyor.com/api/projects/status/gbblx1l790vm952c/branch/master?svg=true)](https://ci.appveyor.com/project/mlangkabel/sourcetraildb/branch/master) - +Linux and Mac Builds: [![Build Status](https://travis-ci.org/CoatiSoftware/SourcetrailDB.svg?branch=master)](https://travis-ci.org/CoatiSoftware/SourcetrailDB) ## Introduction diff --git a/travis/bundle.sh b/travis/bundle.sh index 8f13c04..b6709a0 100755 --- a/travis/bundle.sh +++ b/travis/bundle.sh @@ -6,20 +6,26 @@ VERSION=$(head -1 build/version.txt) if [[ "$PYTHON_BINDING" == "1" ]]; then PYTHON_VERSION=$(python3 -c "import sys; sys.stdout.write(str(sys.version_info.major)); sys.stdout.write(str(sys.version_info.minor));") - BUNDLE_NAME=sourcetraildb_python${PYTHON_VERSION}_${VERSION}_${TRAVIS_OS_NAME}_64bit + BUNDLE_NAME=sourcetraildb_python${PYTHON_VERSION}_${VERSION}-${TRAVIS_OS_NAME}-64bit-${TRAVIS_COMPILER} mkdir -p $BUNDLE_NAME cp build/bindings_python/sourcetraildb.py $BUNDLE_NAME cp build/bindings_python/_sourcetraildb* $BUNDLE_NAME/_sourcetraildb.so - - zip -r $BUNDLE_NAME $BUNDLE_NAME else - BUNDLE_NAME=sourcetraildb_core_${VERSION}_${TRAVIS_OS_NAME}_64bit + BUNDLE_NAME=sourcetraildb_core_${VERSION}-${TRAVIS_OS_NAME}-64bit-${TRAVIS_COMPILER} mkdir -p $BUNDLE_NAME/include - cp build/core/*.a $BUNDLE_NAME + mkdir -p $BUNDLE_NAME/lib + + cp build/core/*.a $BUNDLE_NAME/lib cp core/include/* $BUNDLE_NAME/include cp build/core/include/* $BUNDLE_NAME/include - - zip -r $BUNDLE_NAME $BUNDLE_NAME fi + +mkdir -p $BUNDLE_NAME/license +cp LICENSE.txt $BUNDLE_NAME/license/license_sourcetraildb.txt +cp external/catch/license_catch.txt $BUNDLE_NAME/license/ +cp external/cpp_sqlite/license_cpp_sqlite.txt $BUNDLE_NAME/license/ +cp external/json/license_json.txt $BUNDLE_NAME/license/ + +zip -r $BUNDLE_NAME $BUNDLE_NAME diff --git a/travis/install.sh b/travis/install.sh index acf7d3f..c33fbf8 100755 --- a/travis/install.sh +++ b/travis/install.sh @@ -1,10 +1,10 @@ #!/bin/bash if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - brew install swig - brew link --force swig + brew install swig; + brew link --force swig; elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - sudo apt-get update - sudo apt-get install -qq python-dev swig - sudo apt-get update -qq + sudo apt-get update; + sudo apt-get install -qq python-dev swig; + sudo apt-get update -qq; fi