mirror of https://github.com/eldruin/ds323x-rs
Consolidate variables
parent
a5c8b8afaa
commit
eb614c73a0
13
ci/script.sh
13
ci/script.sh
|
@ -1,24 +1,25 @@
|
|||
set -exo pipefail
|
||||
|
||||
main() {
|
||||
export CARGO_OPTIONS="--target $TARGET"
|
||||
if [[ ! $TARGET =~ .*linux.* ]]; then
|
||||
sed -i "s/linux-embedded-hal/#linux-embedded-hal/g" Cargo.toml
|
||||
sed -i "s/embedded-hal-mock/#embedded-hal-mock/g" Cargo.toml
|
||||
fi
|
||||
|
||||
if [ ! -z $FEATURES ]; then
|
||||
export FEATURES="--features $FEATURES"
|
||||
export CARGO_OPTIONS="$CARGO_OPTIONS --features $FEATURES"
|
||||
fi
|
||||
|
||||
cargo check --target $TARGET $FEATURES
|
||||
cargo build --target $TARGET --release $FEATURES
|
||||
cargo check $CARGO_OPTIONS
|
||||
cargo build $CARGO_OPTIONS
|
||||
if [ -z $DISABLE_EXAMPLES ] && [[ $TARGET =~ .*linux.* ]]; then
|
||||
cargo build --target $TARGET $FEATURES --examples
|
||||
cargo build $CARGO_OPTIONS --examples
|
||||
fi
|
||||
cargo doc --target $TARGET $FEATURES
|
||||
cargo doc $CARGO_OPTIONS
|
||||
|
||||
if [ -z $DISABLE_TESTS ] && [ $TRAVIS_RUST_VERSION = nightly ] && [[ $TARGET =~ .*linux.* ]]; then
|
||||
cargo test --target $TARGET $FEATURES
|
||||
cargo test $CARGO_OPTIONS
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue