forked from kiwix/kiwix-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
160 lines (157 loc) · 4.07 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
language: cpp
dist: trusty
sudo: required
services:
- docker
branches:
only:
- master
- /\d+\.\d+\.\d+$/
if: type != push OR tag IS present
before_install:
- PATH=$PATH:${HOME}/bin:${HOME}/.local/bin
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then PATH=$PATH:$(brew --prefix)/opt/gettext/bin; fi
- '[ -n "$encrypted_eba2f7543984_iv" ] && openssl aes-256-cbc
-K $encrypted_eba2f7543984_key -iv $encrypted_eba2f7543984_iv
-in travis/travisci_builder_id_key.enc -out travis/travisci_builder_id_key -d'
- chmod 600 travis/travisci_builder_id_key
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
ccache: true
directories:
- $HOME/.cache/pip
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache
install: if [[ $TRAVIS_OS_NAME != "linux" || $DESKTOP_ONLY != 1 ]]; then travis/install_extra_deps.sh; fi
script:
- |
if [[ $TRAVIS_OS_NAME = "linux" && $DESKTOP_ONLY == 1 ]]
then
if [[ $PLATFORM = "flatpak" ]]
then
docker build -t kiwix/build -f travis/Dockerfile_flatpak .
else
docker build -t kiwix/build -f travis/Dockerfile .
fi
docker run -e PLATFORM -e NIGHTLY_DATE -e TRAVIS_EVENT_TYPE -e DESKTOP_ONLY -e TRAVIS_TAG --device /dev/fuse --cap-add ALL --privileged kiwix/build
else
if [[ $TRAVIS_OS_NAME = "linux" ]]
then
python3.5 travis/compile_all.py
else
python3 travis/compile_all.py
fi
fi
after_failure: travis/upload_all_log.sh
deploy:
- provider: script
skip_cleanup: true
script: travis/deploy.sh
on:
tags: true
condition: $TRAVIS_OS_NAME != "linux" || $DESKTOP_ONLY != 1
- provider: script
skip_cleanup: true
script: travis/deploy.sh
on:
branch: master
condition: $TRAVIS_EVENT_TYPE = cron && ( $TRAVIS_OS_NAME != "linux" || $DESKTOP_ONLY != 1 )
env:
global:
- NIGHTLY_DATE=$(date +%Y-%m-%d)
matrix:
- PLATFORM="native_dyn"
- PLATFORM="armhf_dyn"
- PLATFORM="armhf_static"
- PLATFORM="native_mixed"
addons:
ssh_known_hosts:
- download.kiwix.org
- tmp.kiwix.org
- download.openzim.org
apt:
packages: &common
- cmake
- autopoint
- python3.5
- python3-pip
- ctpp2-utils
- libmagic-dev
matrix:
include:
- env: PLATFORM="native_dyn" DESKTOP_ONLY=1
addons:
apt:
packages: []
- env: PLATFORM="flatpak" DESKTOP_ONLY=1
addons:
apt:
packages: []
- env: PLATFORM="native_static"
addons:
apt:
packages:
- *common
- libbz2-dev
- zlib1g-dev
- uuid-dev
- libctpp2-dev
- env: PLATFORM="win32_dyn"
addons: &win32_addons
apt:
packages:
- *common
- g++-mingw-w64-i686
- gcc-mingw-w64-i686
- gcc-mingw-w64-base
- mingw-w64-tools
- env: PLATFORM="win32_static"
addons: *win32_addons
- env: PLATFORM="i586_dyn"
addons: &i586_addons
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- *common
- gcc-multilib
- g++-multilib
- libc6-dev:i386
- libstdc++-6-dev:i386
- env: PLATFORM="i586_static"
addons: *i586_addons
- env: PLATFORM="android"
addons: &android_addons
apt:
packages:
- *common
- default-jdk
- env: PLATFORM="android_arm"
addons: *android_addons
- env: PLATFORM="android_arm64"
addons: *android_addons
- env: PLATFORM="android_x86"
addons: *android_addons
- env: PLATFORM="android_x86_64"
addons: *android_addons
- env: PLATFORM="native_dyn"
os: osx
- env: PLATFORM="iOS_arm64"
os: osx
- env: PLATFORM="iOS_i386"
os: osx
notifications:
irc:
channels:
- "chat.freenode.net#kiwix"
on_success: change
on_failure: always
email:
recipients:
on_success: change
on_failure: always