forked from serde-rs/json
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtravis.sh
More file actions
executable file
·47 lines (40 loc) · 997 Bytes
/
travis.sh
File metadata and controls
executable file
·47 lines (40 loc) · 997 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
channel() {
if [ -n "${TRAVIS}" ]; then
if [ "${TRAVIS_RUST_VERSION}" = "${CHANNEL}" ]; then
pwd
(set -x; cargo "$@")
fi
else
pwd
(set -x; cargo "+${CHANNEL}" "$@")
fi
}
if [ -n "${CLIPPY}" ]; then
# cached installation will not work on a later nightly
if [ -n "${TRAVIS}" ] && ! cargo install clippy --debug --force; then
echo "COULD NOT COMPILE CLIPPY, IGNORING CLIPPY TESTS"
exit
fi
cd "$DIR/json"
cargo clippy
cd "$DIR/json_tests"
cargo clippy
else
CHANNEL=nightly
cd "$DIR/json"
channel clean
channel build
channel build --features preserve_order
channel test
cd "$DIR/json_tests"
channel test
for CHANNEL in stable 1.12.0 1.13.0 beta; do
cd "$DIR/json"
channel clean
channel build
channel build --features preserve_order
done
fi