forked from moneymanagerex/moneymanagerex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
151 lines (144 loc) · 5.09 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
language: cpp
dist: trusty
sudo: required
services: [ docker ]
git: { depth: 10 } # don't clone all history from repo, leave 10 for build queue
os: linux # default build params for matrix
compiler: gcc
cache: ccache
env:
global:
- MAKEFLAGS=-j4
- BUILD_TYPE=Release
- BUILD_TESTS=OFF
matrix: # targets for linux
- OS=debian DIST=jessie
- OS=debian DIST=stretch
# - OS=debian DIST=buster # see issue #1331 on GitHub
- OS=debian DIST=jessie ARCH=x86
- OS=debian DIST=stretch ARCH=x86
# - OS=debian DIST=buster ARCH=x86 # see issue #1331 on GitHub
- OS=ubuntu DIST=xenial
- OS=ubuntu DIST=zesty
# - OS=ubuntu DIST=artful # see issue #1331 on GitHub
- OS=ubuntu DIST=xenial ARCH=x86
- OS=ubuntu DIST=zesty ARCH=x86
# - OS=ubuntu DIST=artful ARCH=x86 # see issue #1331 on GitHub
- OS=fedora
- OS=fedora DIST=24
- OS=fedora DIST=25
- OS=fedora DIST=26
# - OS=opensuse # see issue #1331 on GitHub
- OS=opensuse DIST=42.2
- OS=opensuse DIST=42.3
- OS=archlinux
- OS=el DIST=7 # DIST=6 doesn't provide webview in wxGTK3
- OS=linuxmint DIST=serena
- OS=slackware DIST=14.2 # DIST=14.1 has cmake 2.x
matrix:
fast_finish: true
include: # add non-linux targets
- { os: osx, osx_image: xcode6.4, env: OS=osx DIST=10.10 }
- { os: osx, osx_image: xcode8, env: OS=osx DIST=10.11 }
- { os: osx, osx_image: xcode9.1, env: OS=macos DIST=10.12 }
- { os: osx, osx_image: xcode9.1, env: OS=macos DIST=10.13 }
exclude:
- { osx_image: xcode6.4, env: BUILD_TESTS=ON } # libtoolize problems
allow_failures:
- env: OS=debian DIST=jessie
- env: OS=debian DIST=stretch
- env: OS=debian DIST=buster
- env: OS=debian DIST=jessie ARCH=x86
- env: OS=debian DIST=stretch ARCH=x86
- env: OS=debian DIST=buster ARCH=x86
- env: OS=ubuntu DIST=xenial
- env: OS=ubuntu DIST=artful
- env: OS=ubuntu DIST=xenial ARCH=x86
- env: OS=ubuntu DIST=zesty ARCH=x86
- env: OS=ubuntu DIST=artful ARCH=x86
- env: OS=fedora
- env: OS=fedora DIST=24
- env: OS=fedora DIST=25
- env: OS=fedora DIST=26
- env: OS=opensuse
- env: OS=opensuse DIST=42.2
- env: OS=opensuse DIST=42.3
- env: OS=archlinux
- env: OS=linuxmint DIST=serena
- env: OS=osx DIST=10.10
- env: OS=osx DIST=10.11
- env: OS=macos DIST=10.12
- env: OS=slackware DIST=14.2
install: |-
DOCKER=moneymanagerex/mmex_build_env:$OS${DIST:+.$DIST}${ARCH:+.$ARCH}
case $TRAVIS_OS_NAME in
linux)
ccache -s || true
docker pull ${DOCKER}
docker build dockers/$OS${DIST:+.$DIST}${ARCH:+.$ARCH} --cache-from ${DOCKER} -t ${DOCKER}
;;
osx)
MACOSX_DEPLOYMENT_TARGET=$DIST
brew update # see travis-ci/travis-ci#8552
for p in gettext libtool automake ccache zlib;
do brew list $p >/dev/null || brew install --verbose $p; done
brew link --force gettext libtool zlib
ccache -s && export PATH="/usr/local/opt/ccache/libexec:$PATH"
brew install --verbose wxmac --with-static --with-stl
;;
esac
mkdir build && cd build
script: |-
CMAKE_CMD="cmake ${ARCH:+-DCMAKE_TOOLCHAIN_FILE=util/toolchain-$TRAVIS_OS_NAME-$ARCH.cmake} -DMMEX_BUILD_TESTS=$BUILD_TESTS -DCMAKE_BUILD_TYPE=$BUILD_TYPE .."
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 && make package" ;;
osx)
$CMAKE_CMD && make package ;;
esac
notifications: # set notification options
email:
recipients:
on_success: change # change is when the repo status goes from pass to fail or vice versa
on_failure: always
after_success:
- ccache -s || true
# Rename mac packages
- if [ $TRAVIS_OS_NAME = osx ]; then
for p in *.dmg; do mv -v $p ${p%Darwin.*}$OS$DIST.dmg; done; fi
# Rename Slackware packages
- if [ $OS = slackware ]; then
for p in *.tar.xz; do mv -v $p ${p%.tar.xz}.txz; 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: $TRAVIS_BUILD_DIR/build/*.{deb,rpm,dmg,txz,pkg.tar.xz}
skip_cleanup: true
on: # Set deploy conditions
# Deploy only when tag is specified
tags: true
# and only when API token is set
condition: "${#GitHub_auth_token} != 0 && $BUILD_TYPE = Release"
- provider: packagecloud
repository: ${TRAVIS_REPO_SLUG#*/}
username: ${TRAVIS_REPO_SLUG%/*}
token: $PACKAGECLOUD_TOKEN
dist: $OS/$DIST
package_glob: $TRAVIS_BUILD_DIR/build/*.{deb,rpm}
skip_cleanup: true
on: # Set deploy conditions
# Deploy only when tag is specified
tags: true
# and only packages generated by gcc from Linux
# and only when API token is set
condition: "$TRAVIS_OS_NAME = linux && ${#DIST} != 0 && $OS != slackware && ${#PACKAGECLOUD_TOKEN} != 0 && $BUILD_TYPE = Release"