forked from rcaelers/workrave
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
170 lines (150 loc) · 5.41 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
dist: bionic
services:
- docker
notifications:
email:
on_success: change
on_failure: change
################################################################################
_stage_base: &_stage_base
before_install:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- export WORKRAVE_FULL_TAG=`git describe --tags --abbrev=10`
- export WORKRAVE_TAG=`git describe --abbrev=0`
- export WORKRAVE_COMMIT_COUNT=`git rev-list ${WORKRAVE_TAG}..HEAD --count`
- export WORKRAVE_COMMIT_HASH=`git rev-parse HEAD`
- export WORKRAVE_BUILD_DATE=`date +"%Y%m%d"`
- export WORKRAVE_BUILD_DATETIME=`date --iso-8601=seconds`
- export WORKRAVE_BUILD_ID="$WORKRAVE_BUILD_DATE-$WORKRAVE_FULL_TAG"
- export WORKRAVE_UPLOAD_DIR="snapshots/v1.10/$WORKRAVE_BUILD_ID"
- |
if [ ${TRAVIS_OS_NAME} = "osx" ]; then
# compilation with system wide gettext fails at the link stage with missing symbols...
brew install gettext qt5 python3
brew link gettext --force
brew linkapps qt5
brew outdated cmake || brew upgrade cmake
pip3 install --user Jinja2==2.8 # required for dbus support, system (distro) wide include paths are ignored
elif [ ${TRAVIS_OS_NAME} = "linux" ]; then
sudo apt-get -y install python3 python3-pip python3-setuptools
python3 -V
pip3 -V
fi
_stage_build_docker: &_stage_build_docker
<<: *_stage_base
os: linux
dist: bionic
language: cpp
script: |
if [[ $DOCKER_IMAGE ]]; then
IFS=$'\n'
docker run --rm \
-v "$TRAVIS_BUILD_DIR:/workspace/source" \
`printenv | grep -E '^(CONF_ENABLE|CONF_DISABLE||CONF_FLAGS|CONF_GTK_VER|CONFIGURATION|DOCKER_IMAGE|DISTCHECK|TRAVIS_TAG|TRAVIS_BUILD_DIR|TRAVIS_BUILD_NUMBER|TRAVIS_JOB_NUMBER|TRAVIS_REPO_SLUG|TRAVIS_OS_NAME|TRAVIS_BRANCH|WORKRAVE_.*)=' | sed -e 's/^/-e/g' ` \
rcaelers/workrave-build:${DOCKER_IMAGE} \
sh -c "/workspace/source/build/travis/build.sh"
else
build/travis/build.sh
fi
_stage_build_osx: &_stage_build_osx
<<: *_stage_base
os: osx
osx_image: xcode11
language: cpp
script:
- build/travis/build.sh
jobs:
include:
- stage: prepare
language: cpp
script: |
<<: *_stage_base
###########################################################################
- stage: build
env: >
COMPILER="gcc"
CONF_GTK_VER="3"
CONF_ENABLE="gnome3,gsettings,xml,pulse,indicator,xfce,mate,dbus,distribution,experimental,gconf,gstreamer,exercises"
CONF_DISABLE=""
DOCKER_IMAGE="ubuntu-xenial"
<<: *_stage_build_docker
- stage: build
env: >
COMPILER="gcc"
CONF_GTK_VER="3"
CONF_ENABLE="gnome3,gsettings,xml,pulse,indicator,xfce,mate,dbus,distribution,experimental,gconf,gstreamer,exercises"
CONF_DISABLE=""
DOCKER_IMAGE="ubuntu-bionic"
<<: *_stage_build_docker
- stage: build
env: >
COMPILER="gcc"
CONF_GTK_VER="3"
CONF_ENABLE="gnome3,gsettings,xml,pulse,indicator,xfce,mate,dbus,distribution,experimental,gconf,gstreamer,exercises"
CONF_DISABLE=""
DOCKER_IMAGE="ubuntu-eoan"
DISTCHECK="yes"
<<: *_stage_build_docker
- stage: build
env: >
COMPILER="gcc"
CONF_GTK_VER="3"
CONF_ENABLE="gnome3,gsettings,xml,pulse,indicator,xfce,mate,dbus,distribution,experimental,gconf,gstreamer,exercises"
CONF_DISABLE=""
DOCKER_IMAGE="ubuntu-focal"
<<: *_stage_build_docker
- stage: build
env: >
COMPILER="gcc"
CONF_GTK_VER="3"
CONF_ENABLE="gnome3,gsettings,xml,pulse,indicator,xfce,mate,dbus,distribution,experimental,gconf,gstreamer,exercises"
CONF_DISABLE=""
DOCKER_IMAGE="ubuntu-groovy"
<<: *_stage_build_docker
- stage: build
env: >
COMPILER="gcc"
DOCKER_IMAGE="ubuntu-eoan"
CONF_GTK_VER="2"
CONF_ENABLE="gsettings,,exercises,xml,gconf,distribution,experimental"
CONF_DISABLE="pulse,xfce,gnome3,gstreamer,dbus,mate,indicator"
<<: *_stage_build_docker
- stage: build
env: >
COMPILER="gcc"
CONF_GTK_VER="3"
CONF_ENABLE="gnome3,pulse,dbus,experimental,gstreamer,exercises,xml"
CONF_DISABLE="gsettings,gconf,indicator,xfce,mate,debug,distribution,tests,tracing"
DOCKER_IMAGE="ubuntu-eoan"
<<: *_stage_build_docker
- stage: build
env: >
COMPILER="gcc"
CONF_GTK_VER="3"
CONF_ENABLE="gnome3,gsettings,xml,pulse,indicator,xfce,mate,dbus,distribution,experimental,gconf,gstreamer,exercises"
CONF_DISABLE=""
DOCKER_IMAGE="debian-testing"
<<: *_stage_build_docker
- stage: build
env: >
COMPILER="gcc"
CONFIGURATION="Release"
DOCKER_IMAGE="mingw-gtk2"
<<: *_stage_build_docker
- stage: build
env: >
COMPILER="gcc"
CONFIGURATION="Debug"
DOCKER_IMAGE="mingw-gtk2"
<<: *_stage_build_docker
stages:
- name: prepare
if: tag IS present AND tag =~ ^v1_.*$ AND type = push
- name: build
if: (tag IS NOT present) OR (tag != ppa)
- name: catalog
if: ((tag IS NOT present) OR (tag != ppa)) AND type = push
- name: release
if: tag IS present AND tag =~ ^v1_.*$ AND type = push
- name: ppa
if: tag IS present AND (tag =~ ^v1_.*$ OR tag = ppa) AND type = push