drop Xargo

This commit is contained in:
Jorge Aparicio 2018-04-13 16:26:16 +02:00
parent 9fc5f71799
commit 301c1becdf
3 changed files with 14 additions and 38 deletions

View File

@ -33,10 +33,7 @@ script:
after_script: set +e
cache:
cargo: true
directories:
- $HOME/.xargo
cache: cargo
before_cache:
# Travis can't cache files that are not readable by "others"

View File

@ -1,21 +1,9 @@
set -euxo pipefail
main() {
# install latest Xargo
local tag=$(git ls-remote --tags --refs --exit-code https://github.com/japaric/xargo \
| cut -d/ -f3 \
| grep -E '^v[0-9.]+$' \
| sort --version-sort \
| tail -n1)
curl -LSfs https://japaric.github.io/trust/install.sh | \
sh -s -- \
--force \
--git japaric/xargo \
--target x86_64-unknown-linux-musl \
--tag $tag
rustup component list | grep 'rust-src.*installed' || \
rustup component add rust-src
if [ $TARGET != x86_64-unknown-linux-gnu ]; then
rustup target add $TARGET
fi
}
main

View File

@ -1,28 +1,19 @@
set -euxo pipefail
main() {
case $TARGET in
thumb*m-none-eabi)
xargo check --target $TARGET
;;
x86_64-unknown-linux-gnu)
cargo check --target $TARGET
cargo check --target $TARGET
cargo test --target $TARGET
cargo test --target $TARGET --release
if [ $TARGET = x86_64-unknown-linux-gnu ]; then
cargo test --target $TARGET
cargo test --target $TARGET --release
export RUSTFLAGS="-Z sanitizer=thread"
export RUST_TEST_THREADS=1
export TSAN_OPTIONS="suppressions=$(pwd)/blacklist.txt"
export RUSTFLAGS="-Z sanitizer=thread"
export RUST_TEST_THREADS=1
export TSAN_OPTIONS="suppressions=$(pwd)/blacklist.txt"
cargo test --test tsan --target $TARGET
cargo test --test tsan --target $TARGET --release
;;
*)
# unhandled case
exit 1
;;
esac
cargo test --test tsan --target $TARGET
cargo test --test tsan --target $TARGET --release
fi
}
main