diff --git a/ci/build-run-docker.sh b/ci/build-run-docker.sh index 1186c7faa2..cebbb04159 100644 --- a/ci/build-run-docker.sh +++ b/ci/build-run-docker.sh @@ -22,3 +22,10 @@ docker run \ -e SKIP_TESTS=$SKIP_TESTS \ -it $DOCKER \ ci/run-docker.sh + +# check that rustup-init was built with ssl support +# see https://github.com/rust-lang-nursery/rustup.rs/issues/1051 +if ! (nm target/$TARGET/release/rustup-init | grep Curl_ssl_version &> /dev/null); then + echo "Missing ssl support!!!!" >&2 + exit 1 +fi diff --git a/ci/run-docker.sh b/ci/run-docker.sh index 30d36ee8be..a6944f9142 100644 --- a/ci/run-docker.sh +++ b/ci/run-docker.sh @@ -147,17 +147,14 @@ esac install=`pwd`/target/$TARGET/openssl/openssl-install/$OPENSSL_VERS -if [ -e $install ]; then + +if [ -L $install -a -d $install-final ]; then + # $install is the "right" place for the build. See below for why it's a symlink echo 'Using cached OpenSSL static libs' else # Clean up any builds of previous versions from the cache rm -rf $(dirname $install)/* - # If the build fails half way through it will be difficult to distinguish when the next run sees - # the cached version, so finalize the build atomically. We're linking statically so don't need to - # worry about using a different prefix at install time. - final_install_path=$install - install=$install-partial mkdir -p target/$TARGET/openssl out=`pwd`/target/$TARGET/openssl/openssl-$OPENSSL_VERS.tar.gz @@ -173,8 +170,14 @@ else make -j4 && \ make install) - mv $install $final_install_path - install=$final_install_path + # Travis will cache the parent directory. That's fine, but want a way of marking the + # install "complete". In this setup, if the build fails there will be no -final and + # the whole thing starts again (which is fine). + # The same reasoning is why to cache the install-target directory rather than + # the build directory in the first place (make should be able to sort itself out in + # that case, but that's relying on intuitive timestamps in the presence of caching etc) + mv $install $install-final + ln -s $install-final $install fi # Variables to the openssl-sys crate to link statically against the OpenSSL we