forked from geany/geany-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
141 lines (129 loc) · 3.83 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
language: c
dist: trusty
sudo: false
compiler:
- gcc
env:
global:
- LIBGIT2_VERSION=0.21.5
matrix:
- GTK3=no
- GTK3=yes
cache:
ccache: true
directories:
- $HOME/geany/gtk3
- $HOME/geany/gtk2
- $HOME/libgit2-$LIBGIT2_VERSION
addons:
apt:
packages:
- libgtk2.0-dev
- libgtk-3-dev
- intltool
- libtool
- python-docutils
- check
# FIXME: there are weird error with spellcheck and Ubuntu 12.04's version of cppcheck (1.52)
- cppcheck
# debugger
- libvte-dev
# devhelp
- libwebkitgtk-dev
- libwnck-dev
- libgconf2-dev
- zlib1g-dev
# geanygendoc
- libctpl-dev
# geanylua
- liblua5.1-0-dev
# geanypg
- libgpgme11-dev
# geanypy
- python-dev
- python-gtk2-dev
# geanyvc
- libgtkspell-dev
- libgtkspell3-3-dev
# geaniuspaste/updatechecker
- libsoup2.4-dev
# git-changebar
# Ubuntu 12.04 doesn't have libgit2, 14.04 has a too old one, so we build
# our own for now.
#- libgit2-dev
# markdown
- libmarkdown2-dev
# markdown/webhelper
- libwebkitgtk-3.0-dev
# multiterm
- valac
# pretty-printer
- libxml2-dev
# spellcheck
- libenchant-dev
# for libgit2 build
- cmake
before_install:
# build Geany
- TEMPDIR=$(mktemp -d)
- git clone git://github.com/geany/geany.git "$TEMPDIR/geany"
- geany_commit=$(cd "$TEMPDIR/geany" && git rev-parse HEAD)
- gtkver=gtk2
- test "x$GTK3" = xno || gtkver=gtk3
- cachedir="$HOME/geany/$gtkver/"
- cache_id=$(cat "$cachedir/commit-id" 2>/dev/null || echo "none")
# check if the cache is up-to-date, and either use it, or (re-)create it
- >
if test "$geany_commit" = "$cache_id"; then
echo "Cache '$cachedir' looks good, using it (ID: $cache_id).";
else
echo "Cache '$cachedir' is missing, outdated or invalid, dropping it.";
echo " Cache ID: $cache_id";
echo " Geany ID: $geany_commit";
rm "$cachedir" -rf || exit 1;
( cd "$TEMPDIR/geany" &&
NOCONFIGURE=1 ./autogen.sh &&
./configure --prefix="$cachedir" --enable-gtk3=$GTK3 &&
make -j2 &&
make install || exit 1;
git rev-parse HEAD > "$cachedir/commit-id" || exit 2;
) || exit $?;
fi
- test -z "$TEMPDIR" || rm -rf "$TEMPDIR"
- export PKG_CONFIG_PATH="$cachedir/lib/pkgconfig:$PKG_CONFIG_PATH"
- export LD_LIBRARY_PATH="$cachedir/lib:$LD_LIBRARY_PATH"
# build libgit2
- TEMPDIR=$(mktemp -d)
- libgit2dir="libgit2-$LIBGIT2_VERSION"
- >
if test -f "$HOME/$libgit2dir/lib/pkgconfig/libgit2.pc"; then
echo "Using pre-built libgit2 v$LIBGIT2_VERSION.";
else
( cd $TEMPDIR || exit 1;
wget -q "https://github.com/libgit2/libgit2/archive/v$LIBGIT2_VERSION.tar.gz" -O - |
tar -xz "$libgit2dir" || exit 2;
cd "$libgit2dir" || exit 3;
cmake . \
-DCMAKE_INSTALL_PREFIX="$HOME/$libgit2dir" \
-DCMAKE_RULE_MESSAGES=OFF \
-DBUILD_CLAR=OFF \
-DBUILD_SHARED_LIBS=ON \
|| exit 4;
cmake --build . --target install -- -j2 || exit 5;
) || exit $?;
fi
- test -z "$TEMPDIR" || rm -rf "$TEMPDIR"
- export PKG_CONFIG_PATH="$HOME/$libgit2dir/lib/pkgconfig:$PKG_CONFIG_PATH"
- export LD_LIBRARY_PATH="$HOME/$libgit2dir/lib:$LD_LIBRARY_PATH"
before_script:
# prepare for GP
- export CFLAGS="-g -O2 -Werror=pointer-arith -Werror=implicit-function-declaration"
script:
- NOCONFIGURE=1 ./autogen.sh
- mkdir _build && cd _build
- ../configure --disable-silent-rules
- make -j2
- make -j2 check
- make -j2 distcheck
after_script:
- test -z "$TEMPDIR" || rm -rf "$TEMPDIR"