-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
102 lines (98 loc) · 4.73 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
# Copyright (c) 2018-2019, Intel Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# * Neither the name of Intel Corporation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Author: Dmitry Babokin
# "minimal" instead of "cpp", because of https://github.com/travis-ci/travis-ci/issues/8363
# Otherwise during python invocation PATH is prepended by /usr/bin and it yields wrong llvm-as.
language: minimal
sudo: required
services:
- docker
# Some magic is here. Docker is used to load pre-built LLVM as part of custom built image.
# Custom built LLVM is required because
# (1) we need a patched version of LLVM for some of LLVM versions for performance and
# stability reasons,
# (2) it must be a dump-enabled LLVM build (release version without assertions and without
# stripping off dump() function), this affects LLVM 5.0 and later versions,
# (3) same compiler needs to be used for building LLVM and ISPC, otherwise there might be
# ABI incompatibilities causing link errors and runtime segfaults,
# (4) to have flexibility of testing with a range of LLVM versions that we need.
env:
global:
- DOCKER_REPO_PATH=ispc/ubuntu_14.04
- LLVM_HOME=/usr/local/src/llvm
- ISPC_HOME=$TRAVIS_BUILD_DIR
matrix:
include:
- env: LLVM_VERSION=5.0 OS=Ubuntu14.04
before_install:
- sudo apt-get install -y libc6-dev-i386
- docker pull $DOCKER_REPO_PATH:llvm50
- docker run $DOCKER_REPO_PATH:llvm50
- export CONTAINER=`docker ps --all |head -2 |tail -1 |awk '//{print $1}'`
- sudo docker cp $CONTAINER:$LLVM_HOME /usr/local/src
- export PATH=$LLVM_HOME/bin-5.0/bin:$PATH
- env: LLVM_VERSION=6.0 OS=Ubuntu14.04
before_install:
- sudo apt-get install -y libc6-dev-i386
- docker pull $DOCKER_REPO_PATH:llvm60
- docker run $DOCKER_REPO_PATH:llvm60
- export CONTAINER=`docker ps --all |head -2 |tail -1 |awk '//{print $1}'`
- sudo docker cp $CONTAINER:$LLVM_HOME /usr/local/src
- export PATH=$LLVM_HOME/bin-6.0/bin:$PATH
- env: LLVM_VERSION=7.0 OS=Ubuntu14.04
before_install:
- sudo apt-get install -y libc6-dev-i386 g++-multilib lib32stdc++6
- docker pull $DOCKER_REPO_PATH:llvm70
- docker run $DOCKER_REPO_PATH:llvm70
- export CONTAINER=`docker ps --all |head -2 |tail -1 |awk '//{print $1}'`
- sudo docker cp $CONTAINER:$LLVM_HOME /usr/local/src
- export PATH=$LLVM_HOME/bin-7.0/bin:$PATH
- env: LLVM_VERSION=8.0 OS=Ubuntu14.04
before_install:
- sudo apt-get install -y libc6-dev-i386 g++-multilib lib32stdc++6
- docker pull $DOCKER_REPO_PATH:llvm80
- docker run $DOCKER_REPO_PATH:llvm80
- export CONTAINER=`docker ps --all |head -2 |tail -1 |awk '//{print $1}'`
- sudo docker cp $CONTAINER:$LLVM_HOME /usr/local/src
- export PATH=$LLVM_HOME/bin-8.0/bin:$PATH
script:
- mkdir build_$LLVM_VERSION && cd build_$LLVM_VERSION
- cmake -DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR ../
# Build ispc and check_isa utility. Run lit tests.
- make ispc check_isa check-all -j4
# Add ispc to the PATH
- export PATH=$ISPC_HOME/build_$LLVM_VERSION/bin:$PATH && cd $ISPC_HOME
- check_isa
- ./check_env.py
# Run examples
- ./perf.py -n 1
# Run tests for latest LLVM version
- if [ "$LLVM_VERSION" == "8.0" ]; then ./run_tests.py; ./run_tests.py -a x86; fi