From 5e867a2b984b92954f4560011cc7888072dd38a9 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 --- library/compiler-builtins/ci/install.sh | 12 ++++++++++++ library/compiler-builtins/ci/script.sh | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/library/compiler-builtins/ci/install.sh b/library/compiler-builtins/ci/install.sh index db862cc33490..08dce43d36c8 100644 --- a/library/compiler-builtins/ci/install.sh +++ b/library/compiler-builtins/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/library/compiler-builtins/ci/script.sh b/library/compiler-builtins/ci/script.sh index 84e7ee7af53e..89c535223e01 100644 --- a/library/compiler-builtins/ci/script.sh +++ b/library/compiler-builtins/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 ed393f32a19386cef17a2ec182844cc6a34e3fa1 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 --- library/compiler-builtins/appveyor.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/library/compiler-builtins/appveyor.yml b/library/compiler-builtins/appveyor.yml index 5cf0b48f1e9b..afca023dc989 100644 --- a/library/compiler-builtins/appveyor.yml +++ b/library/compiler-builtins/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 79411ae643aacaed213b796d691624ff6b1732f6 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 --- library/compiler-builtins/appveyor.yml | 5 ++-- library/compiler-builtins/ci/install.sh | 12 ---------- library/compiler-builtins/ci/script.sh | 32 +++++++++++++++---------- 3 files changed, 22 insertions(+), 27 deletions(-) diff --git a/library/compiler-builtins/appveyor.yml b/library/compiler-builtins/appveyor.yml index afca023dc989..ef3194cbe58c 100644 --- a/library/compiler-builtins/appveyor.yml +++ b/library/compiler-builtins/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/library/compiler-builtins/ci/install.sh b/library/compiler-builtins/ci/install.sh index 08dce43d36c8..db862cc33490 100644 --- a/library/compiler-builtins/ci/install.sh +++ b/library/compiler-builtins/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/library/compiler-builtins/ci/script.sh b/library/compiler-builtins/ci/script.sh index 89c535223e01..ef6905b28a90 100644 --- a/library/compiler-builtins/ci/script.sh +++ b/library/compiler-builtins/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 \