-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
72 lines (62 loc) · 1.34 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
sudo: required
language: rust
addons:
apt:
packages:
- libasound2-dev
- libsdl2-dev
os:
- linux
- osx
- windows
rust:
- stable
- beta
- nightly
matrix:
exclude:
- rust: beta
os: osx
- rust: beta
os: windows
fast_finish: true
allow_failures:
- rust: nightly
branches:
only:
- master
cache:
cargo: true
apt: true
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
fi
before_script:
- export PATH=$PATH:/home/travis/.cargo/bin
- export RUSTFLAGS="-D warnings"
- rustup component add rustfmt-preview clippy-preview
# Generate documentation, compile the engine, run tests.
script:
- |
if [ ${TRAVIS_RUST_VERSION} == "stable" ]
then
echo "Verifying formatting"
cargo fmt --all -- --check || exit 1
fi
if [ ${TRAVIS_RUST_VERSION} == "beta" ]
then
cargo clippy --all-targets --all-features -- -D warnings
fi
- |
echo "Build and test"
cargo test --all || exit 1