|
| 1 | +# Use something that's not 'ruby' so we don't set up things like |
| 2 | +# RVM/bundler/ruby and whatnot. Right now 'rust' isn't a language on travis and |
| 3 | +# it treats unknown languages as ruby-like I believe. |
| 4 | +language: c |
| 5 | + |
| 6 | +# Before we start doing anything, install the latest stock LLVM. These are |
| 7 | +# maintained by LLVM, and more information can be found at llvm.org/apt. |
| 8 | +# |
| 9 | +# Right now, the highest version is 3.5, and our SVN version is roughly aligned |
| 10 | +# with the 3.5 API (hurray!) |
| 11 | +install: |
| 12 | + - sudo sh -c "echo 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise main' >> /etc/apt/sources.list" |
| 13 | + - sudo sh -c "echo 'deb-src http://llvm.org/apt/precise/ llvm-toolchain-precise main' >> /etc/apt/sources.list" |
| 14 | + - sudo sh -c "echo 'deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu precise main' >> /etc/apt/sources.list" |
| 15 | + - wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add - |
| 16 | + - sudo apt-get update -qq |
| 17 | + - sudo apt-get install -y --force-yes -qq llvm-3.5 llvm-3.5-dev clang-3.5 lldb-3.5 |
| 18 | + |
| 19 | +# All of the llvm tools are suffixed with "-3.5" which we don't want, so symlink |
| 20 | +# them all into a local directory and just use that |
| 21 | +# |
| 22 | +# FIXME: this shouldn't update the src/llvm sub-repo, that takes about a minute |
| 23 | +# it's gotta download so much stuff. |
| 24 | +before_script: |
| 25 | + - mkdir -p local-llvm/bin |
| 26 | + - ln -nsf /usr/bin/llvm-config-3.5 local-llvm/bin/llvm-config |
| 27 | + - ln -nsf /usr/bin/llvm-mc-3.5 local-llvm/bin/llvm-mc |
| 28 | + - ln -nsf /usr/bin/llvm-as-3.5 local-llvm/bin/llvm-as |
| 29 | + - ln -nsf /usr/bin/llvm-dis-3.5 local-llvm/bin/llvm-dis |
| 30 | + - ln -nsf /usr/bin/llc-3.5 local-llvm/bin/llc |
| 31 | + - ln -nsf /usr/include/llvm-3.5 local-llvm/include |
| 32 | + - ./configure --disable-optimize-tests --llvm-root=`pwd`/local-llvm --enable-fast-make --enable-clang |
| 33 | + |
| 34 | +# Tidy everything up first, then build a few things, and then run a few tests. |
| 35 | +# Note that this is meant to run in a "fairly small" amount of time, so this |
| 36 | +# isn't exhaustive at all. |
| 37 | +# |
| 38 | +# The "-lffi and -lncurses" are required for LLVM. The LLVM that rust builds |
| 39 | +# manually disables bringing in these two libraries, but the stock LLVM was |
| 40 | +# apparently built with these options. We provide these options when building so |
| 41 | +# the `rustc` binary can successfully link. |
| 42 | +script: |
| 43 | + - make tidy |
| 44 | + - RUSTFLAGS="-C link-args='-lffi -lncurses'" make -j4 rustc-stage1 |
| 45 | + - make check-stage1-std check-stage1-rpass check-stage1-cfail check-stage1-rfail |
| 46 | + |
| 47 | +env: |
| 48 | + - NO_BENCH=1 |
| 49 | + |
| 50 | +# We track this ourselves, and in theory we don't have to update the LLVM repo |
| 51 | +# (but sadly we do right now anyway). |
| 52 | +git: |
| 53 | + submodules: false |
0 commit comments