Initial commit

Much of the content here is a direct port from https://github.com/japaric/discovery
This commit is contained in:
Michael Droogleever
2018-07-02 23:01:03 +02:00
commit 8e05dfd010
32 changed files with 2513 additions and 0 deletions

19
ci/after-success.sh Normal file
View File

@@ -0,0 +1,19 @@
set -euxo pipefail
main() {
mdbook build
mkdir ghp-import
curl -Ls https://github.com/davisp/ghp-import/archive/master.tar.gz |
tar --strip-components 1 -C ghp-import -xz
./ghp-import/ghp_import.py book
set +x
git push -fq https://$GH_TOKEN@github.com/$TRAVIS_REPO_SLUG.git gh-pages && echo OK
}
if [ $TRAVIS_BRANCH = master ]; then
main
fi

19
ci/install.sh Normal file
View File

@@ -0,0 +1,19 @@
set -euxo pipefail
main() {
curl -LSfs https://japaric.github.io/trust/install.sh | \
sh -s -- \
--force \
--git rust-lang-nursery/mdBook \
--tag v0.1.5 \
--target x86_64-unknown-linux-musl
rustup target add thumbv6m-none-eabi
pip install linkchecker --user
# sanity check that a linker is present
which arm-none-eabi-ld
}
main

35
ci/script.sh Normal file
View 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