Skip to content

Commit b0d4bdc

Browse files
committed
Fix travis build with updated libinput
1 parent ed21741 commit b0d4bdc

File tree

3 files changed

+114
-46
lines changed

3 files changed

+114
-46
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ target
22
Cargo.lock
33
*.bk
44
.vscode
5+
.vagga

.travis.yml

Lines changed: 36 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,32 @@
11
language: rust
22

3-
cache: cargo
4-
5-
sudo: required
6-
3+
# We need this for the matrix, install is quick although unused
74
rust:
85
- stable
96
- beta
107
- nightly
118

12-
os:
13-
- linux
9+
sudo: required
1410

1511
dist: trusty
1612

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+
1722
addons:
1823
apt:
1924
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
3428

3529
env:
36-
global:
37-
- RUST_BACKTRACE=1
3830
matrix:
3931
- FEATURES=""
4032
# test individual features
@@ -58,38 +50,36 @@ matrix:
5850
- rust: nightly
5951

6052
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'
6655
- |
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
7260

7361
script:
7462
- |
7563
case $FEATURES in
7664
"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
7967
;;
8068
"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
8371
;;
8472
"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
8675
;;
8776
"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
8979
;;
9080
*)
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"
9383
esac
9484
9585
after_success:
@@ -106,9 +96,9 @@ deploy:
10696
condition: "$FEATURES = all"
10797

10898
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

vagga.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
minimum-vagga: v0.5.0
2+
3+
containers:
4+
base:
5+
auto-clean: true
6+
setup:
7+
- !UbuntuRelease { codename: artful }
8+
- !UbuntuUniverse
9+
- !Install [build-essential, wget, curl, pkg-config, file, openssl, sudo, ca-certificates, libssl-dev, cmake, libudev-dev, libgbm-dev, libxkbcommon-dev, libegl1-mesa-dev, libwayland-dev, libinput-dev]
10+
11+
stable:
12+
auto-clean: true
13+
environ:
14+
HOME: /work/.vagga/stable-home
15+
PATH: /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/work/.vagga/stable-home/.cargo/bin:/work/.vagga/stable-home/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/
16+
RUST_BACKTRACE: 1
17+
XDG_RUNTIME_DIR: /work/.vagga/stable-home
18+
setup:
19+
- !Container base
20+
- !Env HOME: /work/.vagga/stable-home
21+
- !Sh curl https://sh.rustup.rs -sSf | sh -s -- -y --default-host x86_64-unknown-linux-gnu --default-toolchain stable --no-modify-path
22+
23+
beta:
24+
auto-clean: true
25+
environ:
26+
HOME: /work/.vagga/beta-home
27+
PATH: /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/work/.vagga/beta-home/.cargo/bin:/work/.vagga/beta-home/.rustup/toolchains/beta-x86_64-unknown-linux-gnu/bin/
28+
RUST_BACKTRACE: 1
29+
XDG_RUNTIME_DIR: /work/.vagga/beta-home
30+
setup:
31+
- !Container base
32+
- !Env HOME: /work/.vagga/beta-home
33+
- !Sh curl https://sh.rustup.rs -sSf | sh -s -- -y --default-host x86_64-unknown-linux-gnu --default-toolchain beta --no-modify-path
34+
35+
nightly:
36+
auto-clean: true
37+
environ:
38+
HOME: /work/.vagga/nightly-home
39+
PATH: /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/work/.vagga/nightly-home/.cargo/bin:/work/.vagga/nightly-home/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/
40+
RUST_BACKTRACE: 1
41+
XDG_RUNTIME_DIR: /work/.vagga/nightly-home
42+
setup:
43+
- !Container base
44+
- !Env HOME: /work/.vagga/nightly-home
45+
- !Sh curl https://sh.rustup.rs -sSf | sh -s -- -y --default-host x86_64-unknown-linux-gnu --default-toolchain nightly --no-modify-path
46+
47+
commands:
48+
update-stable: !Command
49+
description: Update container
50+
container: stable
51+
run: rustup update
52+
53+
update-beta: !Command
54+
description: Update container
55+
container: beta
56+
run: rustup update
57+
58+
update-nightly: !Command
59+
description: Update container
60+
container: nightly
61+
run: |
62+
rustup update
63+
64+
cargo-stable: !Command
65+
description: Run cargo
66+
container: stable
67+
run: ["/work/.vagga/stable-home/.cargo/bin/cargo"]
68+
69+
cargo-beta: !Command
70+
description: Run cargo
71+
container: beta
72+
run: ["/work/.vagga/beta-home/.cargo/bin/cargo"]
73+
74+
cargo-nightly: !Command
75+
description: Run cargo
76+
container: nightly
77+
run: ["/work/.vagga/nightly-home/.cargo/bin/cargo"]

0 commit comments

Comments
 (0)