-
Notifications
You must be signed in to change notification settings - Fork 80
/
.travis.yml
173 lines (172 loc) · 5.36 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
env:
global:
- RUSTFLAGS="-D warnings"
matrix:
fast_finish: true
include:
# CI targets
- os: osx
rust: stable
env: TARGET=x86_64-apple-darwin
- os: linux
dist: trusty
rust: stable
env:
- TARGET=x86_64-unknown-linux-gnu
- COMPILER_NAME=gcc
- CXX=g++-5
- CC=gcc-5
# rustdoc
- os: linux
dist: trusty
rust: stable
env:
- TARGET=x86_64-unknown-linux-gnu
- COMPILER_NAME=gcc
- CXX=g++-5
- CC=gcc-5
- PACKAGE=doc
- secure: "J9YvYryNyAZZSfJfXw64xHGmuwbwjPWxfvQ1vaLoC3ZXla2Nf1tEQN7P0UgnJkC3MZYop/yIZFa0bbdTG0Kef7+RHeD15Yp70bI6fyP9i048KRQYLPubTOHWIm5Ow6qIMo5hKZsVO3z+Lg7s3/y6L+DR5bT3PXWdZHovhe1QlA8="
# nightly builds
- os: linux
dist: trusty
rust: stable
env:
- TARGET=x86_64-unknown-linux-gnu
- COMPILER_NAME=gcc
- CXX=g++-5
- CC=gcc-5
- PACKAGE=ubuntu
- secure: "HwY2nRi7xuAQTkuVWgUupdVcJmutiiq+A4iDCbC4NI/vRB7WKCifxlzivCeTJMBu22LSLPJBMoaQ0S7w1PLaPkuG2d0qqFhublmhzk5sLaQt6AiwpEnJaHLqGy6aDVPDbqd4EWlPZ1MMCV+uXhtHzsg9XmrlZH9l5hMGx3mUDJw="
branches:
only:
- master
- os: linux
dist: trusty
rust: stable
env:
- TARGET=x86_64-unknown-linux-gnu
- PACKAGE=debian
- secure: "HwY2nRi7xuAQTkuVWgUupdVcJmutiiq+A4iDCbC4NI/vRB7WKCifxlzivCeTJMBu22LSLPJBMoaQ0S7w1PLaPkuG2d0qqFhublmhzk5sLaQt6AiwpEnJaHLqGy6aDVPDbqd4EWlPZ1MMCV+uXhtHzsg9XmrlZH9l5hMGx3mUDJw="
branches:
only:
- master
- os: linux
dist: trusty
rust: stable
env:
- TARGET=x86_64-unknown-linux-gnu
- PACKAGE=fedora
- secure: "HwY2nRi7xuAQTkuVWgUupdVcJmutiiq+A4iDCbC4NI/vRB7WKCifxlzivCeTJMBu22LSLPJBMoaQ0S7w1PLaPkuG2d0qqFhublmhzk5sLaQt6AiwpEnJaHLqGy6aDVPDbqd4EWlPZ1MMCV+uXhtHzsg9XmrlZH9l5hMGx3mUDJw="
branches:
only:
- master
- os: osx
rust: stable
env:
- TARGET=x86_64-apple-darwin
- PACKAGE=osx
- secure: "HwY2nRi7xuAQTkuVWgUupdVcJmutiiq+A4iDCbC4NI/vRB7WKCifxlzivCeTJMBu22LSLPJBMoaQ0S7w1PLaPkuG2d0qqFhublmhzk5sLaQt6AiwpEnJaHLqGy6aDVPDbqd4EWlPZ1MMCV+uXhtHzsg9XmrlZH9l5hMGx3mUDJw="
branches:
only:
- master
sudo: false
services:
- docker
notifications:
webhooks:
urls:
- "https://webhooks.gitter.im/e/b55d667112f600c858d4"
irc:
channels:
- "chat.freenode.net#panopticon"
on_success: change
on_failure: always
language: rust
cache: cargo
addons:
apt:
sources: &sources
- ubuntu-toolchain-r-test
packages:
# qml-rust
- g++-5
# panopticon
- cmake
- qt5-default
- qtdeclarative5-dev
- libqt5qml-quickcontrols
- qtbase5-private-dev
- libqt5svg5-dev
- pkg-config
- git
- build-essential
# kcov
- libelf-dev
- libcurl4-openssl-dev
- libdw-dev
before_install: |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update
brew install qt
brew link qt --force
brew linkapps qt
export HOMEBREW_QT5_VERSION=$(brew list --versions qt | rev | cut -d ' ' -f1 | rev)
ln -s /usr/local/Cellar/qt/$HOMEBREW_QT5_VERSION/mkspecs /usr/local/mkspecs
ln -s /usr/local/Cellar/qt/$HOMEBREW_QT5_VERSION/plugins /usr/local/plugins
fi
before_script: |
if [[ "$TRAVIS_OS_NAME" == "linux" && "$PACKAGE" == "" ]]; then
(cargo install cargo-travis || true)
export PATH=$HOME/.cargo/bin:$PATH
fi
script: |
if [[ "$PACKAGE" != "" && ( "$TRAVIS_BRANCH" != "master" || "$TRAVIS_PULL_REQUEST" != "false" ) ]]
then
echo ""
else
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export QTDIR64=/usr/local; fi &&
case "$PACKAGE" in
"osx")
cd pkg/osx/ &&
./package_dmg.sh &&
curl -vT Panopticon.dmg -u upload:$FTP_PASSWD -Q "-SITE CHMOD 664 panopticon-master.dmg" ftp://files.panopticon.re/panopticon-master.dmg
;;
"ubuntu")
cd pkg/debian &&
docker build -t panopticon-build -f Dockerfile.ubuntu . &&
docker run -v `pwd`:/out panopticon-build &&
curl -vT panopticon_0.16_amd64.deb -u upload:$FTP_PASSWD -Q "-SITE CHMOD 664 panopticon-master-xenial.deb" ftp://files.panopticon.re/panopticon-master-xenial.deb
;;
"doc")
cargo doc --all &&
cd target/doc &&
tar cvf ../../doc.tar * &&
curl -H "X-Token: $DOC_TOKEN" --data-binary @../../doc.tar https://doc.panopticon.re/update
;;
"debian")
cd pkg/debian &&
docker build -t panopticon-build -f Dockerfile.debian . &&
docker run -v `pwd`:/out panopticon-build &&
curl -vT panopticon_0.16_amd64.deb -u upload:$FTP_PASSWD -Q "-SITE CHMOD 664 panopticon-master-stretch.deb" ftp://files.panopticon.re/panopticon-master-stretch.deb
;;
"fedora")
cd pkg/fedora &&
docker build -t panopticon-build . &&
docker run -v `pwd`:/out panopticon-build &&
curl -vT panopticon_0.16_amd64.rpm -u upload:$FTP_PASSWD -Q "-SITE CHMOD 664 panopticon-master-fedora-25.rpm" ftp://files.panopticon.re/panopticon-master-fedora-25.rpm
;;
"")
cargo build --verbose --all &&
cargo test --verbose --all
;;
*)
exit
;;
esac
fi
after_success: |
# send coverage report to coveralls.io
if [[ "$TRAVIS_OS_NAME" == "linux" && "$PACKAGE" == "" ]]; then
cargo coveralls --verbose --all
fi