forked from ldc-developers/ldc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
140 lines (132 loc) · 4.63 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
dist: trusty
language: d
sudo: false
matrix:
include:
- os: linux
d: ldc
env: LLVM_VERSION=6.0.0
- os: linux
d: ldc-beta
env: LLVM_VERSION=5.0.1 OPTS="-DLIB_SUFFIX=64"
- os: linux
d: ldc
env: LLVM_VERSION=4.0.1 OPTS="-DBUILD_SHARED_LIBS=ON"
- os: linux
d: ldc-beta
env: LLVM_VERSION=3.9.1 OPTS="-DBUILD_SHARED_LIBS=ON -DLIB_SUFFIX=64"
- os: linux
d: ldc-0.17.5
env: LLVM_VERSION=3.8.1 OPTS="-DBUILD_SHARED_LIBS=OFF -DLIB_SUFFIX=64"
- os: linux
d: dmd
env: LLVM_VERSION=3.7.1 OPTS="-DTEST_COVERAGE=ON"
- os: osx
d: ldc-beta
env: LLVM_VERSION=6.0.0 OPTS="-DBUILD_SHARED_LIBS=OFF" LLVM_SPIRV_AVAILABLE=ON
- os: osx
d: dmd
env: LLVM_VERSION=4.0.0 OPTS="-DBUILD_SHARED_LIBS=ON"
# allow_failures:
# - env: LLVM_VERSION=6.0.0 OPTS="-DBUILD_SHARED_LIBS=OFF" LLVM_SPIRV_AVAILABLE=ON
cache:
directories:
- llvm-spirv-6.0.0
- llvm-6.0.0
- llvm-5.0.1
- llvm-4.0.1
- llvm-4.0.0
- llvm-3.9.1
- llvm-3.8.1
- llvm-3.7.1
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.9
- gdb
- ninja-build
before_install:
-
export LLVM_ROOT_DIR="$PWD/llvm-$LLVM_VERSION";
if [ -n "${LLVM_SPIRV_AVAILABLE}" ]; then export LLVM_ROOT_DIR="$PWD/llvm-spirv-$LLVM_VERSION"; fi
-
if [ ! -e "$LLVM_ROOT_DIR/bin/llvm-config" ]; then
if [ -n "${LLVM_SPIRV_AVAILABLE}" ]; then
wget -O llvm.tar.bz2 https://github.com/thewilsonator/llvm/releases/download/pre-intrinsics/LLVM-6.0.0-Darwin.tar.bz2;
else
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
if [ "${LLVM_VERSION}" = "4.0.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;
wget -O llvm.tar.xz http://releases.llvm.org/$LLVM_VERSION/clang+llvm-$LLVM_VERSION-${LLVM_ARCH}.tar.xz;
fi;
mkdir -p $LLVM_ROOT_DIR;
tar -xf llvm.tar.* --strip 1 -C $LLVM_ROOT_DIR;
rm llvm.tar.*;
fi
install:
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then export CC="gcc-4.9"; export CXX="g++-4.9"; fi
-
if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
wget -O get-pip.py https://bootstrap.pypa.io/get-pip.py;
sudo python get-pip.py;
wget -O ninja-mac.zip https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-mac.zip;
mkdir ninja;
tar -xf ninja-mac.zip -C ninja;
export PATH="$PWD/ninja:$PATH";
fi
- pip install --user lit
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ld --version; gdb --version; fi
- cmake --version
- ninja --version
- python -c "import lit; lit.main();" --version | head -n 1
- eval "${DC} --version"
script:
# Invoke CMake to generate the Ninja build files.
- cmake -G Ninja -DLLVM_ROOT_DIR=$LLVM_ROOT_DIR -DLDC_INSTALL_LLVM_RUNTIME_LIBS=ON $OPTS .
# Build LDC and defaultlib unittest runners.
# [Some unittest modules eat large amounts of memory during compilation => -j2.]
- ninja -j2 all runtime/objects-unittest/std/algorithm/searching.o runtime/objects-unittest-debug/std/algorithm/searching.o runtime/objects-unittest/std/range/package.o runtime/objects-unittest-debug/std/range/package.o runtime/objects-unittest/std/regex/internal/tests.o runtime/objects-unittest-debug/std/regex/internal/tests.o
- ninja -j3 all-test-runners
# Output some environment info, plus make sure we only run the test suite
# if we could actually build the executable.
- bin/ldc2 -version || exit 1
# Build and run LDC D unittests.
- ctest --output-on-failure -R "ldc2-unittest"
# Run LIT testsuite.
- ctest -V -R "lit-tests"
# Run DMD testsuite.
# Optimized runnable/testconst.d crashes (in _aaInX) with shared libs on Linux -
# only for Travis apparently.
-
if [ "${TRAVIS_OS_NAME}" = "linux" ] && [[ "${OPTS}" == *-DBUILD_SHARED_LIBS?ON* ]]; then
rm tests/d2/dmd-testsuite/runnable/testconst.d;
fi
- DMD_TESTSUITE_MAKE_ARGS=-j3 ctest -V -R "dmd-testsuite"
# Run defaultlib unittests & druntime stand-alone tests.
- ctest -j3 --output-on-failure -E "dmd-testsuite|lit-tests|ldc2-unittest"
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