forked from amethyst/amethyst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
85 lines (76 loc) · 1.94 KB
/
.travis.yml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
sudo: required
language: rust
addons:
apt:
packages:
- libasound2-dev
- libsdl2-dev
os:
- linux
- osx
- windows
rust:
- stable
- beta
- nightly
matrix:
fast_finish: true
allow_failures:
- os: windows
- rust: nightly
branches:
only:
- staging
- trying
before_install:
- |
if [ ${TRAVIS_OS_NAME} == "windows" ]
then
wget --no-check-certificate https://www.libsdl.org/release/SDL2-devel-2.0.8-VC.zip
7z x SDL2-devel-2.0.8-VC.zip
cp SDL2-2.0.8/lib/x64/*.lib ${HOME}/.rustup/toolchains/${TRAVIS_RUST_VERSION}-x86_64-pc-windows-msvc/lib/rustlib/x86_64-pc-windows-msvc/lib
cp SDL2-2.0.8/lib/x64/*.dll .
rm SDL2-devel-2.0.8-VC.zip
elif [ ${TRAVIS_OS_NAME} == "osx" ]
then
brew update && brew install sdl2
else
export MDBOOK_RELEASE="v0.2.1/mdbook-v0.2.1-x86_64-unknown-linux-gnu.tar.gz"
curl -L -o mdbook.tar.gz https://github.com/rust-lang-nursery/mdBook/releases/download/${MDBOOK_RELEASE}
tar -xvf mdbook.tar.gz -C ./
rm mdbook.tar.gz
fi
before_script:
- export PATH=$PATH:/home/travis/.cargo/bin
- |
if [ ${TRAVIS_RUST_VERSION} == "stable" ]
then
export RUSTFLAGS="-D warnings"
fi
- export ALL_FEATURES="sdl_controller,profiler,json,saveload" # all except nightly
# Generate documentation, compile the engine, run tests.
script:
- |
echo "Build and test"
cargo test --all --tests --benches --features $ALL_FEATURES || exit 1
cargo test --all --doc --features $ALL_FEATURES
- |
if [ ${TRAVIS_RUST_VERSION} == "stable" ] && [ ${TRAVIS_OS_NAME} == "linux" ]
then
echo "Test book"
./mdbook test book -L target/debug/deps
fi
- |
if [ ${TRAVIS_RUST_VERSION} == "stable" ]
then
echo "Check common features"
cargo check --all --features sdl_controller,profiler,json
fi
- |
if [ ${TRAVIS_RUST_VERSION} == "nightly" ]
then
echo "Check common features"
cargo check --all --no-default-features
cargo check --all
cargo check --all --all-features
fi