Skip to content

ratchet up travis to build stage1 #27028

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 17, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 24 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,38 @@
# Use something that's not 'ruby' so we don't set up things like
# RVM/bundler/ruby and whatnot. Right now 'rust' as a language actually
# downloads a rust/cargo snapshot, which we don't really want for building rust.
# ccache support is disabled unless your language is a C-derivative. However
# `language: C` unconditionally sets `CC=compiler`. If we just set it in our
# `env` it will be overwritten by the default (gcc 4.6).
language: c
compiler: /usr/bin/gcc-4.7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as an alternative to this, is travis' clang recent enough to compile llvm?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a big fan of trying to make this as vanilla as possible. Historically anything really custom has caused travis to spuriously break (e.g. check-stage-1)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't follow. I only meant to ask: would the following work (out of the box)?

language: c++
compiler: clang

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I had been scared away from trying clang due to existence of --enable-clang flags and previous nasty hacks surrounding clang and travis in the past. However it's worth a try.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😿 looks like it's clang 3.4 which also doesn't support c++11. thanks for trying it.

cache: ccache
sudo: false

# The test suite is in general way too stressful for travis, especially in
# terms of time limit and reliability. In the past we've tried to scale things
# back to only build the stage1 compiler and run a subset of tests, but this
# didn't end up panning out very well.
#
# As a result, we're just using travis to run `make tidy` now. It'll help
# everyone find out about their trailing spaces early on!
# As a result, we're just using travis to run `make tidy` and *only* build
# stage1 but *not* test it for now (a strict subset of the bootstrap). This will
# catch "obvious" errors like style or not even compiling.
#
# We need gcc4.7 or higher to build LLVM, and travis (well, Ubuntu 12.04)
# currently ships with 4.6. Gotta download our own.
before_script:
- ./configure --llvm-root=path/to/nowhere
- ./configure --enable-ccache
script:
- make tidy
- make rustc-stage1 -j4

env:
- CXX=/usr/bin/g++-4.7

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.7
- g++-4.7

# Real testing happens on http://buildbot.rust-lang.org/
#
Expand Down
34 changes: 23 additions & 11 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1016,15 +1016,12 @@ fi

if [ ! -z "$CFG_ENABLE_CCACHE" ]
then
if [ -z "$CC" ]
if [ -z "$CFG_CCACHE" ]
then
if [ -z "$CFG_CCACHE" ]
then
err "ccache requested but not found"
fi

CFG_CC="ccache $CFG_CC"
err "ccache requested but not found"
fi

CFG_CC="ccache $CFG_CC"
fi

if [ -z "$CC" -a -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
Expand Down Expand Up @@ -1513,11 +1510,26 @@ do

(*)
msg "inferring LLVM_CXX/CC from CXX/CC = $CXX/$CC"
LLVM_CXX_32="$CXX"
LLVM_CC_32="$CC"
if [ ! -z "$CFG_ENABLE_CCACHE" ]
then
if [ -z "$CFG_CCACHE" ]
then
err "ccache requested but not found"
fi

LLVM_CXX_32="ccache $CXX"
LLVM_CC_32="ccache $CC"

LLVM_CXX_64="ccache $CXX"
LLVM_CC_64="ccache $CC"
else
LLVM_CXX_32="$CXX"
LLVM_CC_32="$CC"

LLVM_CXX_64="$CXX"
LLVM_CC_64="$CC"
fi

LLVM_CXX_64="$CXX"
LLVM_CC_64="$CC"
;;
esac

Expand Down