22
33set -ex
44
5+ OS=${1}
6+
57export RUST_BACKTRACE=full
68# export RUST_TEST_NOCAPTURE=1
79
10+ rustup update nightly
11+
812cargo +nightly install rustup-toolchain-install-master
9- if [ " ${TRAVIS_OS_NAME } " = " windows" ]; then
13+ if [ " ${OS } " = " windows" ]; then
1014 rustup-toolchain-install-master -f -n master -c rustc-dev -c llvm-tools -i x86_64-pc-windows-msvc
1115else
1216 rustup-toolchain-install-master -f -n master -c rustc-dev -c llvm-tools
@@ -16,12 +20,7 @@ rustup override set master
1620cargo build
1721cargo test --verbose -- --nocapture
1822
19- # avoid weird cygwin issues for now
20- if [ -n " $APPVEYOR " ]; then
21- exit 0
22- fi
23-
24- case " ${TRAVIS_OS_NAME} " in
23+ case " ${OS} " in
2524 * " linux" * )
2625 TEST_TARGET=x86_64-unknown-linux-gnu cargo test --verbose -- --nocapture
2726 ;;
@@ -33,11 +32,6 @@ case "${TRAVIS_OS_NAME}" in
3332 ;;
3433esac
3534
36- # FIXME: Sometimes we couldn't install semverver on Travis' Windows builder.
37- if [ " ${TRAVIS_OS_NAME} " != " linux" ]; then
38- exit 0
39- fi
40-
4135# install
4236mkdir -p ~ /rust/cargo/bin
4337cp target/debug/cargo-semver ~ /rust/cargo/bin
@@ -46,7 +40,7 @@ cp target/debug/rust-semverver ~/rust/cargo/bin
4640# become semververver
4741#
4842# Note: Because we rely on rust nightly building the previously published
49- # semver can often fail. To avoid failing the build we first check
43+ # semver can often fail. To avoid failing the build we first check
5044# if we can compile the previously published version.
5145if cargo install --root " $( mktemp -d) " semverver > /dev/null 2> /dev/null; then
5246 PATH=~ /rust/cargo/bin:$PATH cargo semver | tee semver_out
@@ -64,5 +58,5 @@ if cargo install --root "$(mktemp -d)" semverver > /dev/null 2>/dev/null; then
6458 exit 1
6559 fi
6660else
67- echo ' Failed to check semver-compliance of semverver. Failed to compiled previous version.' >&2
61+ echo ' Failed to check semver-compliance of semverver. Failed to compiled previous version.' >&2
6862fi
0 commit comments