From 27cbb963a307624747b2febfb1c4715ffda118c4 Mon Sep 17 00:00:00 2001 From: Matt Ickstadt Date: Sun, 21 Aug 2016 16:51:50 -0500 Subject: [PATCH 1/3] travis: Use wgetpaste to post disassemblies to gist --- ci/install.sh | 12 ++++++++++++ ci/script.sh | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ci/install.sh b/ci/install.sh index db862cc33..08dce43d3 100644 --- a/ci/install.sh +++ b/ci/install.sh @@ -42,6 +42,17 @@ 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 @@ -49,6 +60,7 @@ main() { install_rust add_rustup_target install_xargo + install_wgetpaste fi } diff --git a/ci/script.sh b/ci/script.sh index 84e7ee7af..89c535223 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -2,6 +2,11 @@ set -ex . $(dirname $0)/env.sh +gist() { + wgetpaste -s gists -d "'$1' from commit '$TRAVIS_COMMIT' on branch '$TRAVIS_BRANCH'" + echo "Disassembly available at the above URL." +} + build() { ${CARGO:-cargo} build --target $TARGET ${CARGO:-cargo} build --target $TARGET --release @@ -11,7 +16,7 @@ inspect() { $PREFIX$NM -g --defined-only target/**/debug/*.rlib set +e - $PREFIX$OBJDUMP -Cd target/**/release/*.rlib + $PREFIX$OBJDUMP -Cd target/**/release/*.rlib | gist "$TARGET/rustc-builtins.rlib" set -e # Check presence of weak symbols From 5c9bfabcdfd3553d8ebd9c1620b3c31a23f9f359 Mon Sep 17 00:00:00 2001 From: Matt Ickstadt Date: Sun, 21 Aug 2016 17:04:48 -0500 Subject: [PATCH 2/3] appveyor: Use gist to post disassembly --- appveyor.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 5cf0b48f1..afca023dc 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,6 +7,7 @@ install: - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe" - rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust" - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin + - gem install gist - rustc -Vv - cargo -V @@ -17,8 +18,12 @@ test_script: - cargo build --release - cargo test - cargo test --release - - CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" - - dumpbin /disasm target/release/librustc_builtins.rlib || exit 0 + +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%'" branches: only: From 316f5cb9babaa40f0d78803c5a8afb07b308b5ff Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 22 Aug 2016 18:03:21 -0500 Subject: [PATCH 3/3] 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 | 30 +++++++++++++++++++----------- 3 files changed, 21 insertions(+), 26 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index afca023dc..ef3194cbe 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 08dce43d3..db862cc33 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 89c535223..ef6905b28 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" - 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 + $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 + 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 \