ci: cleanup

This cleans up our CI scripts but doesn't significantly change anything.
Mostly this is removing dead code and wrong comments, and making the style
a bit more consistent.
This commit is contained in:
Andrew Gallant
2018-02-04 12:14:38 -05:00
parent 224c112e05
commit b50ae9a99c
6 changed files with 60 additions and 111 deletions

18
ci/script.sh Normal file → Executable file
View File

@@ -1,19 +1,10 @@
# `script` phase: you usually build, test and generate docs in this phase
#!/bin/bash
# build, test and generate docs in this phase
set -ex
. $(dirname $0)/utils.sh
# NOTE Workaround for rust-lang/rust#31907 - disable doc tests when cross compiling
# This has been fixed in the nightly channel but it would take a while to reach the other channels
disable_cross_doctests() {
if [ $(host) != "$TARGET" ] && [ "$TRAVIS_RUST_VERSION" = "stable" ]; then
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
brew install gnu-sed --default-names
fi
find src -name '*.rs' -type f | xargs sed -i -e 's:\(//.\s*```\):\1 ignore,:g'
fi
}
. "$(dirname $0)/utils.sh"
main() {
# disable_cross_doctests
@@ -22,7 +13,6 @@ main() {
cargo test --target "${TARGET}" --verbose --all
"$( dirname "${0}" )/test_complete.sh"
fi
# sanity check the file type
file target/$TARGET/debug/rg
}