forked from amethyst/amethyst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
70 lines (61 loc) · 1.5 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
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:
- 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
- export RUSTFLAGS="-D warnings"
# Generate documentation, compile the engine, run tests.
script:
- |
echo "Build and test"
cargo test --all || exit 1
- |
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
fi