forked from ldc-developers/ldc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
121 lines (116 loc) · 3.5 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
language: d
sudo: false
matrix:
include:
- os: linux
d: ldc
env: LLVM_VERSION=3.9.1
- os: linux
d: ldc-beta
env: LLVM_VERSION=3.8.1
- os: linux
d: ldc
env: LLVM_VERSION=3.7.1 OPTS="-DMULTILIB=ON -DLIB_SUFFIX=64"
- os: linux
d: ldc-0.17.2
env: LLVM_VERSION=3.6.2 OPTS="-DBUILD_SHARED_LIBS=ON"
- os: linux
d: dmd
env: LLVM_VERSION=3.5.2 OPTS="-DTEST_COVERAGE=ON"
- os: osx
d: ldc
env: LLVM_VERSION=3.9.0
- os: osx
d: ldc
env: LLVM_VERSION=3.9.0 OPTS="-DBUILD_SHARED_LIBS=ON"
allow_failures:
#- env: LLVM_VERSION=3.9
cache:
directories:
- llvm-3.9.1
- llvm-3.9.0
- llvm-3.8.1
- llvm-3.7.1
- llvm-3.6.2
- llvm-3.5.2
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libconfig++8-dev
- gdb
- gcc-4.9
- g++-4.9
- gcc-4.9-multilib
- g++-4.9-multilib
- gcc-multilib
- g++-multilib
- libedit2
- libedit-dev
- libcurl3:i386
before_install:
-
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
if [ "${LLVM_VERSION}" = "3.9.1" ]; then
export LLVM_ARCH="x86_64-linux-gnu-debian8";
else
export LLVM_ARCH="x86_64-linux-gnu-ubuntu-14.04";
fi;
else
export LLVM_ARCH="x86_64-apple-darwin";
fi;
if [ -z "$(ls -A llvm-$LLVM_VERSION)" ]; then
wget -O llvm-$LLVM_VERSION.tar.xz http://llvm.org/releases/$LLVM_VERSION/clang+llvm-$LLVM_VERSION-${LLVM_ARCH}.tar.xz;
mkdir llvm-$LLVM_VERSION;
tar -xvf llvm-$LLVM_VERSION.tar.xz --strip 1 -C llvm-$LLVM_VERSION;
fi;
llvm-$LLVM_VERSION/bin/llvm-config --version;
export LLVM_CONFIG="llvm-$LLVM_VERSION/bin/llvm-config";
install:
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then export CC="gcc-4.9"; export CXX="g++-4.9"; fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew update; brew install libconfig; fi;
- eval "${DC} --version"
- pip install --user lit
- python -c "import lit; lit.main();" --version | head -n 1
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then gdb --version; fi
script:
- cmake --version
- cmake -DLLVM_CONFIG=$(which ${LLVM_CONFIG}) $OPTS .
- make -j3
# 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
# Build Phobos & druntime unittest modules.
-
if [[ "${OPTS}" == *-DMULTILIB?ON* ]]; then
make -j2 phobos2-ldc-unittest-debug phobos2-ldc-unittest phobos2-ldc-unittest-debug_32 phobos2-ldc-unittest_32;
make -j3 druntime-ldc-unittest-debug druntime-ldc-unittest druntime-ldc-unittest-debug_32 druntime-ldc-unittest_32;
else
make -j2 phobos2-ldc-unittest-debug phobos2-ldc-unittest;
make -j3 druntime-ldc-unittest-debug druntime-ldc-unittest;
fi
# Run dmd-testsuite.
- CC="" DMD_TESTSUITE_MAKE_ARGS=-j3 ctest --verbose -R "dmd-testsuite"
# Run LLVM IR testsuite.
- ctest --output-on-failure -V -R "lit-tests"
# Link and run Phobos & druntime unittest runners.
- ctest -j3 --output-on-failure -E "dmd-testsuite|lit-tests"
after_success:
-
if [[ "${OPTS}" == *-DTEST_COVERAGE?ON* ]]; then
coveralls -e runtime -e tests -e vcbuild --gcov gcov-4.9 --gcov-options '\-lp' > /dev/null 2>&1;
fi
notifications:
email:
recipients:
on_success: never
on_failure: change
irc:
channels:
- "irc.freenode.org#ldc"
on_success: always
on_failure: always
use_notice: false
skip_join: true