Skip to content

Commit 0a7b06e

Browse files
committed
auto merge of #12726 : alexcrichton/rust/travis, r=brson
This version is slightly more up to date and is closer to the 3.5 that we're using. This also updates the travis config to have a build matrix which tests rust against LLVM 3.3 and 3.4. For pull requests only LLVM 3.4 is tested to reduce the load on travis. This is mostly just fluff, there's no real reason to gate rust on these results, it's more of just a nice thing to know when we break compatibility with LLVM 3.3 and 3.4 (and eventually 3.5). This turns off notifications of failed commits (which are sent out for pushes to master).
2 parents 68903f2 + 37b3a60 commit 0a7b06e

File tree

1 file changed

+31
-10
lines changed

1 file changed

+31
-10
lines changed

.travis.yml

+31-10
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,28 @@ language: c
55

66
# Before we start doing anything, install a stock LLVM
77
install:
8-
- sudo apt-get install llvm-3.3 llvm-3.3-dev clang-3.3 lldb-3.3
8+
- sudo sh -c "echo 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.4 main' >> /etc/apt/sources.list"
9+
- sudo sh -c "echo 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise main' >> /etc/apt/sources.list"
10+
- sudo sh -c "echo 'deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu precise main' >> /etc/apt/sources.list"
11+
- wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
12+
- sudo apt-get update -qq
13+
- sudo apt-get install -qq --force-yes -y llvm-$LLVM_VERSION
14+
llvm-${LLVM_VERSION}-dev clang-$LLVM_VERSION lldb-$LLVM_VERSION
915

10-
# All of the llvm tools are suffixed with "-3.3" which we don't want, so symlink
11-
# them all into a local directory and just use that
16+
17+
# All of the llvm tools are suffixed with "-$VERS" which we don't want, so
18+
# symlink them all into a local directory and just use that
1219
#
1320
# FIXME: this shouldn't update the src/llvm sub-repo, that takes about a minute
1421
# it's gotta download so much stuff.
1522
before_script:
1623
- mkdir -p local-llvm/bin
17-
- ln -nsf /usr/bin/llvm-config-3.3 local-llvm/bin/llvm-config
18-
- ln -nsf /usr/bin/llvm-mc-3.3 local-llvm/bin/llvm-mc
19-
- ln -nsf /usr/bin/llvm-as-3.3 local-llvm/bin/llvm-as
20-
- ln -nsf /usr/bin/llvm-dis-3.3 local-llvm/bin/llvm-dis
21-
- ln -nsf /usr/bin/llc-3.3 local-llvm/bin/llc
22-
- ln -nsf /usr/include/llvm-3.3 local-llvm/include
24+
- ln -nsf /usr/bin/llvm-config-$LLVM_VERSION local-llvm/bin/llvm-config
25+
- ln -nsf /usr/bin/llvm-mc-$LLVM_VERSION local-llvm/bin/llvm-mc
26+
- ln -nsf /usr/bin/llvm-as-$LLVM_VERSION local-llvm/bin/llvm-as
27+
- ln -nsf /usr/bin/llvm-dis-$LLVM_VERSION local-llvm/bin/llvm-dis
28+
- ln -nsf /usr/bin/llc-$LLVM_VERSION local-llvm/bin/llc
29+
- ln -nsf /usr/include/llvm-$LLVM_VERSION local-llvm/include
2330
- ./configure --disable-optimize-tests --llvm-root=`pwd`/local-llvm --enable-fast-make --enable-clang
2431

2532
# Tidy everything up first, then build a few things, and then run a few tests.
@@ -29,14 +36,28 @@ before_script:
2936
# As a result of https://github.com/travis-ci/travis-ci/issues/1066, we run
3037
# everything in one large command instead of multiple commands.
3138
script: |
39+
if [[ $TRAVIS_PULL_REQUEST != 'false' ]]; then
40+
if [[ $LLVM_VERSION != '3.4' ]]; then exit 0; fi
41+
fi &&
3242
make tidy &&
3343
make -j4 rustc-stage1 &&
3444
make check-stage1-std check-stage1-rpass check-stage1-cfail check-stage1-rfail
3545
3646
env:
37-
- NO_BENCH=1
47+
global:
48+
- NO_BENCH=1
49+
matrix:
50+
- LLVM_VERSION=3.3
51+
- LLVM_VERSION=3.4
3852

3953
# We track this ourselves, and in theory we don't have to update the LLVM repo
4054
# (but sadly we do right now anyway).
4155
git:
4256
submodules: false
57+
58+
notifications:
59+
email: false
60+
61+
branches:
62+
only:
63+
- master

0 commit comments

Comments
 (0)