Skip to content

Commit 02a37e0

Browse files
author
Jorge Aparicio
committed
disable doc tests when crossing
1 parent 5e78697 commit 02a37e0

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

ci/script.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,23 @@
22

33
set -ex
44

5+
case "$TRAVIS_OS_NAME" in
6+
linux)
7+
host=x86_64-unknown-linux-gnu
8+
;;
9+
osx)
10+
host=x86_64-apple-darwin
11+
;;
12+
esac
13+
14+
# NOTE Workaround for rust-lang/rust#31907 - disable doc tests when crossing
15+
if [ "$host" != "$TARGET" ]; then
16+
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
17+
brew install gnu-sed --default-names
18+
fi
19+
20+
find src -name '*.rs' -type f | xargs sed -i -e 's:\(//.\s*```\):\1 ignore,:g'
21+
fi
22+
523
cargo build --target $TARGET --verbose
624
cargo test --target $TARGET --verbose

0 commit comments

Comments
 (0)