Merge pull request #54 from japaric/gist

CI: gist the disassemblies
This commit is contained in:
Jorge Aparicio 2016-08-22 21:48:09 -05:00 committed by GitHub
commit 47c5322e3c
2 changed files with 29 additions and 12 deletions

View File

@ -7,6 +7,7 @@ install:
- ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe" - 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" - rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
- SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
- gem install gist
- rustc -Vv - rustc -Vv
- cargo -V - cargo -V
@ -17,8 +18,11 @@ test_script:
- cargo build --release - cargo build --release
- cargo test - cargo test
- cargo test --release - 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: branches:
only: only:

View File

@ -2,6 +2,11 @@ set -ex
. $(dirname $0)/env.sh . $(dirname $0)/env.sh
gist_it() {
gist -ap -f "'$1' from commit '$TRAVIS_COMMIT' on branch '$TRAVIS_BRANCH'"
echo "Disassembly available at the above URL."
}
build() { build() {
${CARGO:-cargo} build --target $TARGET ${CARGO:-cargo} build --target $TARGET
${CARGO:-cargo} build --target $TARGET --release ${CARGO:-cargo} build --target $TARGET --release
@ -11,18 +16,24 @@ inspect() {
$PREFIX$NM -g --defined-only target/**/debug/*.rlib $PREFIX$NM -g --defined-only target/**/debug/*.rlib
set +e set +e
$PREFIX$OBJDUMP -Cd target/**/release/*.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 set -e
# Check presence of weak symbols # Check presence of weak symbols
case $TRAVIS_OS_NAME in if [[ $TRAVIS_OS_NAME = "linux" ]]; then
linux) local symbols=( memcmp memcpy memmove memset )
local symbols=( memcmp memcpy memmove memset ) for symbol in "${symbols[@]}"; do
for symbol in "${symbols[@]}"; do $PREFIX$NM target/**/debug/deps/librlibc*.rlib | grep -q "W $symbol"
$PREFIX$NM target/**/debug/deps/librlibc*.rlib | grep -q "W $symbol" done
done fi
;;
esac
} }
run_tests() { run_tests() {
@ -38,12 +49,14 @@ run_tests() {
main() { main() {
if [[ $TRAVIS_OS_NAME == "linux" && ${IN_DOCKER_CONTAINER:-n} == "n" ]]; then if [[ $TRAVIS_OS_NAME == "linux" && ${IN_DOCKER_CONTAINER:-n} == "n" ]]; then
local tag=2016-08-13 local tag=2016-08-22
docker run \ docker run \
--privileged \ --privileged \
-e IN_DOCKER_CONTAINER=y \ -e IN_DOCKER_CONTAINER=y \
-e TARGET=$TARGET \ -e TARGET=$TARGET \
-e TRAVIS_BRANCH=$TRAVIS_BRANCH \
-e TRAVIS_COMMIT=$TRAVIS_COMMIT \
-e TRAVIS_OS_NAME=$TRAVIS_OS_NAME \ -e TRAVIS_OS_NAME=$TRAVIS_OS_NAME \
-v $(pwd):/mnt \ -v $(pwd):/mnt \
japaric/rustc-builtins:$tag \ japaric/rustc-builtins:$tag \