forked from GerbilSoft/rom-properties
-
Notifications
You must be signed in to change notification settings - Fork 0
/
travis.sh
executable file
·92 lines (87 loc) · 2.03 KB
/
travis.sh
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
#!/bin/sh
RET=0
mkdir "${TRAVIS_BUILD_DIR}/build"
cd "${TRAVIS_BUILD_DIR}/build"
cmake --version
# Initial build with optional components disabled.
OS_ENABLE_LZ4=ON
case "$OSTYPE" in
darwin*)
# Mac OS X. Disable gettext for now.
# Also disable split debug due to lack of `objcopy`.
OS_ENABLE_LZ4=OFF
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DSPLIT_DEBUG=OFF \
-DENABLE_LTO=OFF \
-DENABLE_PCH=ON \
-DBUILD_TESTING=ON \
-DENABLE_NLS=OFF \
\
-DENABLE_EXTRA_SECURITY=OFF \
-DENABLE_JPEG=OFF \
-DENABLE_XML=OFF \
-DENABLE_DECRYPTION=OFF \
-DENABLE_UNICE68=OFF \
-DENABLE_LIBMSPACK=OFF \
-DENABLE_PVRTC=OFF \
-DENABLE_ZSTD=OFF \
-DENABLE_LZ4=OFF \
-DENABLE_LZO=OFF \
|| exit 1
;;
*)
# Linux. Enable all UI frontends.
# NOTE: KF5 is not available on Ubuntu 14.04,
# so we can't build the KF5 plugin.
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DENABLE_LTO=OFF \
-DENABLE_PCH=ON \
-DBUILD_TESTING=ON \
-DENABLE_NLS=ON \
-DBUILD_KDE4=ON \
-DBUILD_KDE5=OFF \
-DBUILD_XFCE=ON \
-DBUILD_GTK3=ON \
\
-DENABLE_EXTRA_SECURITY=OFF \
-DENABLE_JPEG=OFF \
-DENABLE_XML=OFF \
-DENABLE_DECRYPTION=OFF \
-DENABLE_UNICE68=OFF \
-DENABLE_LIBMSPACK=OFF \
-DENABLE_PVRTC=OFF \
-DENABLE_ZSTD=OFF \
-DENABLE_LZ4=OFF \
-DENABLE_LZO=OFF \
|| exit 1
esac
# Build everything.
make -k || RET=1
# Test with en_US.UTF8.
LC_ALL="en_US.UTF8" ctest -V || RET=1
# Test with fr_FR.UTF8 to find i18n issues.
LC_ALL="fr_FR.UTF8" ctest -V || RET=1
# Second build with optional components enabled.
cmake .. \
-DENABLE_EXTRA_SECURITY=ON \
-DENABLE_JPEG=ON \
-DENABLE_XML=ON \
-DENABLE_DECRYPTION=ON \
-DENABLE_UNICE68=ON \
-DENABLE_LIBMSPACK=ON \
-DENABLE_PVRTC=ON \
-DENABLE_ZSTD=ON \
-DENABLE_LZ4=${OS_ENABLE_LZ4} \
-DENABLE_LZO=ON \
${OS_SPECIFIC_OPTS} \
|| exit 1
# Build everything.
make -k || RET=1
# Test with en_US.UTF8.
LC_ALL="en_US.UTF8" ctest -V || RET=1
# Test with fr_FR.UTF8 to find i18n issues.
LC_ALL="fr_FR.UTF8" ctest -V || RET=1
# All done!
exit "${RET}"