From 746ae7625b0aa5f8f1ff3985a0b2ce9a8293c700 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Thu, 12 Jun 2014 00:51:40 +0530 Subject: [PATCH] Use downloaded snapshots instead of in-tree rust. Also a working linux travis conf --- .travis.yml | 28 ++++++++++++++++++++++++++++ configure | 21 +++++++++++++++++++++ src/compiler/rust | 2 +- src/compiler/rust-snapshot-hash | 1 + 4 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 .travis.yml create mode 100644 src/compiler/rust-snapshot-hash diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000000..e0daa5fb943 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,28 @@ +language: c + +install: + - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y + - sudo apt-get update -q + - sudo apt-get install -qq --force-yes -y autoconf2.13 gperf libxxf86vm-dev libglfw-dev libstdc++6-4.7-dev + - echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections + - sudo apt-get install ttf-mscorefonts-installer > /dev/null +before_script: + - mkdir -p build + +script: | + cd build + ../configure + make -j2 + make check + +git: + submodules: true + +notifications: + email: false + +branches: + only: + - travis + - master +after_success: diff --git a/configure b/configure index 28237a8e4e2..de08902deb6 100755 --- a/configure +++ b/configure @@ -401,6 +401,26 @@ probe CFG_CLANG clang++ CFG_BUILD_DIR="${CFG_BUILD_HOME}${CFG_TARGET}/" make_dir "${CFG_BUILD_DIR}" +SNAPSHOT_VERSION=$(cat ${CFG_SRC_DIR}/src/compiler/rust-snapshot-hash | rev | cut -d/ -f1 | rev) +if [ $CFG_OSTYPE = "linux-androideabi" ] +then +CFG_TREE_RUST=1 # We don't yet have Android snapshots +fi +if [ -z "$CFG_TREE_RUST" ] +then + if ! [ -f ${CFG_BUILD_DIR}/rust_snapshot/${SNAPSHOT_VERSION}-${DEFAULT_TARGET}/bin/rustc -a -f ${CFG_BUILD_DIR}/src/compiler/rust-snapshot-hash-stamp -a -z "$(diff ${CFG_BUILD_DIR}/src/compiler/rust-snapshot-hash-stamp ${CFG_SRC_DIR}/src/compiler/rust-snapshot-hash)" ] + then + rm -rf ${CFG_BUILD_DIR}/rust_snapshot + make_dir ${CFG_BUILD_DIR}/rust_snapshot + make_dir ${CFG_BUILD_DIR}/src/compiler/rust + SNAPSHOT_URL="http://servo-rust.s3.amazonaws.com/$(cat ${CFG_SRC_DIR}/src/compiler/rust-snapshot-hash)-${DEFAULT_TARGET}.tar.gz" + step_msg "Fetching snapshot from ${SNAPSHOT_URL}" + curl -o ${CFG_BUILD_DIR}/rust_snapshot/snapshot.tgz ${SNAPSHOT_URL} + tar -zxf ${CFG_BUILD_DIR}/rust_snapshot/snapshot.tgz -C ${CFG_BUILD_DIR}/rust_snapshot/ + cp -f ${CFG_SRC_DIR}/src/compiler/rust-snapshot-hash ${CFG_BUILD_DIR}/src/compiler/rust-snapshot-hash-stamp + fi + CFG_LOCAL_RUST_ROOT=${CFG_BUILD_DIR}/rust_snapshot/${SNAPSHOT_VERSION}-${DEFAULT_TARGET} +fi if [ ! -z "$CFG_LOCAL_RUST_ROOT" ] then @@ -560,6 +580,7 @@ putvar CFG_RUST_HOME putvar CFG_PATH putvar CFG_LOCAL_RUSTC putvar CFG_LOCAL_RUST_ROOT +putvar CFG_TREE_RUST putvar CFG_ENABLE_DEBUG putvar CFG_ENABLE_DEBUG_SKIA diff --git a/src/compiler/rust b/src/compiler/rust index d35a3808708..0935beba717 160000 --- a/src/compiler/rust +++ b/src/compiler/rust @@ -1 +1 @@ -Subproject commit d35a38087088301aa58f244ae99d48b282df6fb2 +Subproject commit 0935beba717bf6d3b54ad1b2eace359dea5dfca0 diff --git a/src/compiler/rust-snapshot-hash b/src/compiler/rust-snapshot-hash new file mode 100644 index 00000000000..76aadf38dd4 --- /dev/null +++ b/src/compiler/rust-snapshot-hash @@ -0,0 +1 @@ +0935beba717bf6d3b54ad1b2eace359dea5dfca0/rust-0.11.0-pre