mirror of https://github.com/eldruin/ds323x-rs
Clone ci scripts into folder
parent
e378737f4d
commit
7491105873
|
@ -3,7 +3,7 @@ language: rust
|
||||||
sudo: required
|
sudo: required
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
bash <(curl -s https://github.com/eldruin/rust-driver-ci-scripts/raw/master/global_before_script.sh)
|
git clone https://github.com/eldruin/rust-driver-ci-scripts ci
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
@ -54,10 +54,10 @@ before_install:
|
||||||
- rustup self update
|
- rustup self update
|
||||||
|
|
||||||
install:
|
install:
|
||||||
bash <(curl -s https://github.com/eldruin/rust-driver-ci-scripts/raw/master/install.sh)
|
bash ci/install.sh
|
||||||
|
|
||||||
script:
|
script:
|
||||||
bash <(curl -s https://github.com/eldruin/rust-driver-ci-scripts/raw/master/script.sh)
|
bash ci/script.sh
|
||||||
|
|
||||||
after_script: set +e
|
after_script: set +e
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ cache:
|
||||||
- /home/travis/.cargo
|
- /home/travis/.cargo
|
||||||
|
|
||||||
before_cache:
|
before_cache:
|
||||||
bash <(curl -s https://github.com/eldruin/rust-driver-ci-scripts/raw/master/before_cache.sh)
|
bash ci/before_cache.sh
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
set -euxo pipefail
|
|
||||||
|
|
||||||
main() {
|
|
||||||
rustup component add rust-src
|
|
||||||
SYSROOT=$(rustc --print sysroot)
|
|
||||||
if [[ ! "$SYSROOT" =~ "$TARGET" ]]; then
|
|
||||||
rustup target add $TARGET
|
|
||||||
else
|
|
||||||
echo "Target $TARGET is already installed"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
main
|
|
26
ci/script.sh
26
ci/script.sh
|
@ -1,26 +0,0 @@
|
||||||
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 CARGO_OPTIONS="$CARGO_OPTIONS --features $FEATURES"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cargo check $CARGO_OPTIONS
|
|
||||||
cargo build $CARGO_OPTIONS
|
|
||||||
if [ -z $DISABLE_EXAMPLES ] && [[ $TARGET =~ .*linux.* ]]; then
|
|
||||||
cargo build $CARGO_OPTIONS --examples
|
|
||||||
fi
|
|
||||||
cargo doc $CARGO_OPTIONS
|
|
||||||
|
|
||||||
if [ -z $DISABLE_TESTS ] && [[ $TARGET =~ .*linux.* ]]; then
|
|
||||||
cargo test $CARGO_OPTIONS
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
main
|
|
Loading…
Reference in New Issue