-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
189 lines (189 loc) · 7.18 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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
sudo: required
services:
- docker
language:
- c
- java
compiler:
- gcc
- clang
os:
- linux
- osx
osx:
- osx_image: xcode8.1
jdk:
- openjdk8
addons:
apt:
packages:
- flex
- bison
- gperf
- pkg-config
- clang
- binutils-mingw-w64-i686
- gcc-mingw-w64-i686
- binutils-mingw-w64
- gcc-mingw-w64
- swig
env:
global:
- BUILD_BRANCH=$TRAVIS_BRANCH
- BUILD_ID=$TRAVIS_BUILD_NUMBER
- PACKAGE_NAME=openaaa
matrix:
- BUILD_DEPLOY=1 BUILD_TARGET=linux PACK=none
- BUILD_DEPLOY=1 BUILD_TARGET=osx PACK=none
- BUILD_DEPLOY=1 BUILD_TARGET=win32 PACK=none
- BUILD_DEPLOY=1 BUILD_TARGET=win64 PACK=none
- BUILD_DEPLOY=1 BUILD_TARGET=linux OS=el DIST=6 PACK=rpm
- BUILD_DEPLOY=1 BUILD_TARGET=linux OS=el DIST=7 PACK=rpm
- BUILD_DEPLOY=1 BUILD_TARGET=linux OS=fedora DIST=24 PACK=rpm
- BUILD_DEPLOY=1 BUILD_TARGET=linux OS=fedora DIST=25 PACK=rpm
# - BUILD_DEPLOY=1 BUILD_TARGET=linux OS=ubuntu DIST=trusty PACK=deb
# - BUILD_DEPLOY=1 BUILD_TARGET=linux OS=ubuntu DIST=precise PACK=deb
# - BUILD_DEPLOY=1 BUILD_TARGET=linux OS=ubuntu DIST=xenial PACK=deb
# - BUILD_DEPLOY=1 BUILD_TARGET=linux OS=debian DIST=jessie PACK=deb
# - BUILD_DEPLOY=1 BUILD_TARGET=linux OS=debian DIST=wheezy PACK=deb
# - BUILD_DEPLOY=1 BUILD_TARGET=linux OS=debian DIST=stretch PACK=deb
# - BUILD_DEPLOY=1 BUILD_TARGET=linux OS=debian DIST=sid PACK=deb
matrix:
allow_failures:
- env: BUILD_DEPLOY=1 BUILD_TARGET=win32 PACK=none
- env: BUILD_DEPLOY=1 BUILD_TARGET=win64 PACK=none
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=el DIST=6 PACK=rpm
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=el DIST=7 PACK=rpm
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=fedora DIST=24 PACK=rpm
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=fedora DIST=25 PACK=rpm
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=ubuntu DIST=precise PACK=deb
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=ubuntu DIST=trusty PACK=deb
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=ubuntu DIST=xenial PACK=deb
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=debian DIST=jessie PACK=deb
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=debian DIST=wheezy PACK=deb
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=debian DIST=stretch PACK=deb
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=debian DIST=sid PACK=deb
exclude:
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=el DIST=6 PACK=rpm
compiler: clang
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=el DIST=7 PACK=rpm
compiler: clang
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=fedora DIST=24 PACK=rpm
compiler: clang
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=fedora DIST=25 PACK=rpm
compiler: clang
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=ubuntu DIST=precise PACK=deb
compiler: clang
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=ubuntu DIST=trusty PACK=deb
compiler: clang
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=ubuntu DIST=xenial PACK=deb
compiler: clang
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=debian DIST=wheezy PACK=deb
compiler: clang
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=debian DIST=jessie PACK=deb
compiler: clang
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=debian DIST=stretch PACK=deb
compiler: clang
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=debian DIST=sid PACK=deb
compiler: clang
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=el DIST=6 PACK=rpm
os: osx
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=el DIST=7 PACK=rpm
os: osx
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=fedora DIST=24 PACK=rpm
os: osx
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=fedora DIST=25 PACK=rpm
os: osx
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=ubuntu DIST=precise PACK=deb
os: osx
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=ubuntu DIST=trusty PACK=deb
os: osx
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=ubuntu DIST=xenial PACK=deb
os: osx
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=debian DIST=wheezy PACK=deb
os: osx
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=debian DIST=jessie PACK=deb
os: osx
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=debian DIST=stretch PACK=deb
os: osx
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=debian DIST=sid PACK=deb
os: osx
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux PACK=none
os: osx
- env: BUILD_DEPLOY=1 BUILD_TARGET=osx PACK=none
os: linux
- env: BUILD_DEPLOY=1 BUILD_TARGET=win32 PACK=none
os: osx
- env: BUILD_DEPLOY=1 BUILD_TARGET=win64 PACK=none
os: osx
- env: BUILD_DEPLOY=1 BUILD_TARGET=win32 PACK=none
compiler: clang
- env: BUILD_DEPLOY=1 BUILD_TARGET=win64 PACK=none
compiler: clang
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=el DIST=6 PACK=rpm
osx_image: xcode7.1
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=el DIST=7 PACK=rpm
osx_image: xcode7.1
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=fedora DIST=24 PACK=rpm
osx_image: xcode7.1
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=fedora DIST=25 PACK=rpm
osx_image: xcode7.1
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=ubuntu DIST=precise PACK=deb
osx_image: xcode7.1
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=ubuntu DIST=trusty PACK=deb
osx_image: xcode7.1
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=ubuntu DIST=xenial PACK=deb
osx_image: xcode7.1
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=debian DIST=wheezy PACK=deb
osx_image: xcode7.1
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=debian DIST=jessie PACK=deb
osx_image: xcode7.1
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=debian DIST=stretch PACK=deb
osx_image: xcode7.1
- env: BUILD_DEPLOY=1 BUILD_TARGET=linux OS=debian DIST=sid PACK=deb
osx_image: xcode7.1
before_deploy:
- export
- export BUILD_ARCHIVE=openaaa-$BUILD_MAJOR.$BUILD_MINOR.$BUILD_REVISION-$BUILD_OS_NAME-$BUILD_OS_ARCH-$BUILD_OS_RELEASE.tar.gz
before_install:
- source ./scripts/travis/before_install.sh
- gem install package_cloud
script:
- export
# - shell_session_update() { :; } # workarround mac os build bug
- export PATH=$PWD/local/bin:$PATH
# mkdir ./rpm
# cp ./scripts/package/openaaa.spec ./rpm/
- git submodule update --init --recursive
- git describe --long --always
- git clone https://github.com/packpack/packpack.git packpack
- 'if [[ $PACK == "none" ]]; then
make defconfig ;
make ;
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
sudo make install INSTALL_PATH=/opt/aaa INSTALL_MOD_PATH=/opt/aaa/lib ;
sudo make modules_install INSTALL_PATH=/opt/aaa INSTALL_MOD_PATH=/opt/aaa/lib ;
else
sudo make install ;
sudo make modules_install ;
fi
else
packpack/packpack;
fi'
deploy:
# Deploy packages to PackageCloud
provider: packagecloud
username: ${PACKAGECLOUD_USER}
repository: ${PACKAGECLOUD_REPO}
token: ${PACKAGECLOUD_TOKEN}
dist: ${OS}/${DIST}
package_glob: build/*.{deb,rpm}
skip_cleanup: true
on:
tags: true
# branch: master
condition: -n "${OS}" && -n "${DIST}" && -n "${PACKAGECLOUD_TOKEN}"
notifications:
on_success: never
on_failure: never
email: false