-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
55 lines (43 loc) · 1.41 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
# Build matrix / environment variable are explained on:
# http://about.travis-ci.org/docs/user/build-configuration/
# This file can be validated on:
# http://lint.travis-ci.org/
language: cpp
dist: bionic
sudo: required
compiler:
- gcc
- clang
before_install:
- sudo apt-get update
# Ensure add-apt-repository is installed.
- sudo apt-get install software-properties-common
# LLVM
- sudo sh -c "echo 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main' >> /etc/apt/sources.list"
- wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
- sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
install:
# Install package dependencies.
# (Re-run this command a few times to handle handle random failures.)
-
for i in {1..5}; do
if sudo apt-get update && sudo apt-get install -y llvm-$LLVM_VERSION llvm-$LLVM_VERSION-dev clang-$LLVM_VERSION; then
break;
fi;
sleep 1;
done
# use the previously installed clang version (since installing one tends to remove another).
-
if [[ "${CXX}" == "clang++" ]]; then
export CXX="clang++-$LLVM_VERSION";
fi
before_script:
- mkdir build
- cd build
script:
- cmake -DCMAKE_BUILD_TYPE="$BUILD_TYPE" -DCMAKE_INSTALL_PREFIX=./artifacts/llvm-abi ..
- make && ctest --output-on-failure
- make install
env:
- BUILD_TYPE=Debug LLVM_VERSION="9"
- BUILD_TYPE=Release LLVM_VERSION="9"