forked from moneymanagerex/moneymanagerex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
222 lines (211 loc) · 7.12 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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
language: cpp
dist: xenial
sudo: required
services: [ docker ]
git: { depth: false }
os: linux # default build params for matrix
compiler: gcc
cache: ccache
env:
global:
- CCACHE_SLOPPINESS=time_macros
- CMAKE_BUILD_PARALLEL_LEVEL=4
- MAKEFLAGS=-j$CMAKE_BUILD_PARALLEL_LEVEL
- BUILD_TYPE=$(if [[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+ ]]; then if [[ "$TRAVIS_TAG" =~ -[a-z] ]]; then echo RelWithDebInfo; else echo Release; fi; else echo Debug; fi)
matrix: # targets for linux
- OS=debian DIST=jessie
- OS=debian DIST=stretch
- OS=debian DIST=buster
- OS=debian DIST=bullseye
- OS=debian DIST=jessie ARCH=x86
- OS=debian DIST=stretch ARCH=x86
- OS=debian DIST=stretch ARCH=armhf
- OS=debian DIST=buster ARCH=x86
- OS=debian DIST=bullseye ARCH=x86
- OS=ubuntu DIST=xenial
- OS=ubuntu DIST=zesty
- OS=ubuntu DIST=artful
- OS=ubuntu DIST=bionic
- OS=ubuntu DIST=cosmic
- OS=ubuntu DIST=disco
- OS=ubuntu DIST=eoan
- OS=ubuntu DIST=xenial ARCH=x86
- OS=ubuntu DIST=zesty ARCH=x86
- OS=ubuntu DIST=artful ARCH=x86
- OS=ubuntu DIST=bionic ARCH=x86
- OS=ubuntu DIST=cosmic ARCH=x86
- OS=ubuntu DIST=disco ARCH=x86
- OS=ubuntu DIST=disco ARCH=armhf
- OS=ubuntu DIST=eoan ARCH=x86
- OS=ubuntu DIST=eoan ARCH=armhf
- OS=fedora DIST=24
- OS=fedora DIST=25
- OS=fedora DIST=26
- OS=fedora DIST=27
- OS=fedora DIST=28
- OS=fedora DIST=29
- OS=fedora DIST=30
# - OS=opensuse # see issue #1903 on GitHub
- OS=opensuse DIST=42.1
- OS=opensuse DIST=42.2
- OS=opensuse DIST=42.3
# - OS=opensuse DIST=15.0 # see issue #1903 on GitHub
# - OS=opensuse DIST=15.1 # see issue #1903 on GitHub
- OS=archlinux
- OS=el DIST=7 # DIST=6 doesn't provide webview in wxGTK3
- OS=el DIST=8
- OS=slackware DIST=14.2 # DIST=14.1 has cmake 2.x
matrix:
fast_finish: true
include: # add non-linux targets
- name: Validate HTML CSS SVG
git: { submodules: false }
language: java
jdk: openjdk8
cache: pip
services:
install: pip install --user html5validator
before_script: skip
script: |-
set -o pipefail
html5validator --also-check-svg --also-check-css --blacklist 3rd --root . |& \
sed "s#file:$TRAVIS_BUILD_DIR/./##"
after_success: skip
deploy: skip
env: OS=none
if: tag != nightly
- os: osx
osx_image: xcode11.2
compiler: clang
env: OS=macos DIST=10.7
allow_failures:
- language: java # Validate HTML CSS SVG
- env: OS=debian DIST=jessie
- env: OS=debian DIST=stretch
- env: OS=debian DIST=buster
- env: OS=debian DIST=bullseye
- env: OS=debian DIST=jessie ARCH=x86
- env: OS=debian DIST=stretch ARCH=x86
- env: OS=debian DIST=stretch ARCH=armhf
- env: OS=debian DIST=buster ARCH=x86
- env: OS=debian DIST=bullseye ARCH=x86
- env: OS=ubuntu DIST=xenial
- env: OS=ubuntu DIST=zesty
- env: OS=ubuntu DIST=artful
- env: OS=ubuntu DIST=bionic
- env: OS=ubuntu DIST=cosmic
- env: OS=ubuntu DIST=disco
- env: OS=ubuntu DIST=xenial ARCH=x86
- env: OS=ubuntu DIST=zesty ARCH=x86
- env: OS=ubuntu DIST=artful ARCH=x86
- env: OS=ubuntu DIST=bionic ARCH=x86
- env: OS=ubuntu DIST=cosmic ARCH=x86
- env: OS=ubuntu DIST=disco ARCH=x86
- env: OS=ubuntu DIST=disco ARCH=armhf
- env: OS=ubuntu DIST=eoan ARCH=x86
- env: OS=ubuntu DIST=eoan ARCH=armhf
- env: OS=fedora DIST=24
- env: OS=fedora DIST=25
- env: OS=fedora DIST=26
- env: OS=fedora DIST=27
- env: OS=fedora DIST=28
- env: OS=fedora DIST=29
- env: OS=fedora DIST=30
- env: OS=opensuse
- env: OS=opensuse DIST=42.1
- env: OS=opensuse DIST=42.2
- env: OS=opensuse DIST=42.3
- env: OS=opensuse DIST=15.0
- env: OS=opensuse DIST=15.1
- env: OS=archlinux
- env: OS=el DIST=7
- env: OS=slackware DIST=14.2
install: |-
case $TRAVIS_OS_NAME in
linux)
DOCKER=moneymanagerex/mmex_build_env:$OS${DIST:+.$DIST}${ARCH:+.$ARCH}
ccache -cs || true
docker pull ${DOCKER}
docker build dockers/$OS${DIST:+.$DIST}${ARCH:+.$ARCH} --cache-from ${DOCKER} -t ${DOCKER}
;;
osx)
export MACOSX_DEPLOYMENT_TARGET=$DIST
brew update && brew bundle --verbose --file=util/Brewfile
ccache -cs && export PATH="/usr/local/opt/ccache/libexec:$PATH"
cd $HOME
curl -fsSL -O https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.3/wxWidgets-3.1.3.tar.bz2
tar xzf wxWidgets-*.tar.bz2
cd wxWidgets-3.1.3
./configure --disable-shared --enable-cxx11 --with-cxx=11 \
--with-macosx-version-min=$MACOSX_DEPLOYMENT_TARGET \
--without-libtiff
make install
;;
esac
before_script:
- cd $TRAVIS_BUILD_DIR/src/db
- python3 ../../util/sqlite2cpp.py ../../database/tables.sql && rm -f sql*.sql *.mmdbg
- python3 ../../util/sqliteupgrade2cpp.py ../../database/incremental_upgrade
- cd ../.. && mkdir build && cd build
script: |-
CMAKE_CMD="cmake ${ARCH:+-DCMAKE_TOOLCHAIN_FILE=util/toolchain-$TRAVIS_OS_NAME-$ARCH.cmake} .."
case $TRAVIS_OS_NAME in
linux)
chmod -fR a+rwX $HOME/.ccache
docker run -it --rm -w /moneymanagerex/build -e MAKEFLAGS \
-v $HOME/.ccache:/root/.ccache \
-v $TRAVIS_BUILD_DIR:/moneymanagerex ${DOCKER} \
bash -c "$CMAKE_CMD -DCMAKE_BUILD_TYPE=$BUILD_TYPE && cmake --build . --target package && eval \$MMEX_INST_CMD" ;;
osx)
export CXXFLAGS=-stdlib=libc++ # exports required by Xcode 10 or later
export LDFLAGS=-stdlib=libc++
$CMAKE_CMD -G Xcode && cmake --build . --target package --config $BUILD_TYPE -- \
CC=/usr/local/opt/ccache/libexec/clang \
CPLUSPLUS=/usr/local/opt/ccache/libexec/clang++ | \
xcpretty -c -f `xcpretty-travis-formatter`; test ${PIPESTATUS[0]} -eq 0
;;
esac
notifications: # set notification options
email:
recipients:
- developers@moneymanagerex.org
on_success: change # change is when the repo status goes from pass to fail or vice versa
on_failure: always
after_success:
- ccache -cs || true
# Rename mac packages
- if [ $TRAVIS_OS_NAME = osx ]; then
for p in *.dmg; do mv -v $p ${p%Darwin.*}$OS.dmg; done; fi
# Rename files for GH Releases upload as workaround for travis-ci/dpl#821
before_deploy: |-
if [[ ! -d gh_releases ]]; then
mkdir gh_releases
for f in *.{deb,rpm,dmg,txz,pkg.tar.xz}; do
if [[ -e "$f" ]]; then cp -v "$f" "gh_releases/${f//\~/.}"; fi
done
fi
# Set encrypted variable 'GitHub_auth_token' in Travis repo settings to deploy packages
# for tagged commits to GitHub Releases.
# Set encrypted variable 'PACKAGECLOUD_TOKEN' in Travis repo settings to deploy packages
# for tagged commits to packagecloud repo.
deploy:
- provider: releases
api_key: $GitHub_auth_token
file_glob: true
file: gh_releases/*.{deb,rpm,dmg,txz,pkg.tar.xz}
skip_cleanup: true
prerelease: true
overwrite: true
on:
tags: true
condition: ${#GitHub_auth_token} != 0
- provider: packagecloud
repository: ${TRAVIS_REPO_SLUG#*/}
username: ${TRAVIS_REPO_SLUG%/*}
token: $PACKAGECLOUD_TOKEN
dist: $OS/$DIST
package_glob: ./*.{deb,rpm}
skip_cleanup: true
on:
tags: true
condition: $TRAVIS_OS_NAME = linux && ${#DIST} != 0 && $OS != slackware && ${#PACKAGECLOUD_TOKEN} != 0 && $TRAVIS_TAG != nightly