From 316f5cb9babaa40f0d78803c5a8afb07b308b5ff Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 22 Aug 2016 18:03:21 -0500 Subject: [PATCH] use the gist crate but not on OSX because it doesn't work there closes #53 cc #51 --- appveyor.yml | 5 ++--- ci/install.sh | 12 ------------ ci/script.sh | 32 ++++++++++++++++++++------------ 3 files changed, 22 insertions(+), 27 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index afca023..ef3194c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,9 +21,8 @@ test_script: on_success: - cmd: | - CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" - dumpbin /disasm target/release/librustc_builtins.rlib | - gist -d "'%TARGET%/rustc-builtins.rlib' from commit '%APPVEYOR_REPO_COMMIT%' on branch '%APPVEYOR_REPO_branch%'" + CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" + dumpbin /disasm target/release/librustc_builtins.rlib | gist -d "'%TARGET%/rustc-builtins.rlib' from commit '%APPVEYOR_REPO_COMMIT%' on branch '%APPVEYOR_REPO_branch%'" branches: only: diff --git a/ci/install.sh b/ci/install.sh index 08dce43..db862cc 100644 --- a/ci/install.sh +++ b/ci/install.sh @@ -42,17 +42,6 @@ install_xargo() { fi } -install_wgetpaste() { - if [[ $TRAVIS_OS_NAME == "osx" ]]; then - brew install wgetpaste - else - curl -O http://wgetpaste.zlin.dk/wgetpaste-2.28.tar.bz2 - tar -xvf wgetpaste-2.28.tar.bz2 - sudo mv ./wgetpaste-2.28/wgetpaste /usr/bin - rm -r wgetpaste-2.28* - fi -} - main() { if [[ $TRAVIS_OS_NAME == "osx" || ${IN_DOCKER_CONTAINER:-n} == "y" ]]; then install_qemu @@ -60,7 +49,6 @@ main() { install_rust add_rustup_target install_xargo - install_wgetpaste fi } diff --git a/ci/script.sh b/ci/script.sh index 89c5352..ef6905b 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -2,8 +2,8 @@ set -ex . $(dirname $0)/env.sh -gist() { - wgetpaste -s gists -d "'$1' from commit '$TRAVIS_COMMIT' on branch '$TRAVIS_BRANCH'" +gist_it() { + gist -ap -f "'$1' from commit '$TRAVIS_COMMIT' on branch '$TRAVIS_BRANCH'" echo "Disassembly available at the above URL." } @@ -16,18 +16,24 @@ inspect() { $PREFIX$NM -g --defined-only target/**/debug/*.rlib set +e - $PREFIX$OBJDUMP -Cd target/**/release/*.rlib | gist "$TARGET/rustc-builtins.rlib" + case $TRAVIS_OS_NAME in + linux) + $PREFIX$OBJDUMP -Cd target/**/release/*.rlib | gist_it "$TARGET/rustc-builtins.rlib" + ;; + osx) + $PREFIX$OBJDUMP -Cd target/**/release/*.rlib + ;; + esac set -e # Check presence of weak symbols - case $TRAVIS_OS_NAME in - linux) - local symbols=( memcmp memcpy memmove memset ) - for symbol in "${symbols[@]}"; do - $PREFIX$NM target/**/debug/deps/librlibc*.rlib | grep -q "W $symbol" - done - ;; - esac + if [[ $TRAVIS_OS_NAME = "linux" ]]; then + local symbols=( memcmp memcpy memmove memset ) + for symbol in "${symbols[@]}"; do + $PREFIX$NM target/**/debug/deps/librlibc*.rlib | grep -q "W $symbol" + done + fi + } run_tests() { @@ -43,12 +49,14 @@ run_tests() { main() { if [[ $TRAVIS_OS_NAME == "linux" && ${IN_DOCKER_CONTAINER:-n} == "n" ]]; then - local tag=2016-08-13 + local tag=2016-08-22 docker run \ --privileged \ -e IN_DOCKER_CONTAINER=y \ -e TARGET=$TARGET \ + -e TRAVIS_BRANCH=$TRAVIS_BRANCH \ + -e TRAVIS_COMMIT=$TRAVIS_COMMIT \ -e TRAVIS_OS_NAME=$TRAVIS_OS_NAME \ -v $(pwd):/mnt \ japaric/rustc-builtins:$tag \