1
1
language : rust
2
2
3
- cache : cargo
4
-
5
- sudo : required
6
-
3
+ # We need this for the matrix, install is quick although unused
7
4
rust :
8
5
- stable
9
6
- beta
10
7
- nightly
11
8
12
- os :
13
- - linux
9
+ sudo : required
14
10
15
11
dist : trusty
16
12
13
+ # We cannot cache .vagga, because we actually do not have read permissions
14
+ # without sudo and travis cache script runs not as sudo...
15
+ cache :
16
+ directories :
17
+ - .vagga/stable-home
18
+ - .vagga/beta-home
19
+ - .vagga/nightly-home
20
+ - .vagga/.cache
21
+
17
22
addons :
18
23
apt :
19
24
packages :
20
- - libssl-dev
21
- - libudev-dev
22
- - libgbm-dev
23
- - libxkbcommon-dev
24
- - libegl1-mesa-dev
25
-
26
- before_install :
27
- - sudo add-apt-repository -y ppa:wayland.admin/daily-builds
28
- - sudo apt-get update -qq || echo "Ignoring failed apt-get update..."
29
- - sudo apt-get install -y libwayland-dev libinput-dev
30
-
31
- branches :
32
- only :
33
- - master
25
+ - libcurl4-openssl-dev
26
+ - libelf-dev
27
+ - libdw-dev
34
28
35
29
env :
36
- global :
37
- - RUST_BACKTRACE=1
38
30
matrix :
39
31
- FEATURES=""
40
32
# test individual features
@@ -58,38 +50,36 @@ matrix:
58
50
- rust : nightly
59
51
60
52
before_script :
61
- - export PATH=$HOME/.local/bin:$HOME/.cargo/bin:$PATH
62
- - |
63
- if [ "$FEATURES" = "cargo-fmt" ]; then
64
- cargo install rustfmt-nightly --force;
65
- fi
53
+ - ' echo ubuntu-mirror: http://mirrors.us.kernel.org/ubuntu/ > ~/.vagga.yaml'
54
+ - ' echo alpine-mirror: http://mirrors.gigenet.com/alpinelinux/ >> ~/.vagga.yaml'
66
55
- |
67
- if [ "$FEATURES" = "cargo-clippy" ]; then
68
- cargo install clippy --force;
69
- fi
70
- - mkdir $(pwd)/socket
71
- - export XDG_RUNTIME_DIR="$(pwd)/socket"
56
+ echo "$(id -un):100000:65536" | sudo tee /etc/subuid | sudo tee /etc/subgid
57
+ sudo apt-get install uidmap -y
58
+ curl http://files.zerogw.com/vagga/vagga-install.sh | sh
59
+ - vagga update-$TRAVIS_RUST_VERSION
72
60
73
61
script :
74
62
- |
75
63
case $FEATURES in
76
64
"all")
77
- cargo test --all-features &&
78
- cargo doc --no-deps --all-features
65
+ vagga cargo-$TRAVIS_RUST_VERSION test --all-features &&
66
+ vagga cargo-$TRAVIS_RUST_VERSION doc --no-deps --all-features
79
67
;;
80
68
"default")
81
- cargo test &&
82
- cargo doc --no-deps
69
+ vagga cargo-$TRAVIS_RUST_VERSION test &&
70
+ vagga cargo-$TRAVIS_RUST_VERSION doc --no-deps
83
71
;;
84
72
"cargo-fmt")
85
- cargo fmt -- --write-mode=diff
73
+ vagga cargo-$TRAVIS_RUST_VERSION install -f rustfmt-nightly &&
74
+ vagga cargo-$TRAVIS_RUST_VERSION fmt -- --write-mode=diff
86
75
;;
87
76
"cargo-clippy")
88
- cargo clippy --all-features -- -D warnings
77
+ vagga cargo-$TRAVIS_RUST_VERSION install -f clippy &&
78
+ vagga cargo-$TRAVIS_RUST_VERSION clippy --all-features -- -D warnings
89
79
;;
90
80
*)
91
- cargo test --lib --doc --tests --no-default-features --features "$FEATURES" &&
92
- cargo doc --no-deps --no-default-features --features "$FEATURES"
81
+ vagga cargo-$TRAVIS_RUST_VERSION test --lib --doc --tests --no-default-features --features "$FEATURES" &&
82
+ vagga cargo-$TRAVIS_RUST_VERSION doc --no-deps --no-default-features --features "$FEATURES"
93
83
esac
94
84
95
85
after_success :
@@ -106,9 +96,9 @@ deploy:
106
96
condition : " $FEATURES = all"
107
97
108
98
notifications :
109
- webhooks :
110
- urls :
111
- - " https://scalar.vector.im/api/neb/services/hooks/dHJhdmlzLWNpLyU0MGxldmFucyUzQXNhZmFyYWRlZy5uZXQvJTIxRkt4aGprSUNwakJWelZlQ2RGJTNBc2FmYXJhZGVnLm5ldA"
112
- on_success : change
113
- on_failure : always
114
- on_start : never
99
+ webhooks :
100
+ urls :
101
+ - " https://scalar.vector.im/api/neb/services/hooks/dHJhdmlzLWNpLyU0MGxldmFucyUzQXNhZmFyYWRlZy5uZXQvJTIxRkt4aGprSUNwakJWelZlQ2RGJTNBc2FmYXJhZGVnLm5ldA"
102
+ on_success : change
103
+ on_failure : always
104
+ on_start : never
0 commit comments