forked from Syniurge/Calypso
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
125 lines (120 loc) · 5.35 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
language: cpp
before_install:
# LLVM 3.2
- sudo sh -c "echo 'deb http://archive.ubuntu.com/ubuntu/ precise-proposed restricted main multiverse universe' >> /etc/apt/sources.list"
# Some random Launchpad PPA for LLVM/clang 3.3/3.4, should consider replacing this with
# the official Clang binary package from the llvm.org download page.
- echo yes | sudo add-apt-repository ppa:h-rayflood/llvm
# LLVM 3.4 / 3.5 / 3.6 / snapshots
- sudo sh -c "echo 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.4 main' >> /etc/apt/sources.list"
- sudo sh -c "echo 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.5 main' >> /etc/apt/sources.list"
- sudo sh -c "echo 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.6-binaries main' >> /etc/apt/sources.list"
- sudo sh -c "echo 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise main' >> /etc/apt/sources.list"
- wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
# g++4.8.1
- if [ "$CXX" == "g++" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
install:
- sudo apt-get update -qq
- sudo apt-get install -qq $LLVM_PACKAGE libconfig++8-dev
-
if [[ "${OPTS}" == *MULTILIB*ON* ]]; then
sudo apt-get install -qq gcc-multilib libcurl3:i386 libstdc++6:i386;
fi
-
if [[ "${OPTS}" == *MULTILIB*ON* ]]; then
sudo ln -s /usr/lib/i386-linux-gnu/libcurl.so.4.2.0 /usr/lib/i386-linux-gnu/libcurl.so;
fi
-
if [[ "${OPTS}" == *MULTILIB*ON* ]]; then
sudo ln -s /usr/lib/i386-linux-gnu/libstdc++.so.6 /usr/lib/i386-linux-gnu/libstdc++.so;
fi
-
if [[ "${LLVM_PACKAGE}" == *3\.[567]* ]] && [[ "${CXX}" == "g++" ]]; then
sudo apt-get install -qq g++-4.9; export CXX="g++-4.9";
fi
-
if [[ "${LLVM_PACKAGE}" == *3\.[567]* ]] && [[ "${CXX}" == "clang++" ]]; then
sudo apt-get install --allow-unauthenticated -qq clang-3.4; export CXX="clang++-3.4";
fi
-
if [[ "${OPTS}" == *TEST_COVERAGE*ON* ]]; then
sudo pip install cpp-coveralls;
fi
env:
- LLVM_PACKAGE="llvm-3.1 llvm-3.1-dev"
- LLVM_PACKAGE="llvm-3.2 llvm-3.2-dev"
- LLVM_PACKAGE="llvm-3.3 llvm-3.3-dev" TEST_DEBUG=1
- LLVM_PACKAGE="llvm-3.3 llvm-3.3-dev"
- LLVM_PACKAGE="llvm-3.4 llvm-3.4-dev" TEST_DEBUG=1
- LLVM_PACKAGE="llvm-3.4 llvm-3.4-dev" TEST_DEBUG=1 OPTS="-DBUILD_SHARED_LIBS=ON"
- LLVM_PACKAGE="llvm-3.4 llvm-3.4-dev" OPTS="-DBUILD_SHARED_LIBS=ON"
- LLVM_PACKAGE="llvm-3.5 llvm-3.5-dev libedit2 libedit-dev" TEST_DEBUG=1
- LLVM_PACKAGE="llvm-3.5 llvm-3.5-dev libedit2 libedit-dev"
- LLVM_PACKAGE="llvm-3.5 llvm-3.5-dev libedit2 libedit-dev" OPTS="-DTEST_COVERAGE=ON"
- LLVM_PACKAGE="llvm-3.6 llvm-3.6-dev libedit2 libedit-dev" TEST_DEBUG=1
- LLVM_PACKAGE="llvm-3.6 llvm-3.6-dev libedit2 libedit-dev" OPTS="-DMULTILIB=ON" TEST_BITNESS=32
- LLVM_PACKAGE="llvm-3.6 llvm-3.6-dev libedit2 libedit-dev" OPTS="-DMULTILIB=ON" TEST_BITNESS=64
- LLVM_PACKAGE="llvm-3.7 llvm-3.7-dev libedit2 libedit-dev" TEST_DEBUG=1
- LLVM_PACKAGE="llvm-3.7 llvm-3.7-dev libedit2 libedit-dev"
matrix:
allow_failures:
- env: LLVM_PACKAGE="llvm-3.7 llvm-3.7-dev libedit2 libedit-dev" TEST_DEBUG=1
- env: LLVM_PACKAGE="llvm-3.7 llvm-3.7-dev libedit2 libedit-dev"
script:
- cmake $OPTS .
- make -j2
# Outputs some environment info, plus makes sure we only run the test suite
# if we could actually build the executable.
- bin/ldc2 -version || exit 1
# We need to run the druntime/phobos unittest build targets and the testsuite
# with output shown (--verbose), because we hit the non-configurable Travis
# "silence timeout" of 10 minutes otherwise. So much for "no news is good
# news".
# Also, we need to split up the multilib release mode tests into 32 bit and
# 64 bit tests to avoid the hard 50 minutes time limit. This is just about
# the most wasteful solution possible, but the one officially suggested by
# Travis.
# The below is atrociously complex, but a simpler solution that works with
# CTest's inept implementation of regular expressions and -R/-E was hard to
# find.
-
if [[ "${TEST_BITNESS}" == "32" ]]; then
need_32="-32";
elif [[ "${TEST_BITNESS}" == "64" ]]; then
need_32="";
else
need_32="(-32)?";
fi;
if [[ -z "${TEST_DEBUG}" ]]; then
export BUILD_SEL="-R (dmd-testsuite${need_32}$)|(build-(druntime|phobos2)-ldc-unittest${need_32}$)";
export RUN_SEL="-E (dmd-testsuite)|(-debug(-32)?$)";
if [[ "${TEST_BITNESS}" == "32" ]]; then
export RUN_SEL="-R -32$ ${RUN_SEL}";
elif [[ "${TEST_BITNESS}" == "64" ]]; then
export RUN_SEL="-E (dmd-testsuite)|(((-debug)|(-32))$)";
fi;
else
export BUILD_SEL="-R (dmd-testsuite-debug${need_32}$)|(build-(druntime|phobos2)-ldc-unittest-debug${need_32}$)";
export RUN_SEL="-R debug${need_32}$ -E dmd-testsuite";
fi;
- ctest -j2 --verbose ${BUILD_SEL}
- ctest -j2 --output-on-failure ${RUN_SEL}
after_success:
-
if [[ "${OPTS}" == *TEST_COVERAGE*ON* ]]; then
coveralls -e runtime -e tests -e vcbuild --gcov gcov-4.9 --gcov-options '\-lp' > /dev/null 2>&1;
fi
notifications:
# Temporarily disabled due to time limit problems.
# email:
# recipients:
# - "[email protected]"
# on_success: never
# on_failure: change
irc:
channels:
- "irc.freenode.org#ldc"
on_success: always
on_failure: always
use_notice: false
skip_join: true