Clone ci scripts into folder

pull/4/head
Diego Barrios Romero 2018-11-18 17:37:57 +01:00
parent e378737f4d
commit 7491105873
3 changed files with 4 additions and 43 deletions

View File

@ -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:

View File

@ -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

View File

@ -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