Skip to content

Commit cb40b4d

Browse files
ToniAToniA
authored andcommitted
Refactor .travis.yml, add stub for FTPS deployment
1 parent 9b26d80 commit cb40b4d

File tree

1 file changed

+80
-46
lines changed

1 file changed

+80
-46
lines changed

.travis.yml

Lines changed: 80 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -4,62 +4,96 @@ branches:
44

55
language: cpp
66

7-
compiler:
8-
- gcc
9-
10-
os:
11-
- linux
12-
- osx
13-
147
cache:
158
- apt
169

17-
addons:
18-
apt:
19-
sources:
20-
- ubuntu-toolchain-r-test
21-
- boost-latest
22-
packages:
23-
- gcc-4.9
24-
- g++-4.9
25-
- libboost1.55-all-dev
26-
- cmake
27-
- libsqlite3-dev
28-
- curl
29-
- libcurl4-openssl-dev
30-
- libusb-dev
31-
- zlib1g-dev
32-
- libssl-dev
33-
- libudev-dev
34-
- git
35-
on:
36-
os: linux
37-
3810
update-alternatives:
3911
- install /usr/bin/gcc gcc /usr/bin/gcc-4.9 50
4012
- install /usr/bin/g++ g++ /usr/bin/g++-4.9 50
4113

4214
sources:
4315
- trusty
4416

17+
18+
# Domoticz ftp server account & encrypted password
19+
env:
20+
global:
21+
- "FTP_HOST=62.84.241.110"
22+
- "FTP_USER=uploads@domoticz.com"
23+
- "FTP_PASSWORD=password"
24+
25+
26+
# What to install before the build
4527
before_install:
46-
- if [ ${TRAVIS_OS_NAME} == "linux" ]; then git clone https://github.com/OpenZWave/open-zwave.git; fi
47-
- if [ ${TRAVIS_OS_NAME} == "linux" ]; then ln -s open-zwave open-zwave-read-only; fi
48-
- if [ ${TRAVIS_OS_NAME} == "osx" ]; then brew install cmake; fi
49-
- if [ ${TRAVIS_OS_NAME} == "osx" ]; then brew install boost || true; fi
50-
- if [ ${TRAVIS_OS_NAME} == "osx" ]; then brew install libusb; fi
51-
- if [ ${TRAVIS_OS_NAME} == "osx" ]; then brew install libusb-compat; fi
52-
- if [ ${TRAVIS_OS_NAME} == "osx" ]; then brew install zlib || true; fi
53-
- if [ ${TRAVIS_OS_NAME} == "osx" ]; then brew install openssl; fi
54-
- if [ ${TRAVIS_OS_NAME} == "osx" ]; then brew link openssl --force; fi
55-
- if [ ${TRAVIS_OS_NAME} == "osx" ]; then export LDFLAGS=-L/usr/local/opt/openssl/lib; fi
56-
- if [ ${TRAVIS_OS_NAME} == "osx" ]; then export CPPFLAGS=-I/usr/local/opt/openssl/include; fi
28+
# Domoticz needs the full history to be able to calculate the version string
5729
- git fetch --unshallow
30+
# OpenZWave
31+
- git clone https://github.com/OpenZWave/open-zwave.git
32+
- ln -s open-zwave open-zwave-read-only
33+
34+
35+
# Build matrix definition
36+
# * Two builds
37+
# 1. Linux amd64
38+
# 2. Apple OSX
39+
matrix:
40+
include:
41+
# Linux amd64
42+
- os: linux
43+
compiler:
44+
- gcc
45+
env: TARGET_ARCHITECTURE=amd64
46+
addons:
47+
apt:
48+
sources:
49+
- ubuntu-toolchain-r-test
50+
- boost-latest
51+
packages:
52+
- gcc-4.9
53+
- g++-4.9
54+
- libboost1.55-all-dev
55+
- cmake
56+
- libsqlite3-dev
57+
- curl
58+
- libcurl4-openssl-dev
59+
- libusb-dev
60+
- zlib1g-dev
61+
- libssl-dev
62+
- libudev-dev
63+
- git
64+
script:
65+
- (cd open-zwave-read-only; make)
66+
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_LIBRARY_PATH=open-zwave-read-only
67+
- make
68+
before_deploy:
69+
- tar czf domoticz_${TRAVIS_OS_NAME}_x86_64_latest.tgz domoticz History.txt License.txt domoticz.sh server_cert.pem updatebeta updaterelease --exclude .svn www/ scripts/ Config/
70+
# Apple OSX
71+
- os: osx
72+
compiler:
73+
- gcc
74+
env: TARGET_ARCHITECTURE=amd64
75+
install:
76+
- brew install cmake
77+
- brew install boost|| true
78+
- brew install libusb
79+
- brew install libusb-compat
80+
- brew install zlib || true
81+
- brew install openssl
82+
- brew link openssl --force
83+
- export LDFLAGS=-L/usr/local/opt/openssl/lib
84+
- export CPPFLAGS=-I/usr/local/opt/openssl/include
85+
script:
86+
- cmake -DCMAKE_BUILD_TYPE=Release
87+
- make
88+
before_deploy:
89+
- tar czf domoticz_${TRAVIS_OS_NAME}_x86_64_latest.tgz domoticz History.txt License.txt domoticz.sh server_cert.pem updatebeta updaterelease
90+
5891

59-
script:
60-
- if [ ${TRAVIS_OS_NAME} == "linux" ]; then (cd open-zwave-read-only; make); fi
61-
- if [ ${TRAVIS_OS_NAME} == "linux" ]; then cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_LIBRARY_PATH=open-zwave-read-only; fi
62-
- if [ ${TRAVIS_OS_NAME} == "osx" ]; then cmake -DCMAKE_BUILD_TYPE=Release; fi
63-
- make
64-
- if [ ${TRAVIS_OS_NAME} == "linux" ]; then tar czf domoticz_${TRAVIS_OS_NAME}_x86_64.tgz domoticz History.txt License.txt domoticz.sh server_cert.pem updatebeta updaterelease --exclude .svn www/ scripts/ Config/; fi
65-
- if [ ${TRAVIS_OS_NAME} == "osx" ]; then tar czf domoticz_${TRAVIS_OS_NAME}_x86_64.tgz domoticz History.txt License.txt domoticz.sh server_cert.pem updatebeta updaterelease; fi
92+
# What to do with the build artifacts
93+
# - Upload to the Domoticz file server
94+
deploy:
95+
skip_cleanup: true
96+
provider: script
97+
script: echo curl --ftp-ssl -T domoticz_${TRAVIS_OS_NAME}_x86_64_latest.tgz -k -u "$FTP_USER:$FTP_PASSWORD" "ftp://$FTP_HOST"
98+
on:
99+
branch: master

0 commit comments

Comments
 (0)