Permalink
0557eaf Jan 2, 2017
@dnpwwo @ToniA @gizmocuz @maartenbreddels
103 lines (93 sloc) 3.09 KB
branches:
except:
- /^[0-9]/
language: cpp
cache:
- apt
update-alternatives:
- install /usr/bin/gcc gcc /usr/bin/gcc-4.9 50
- install /usr/bin/g++ g++ /usr/bin/g++-4.9 50
sources:
- trusty
# What to install before the build
before_install:
# Domoticz needs the full history to be able to calculate the version string
- git fetch --unshallow
# OpenZWave
- git clone https://github.com/OpenZWave/open-zwave.git
- ln -s open-zwave open-zwave-read-only
# Build matrix definition
# * Two builds
# 1. Linux x86_64
# 2. Apple OSX
matrix:
include:
# Linux x86_64
- os: linux
dist: trusty
sudo: required
compiler:
- gcc
env: TARGET_ARCHITECTURE=x86_64
addons:
apt:
sources:
- george-edison55-precise-backports # cmake
- ubuntu-toolchain-r-test
- boost-latest
packages:
- gcc-4.9
- g++-4.9
- libboost1.55-all-dev
- cmake
- cmake-data
- libsqlite3-dev
- curl
- libcurl4-openssl-dev
- libusb-dev
- zlib1g-dev
- libssl-dev
- libudev-dev
- git
- libdigest-sha-perl
- python3-dev
script:
- (cd open-zwave-read-only; make)
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_LIBRARY_PATH=open-zwave-read-only
- make
# Apple OSX
- os: osx
osx_image: xcode6.2
compiler:
- gcc
env: TARGET_ARCHITECTURE=x86_64
install:
- brew install boost|| true
- brew install boost-python|| true
- brew install libusb
- brew install libusb-compat
- brew install zlib || true
- brew install openssl
- brew link openssl --force
- brew install md5sha1sum
- brew install python3
- brew linkapps python3
- export OPENSSL_ROOT_DIR=/usr/local/opt/openssl
script:
- which python3
- cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/Headers -DPYTHON_LIBRARY=/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/libpython3.6.dylib
- make
# What to do with the build artifacts
# - Upload to the Domoticz file server
before_deploy:
- tar czf domoticz_${TRAVIS_OS_NAME}_${TARGET_ARCHITECTURE}.tgz domoticz History.txt License.txt domoticz.sh server_cert.pem updatebeta updaterelease www/ scripts/ Config/
- shasum -a 256 domoticz_${TRAVIS_OS_NAME}_${TARGET_ARCHITECTURE}.tgz > domoticz_${TRAVIS_OS_NAME}_${TARGET_ARCHITECTURE}.tgz.sha256sum
- cp appversion.h.txt version_${TRAVIS_OS_NAME}_${TARGET_ARCHITECTURE}.h
- cp History.txt history_${TRAVIS_OS_NAME}_${TARGET_ARCHITECTURE}.txt
deploy:
skip_cleanup: true
provider: script
script: curl --ftp-ssl -T "{domoticz_${TRAVIS_OS_NAME}_${TARGET_ARCHITECTURE}.tgz,domoticz_${TRAVIS_OS_NAME}_${TARGET_ARCHITECTURE}.tgz.sha256sum,version_${TRAVIS_OS_NAME}_${TARGET_ARCHITECTURE}.h,history_${TRAVIS_OS_NAME}_${TARGET_ARCHITECTURE}.txt,History.txt}" -k -u "$FTP_USER:$FTP_PASSWORD" "ftp://$FTP_HOST/beta/"
on:
branch: master
repo: domoticz/domoticz