Initial commit
Much of the content here is a direct port from https://github.com/japaric/discovery
This commit is contained in:
35
ci/script.sh
Normal file
35
ci/script.sh
Normal file
@@ -0,0 +1,35 @@
|
||||
set -euxo pipefail
|
||||
|
||||
main() {
|
||||
# test that building the book works
|
||||
mdbook build
|
||||
|
||||
linkchecker book
|
||||
|
||||
# first (fast) pass: check that examples compile
|
||||
for chapter in $(echo src/*); do
|
||||
if [ ! -f $chapter/Cargo.toml ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
pushd $chapter
|
||||
cargo check
|
||||
popd
|
||||
done
|
||||
|
||||
# second (slow) pass: check that examples link
|
||||
for chapter in $(echo src/*); do
|
||||
if [ ! -f $chapter/Cargo.toml ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
pushd $chapter
|
||||
cargo build
|
||||
cargo build --release
|
||||
popd
|
||||
done
|
||||
}
|
||||
|
||||
if [ $TRAVIS_BRANCH != master ]; then
|
||||
main
|
||||
fi
|
||||
Reference in New Issue
Block a user