Skip to content

Commit 2f4cd8f

Browse files
authored
Merge pull request #102 from benesch/ci-speedup
Speed up CI
2 parents a594375 + 610d6f8 commit 2f4cd8f

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

.travis.yml

+19-2
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,41 @@
1-
dist: trusty
1+
dist: xenial
22
sudo: required
33
cache: cargo
44
language: rust
55
addons:
66
apt:
77
packages:
8+
- kcov
89
- libcurl4-openssl-dev
910
- libelf-dev
1011
- libdw-dev
1112
- binutils-dev
1213
- cmake
1314
sources:
1415
- kalakris-cmake
16+
# The version of kcov shipped with Xenial (v25) doesn't support the
17+
# --verify option that `cargo coveralls` passes. This PPA has a more
18+
# up-to-date version. It can be removed if Ubuntu ever ships a newer
19+
# version, or replaced with another PPA if this one falls out of date.
20+
- sourceline: ppa:sivakov512/kcov
1521

1622
rust:
1723
- stable
1824

1925
before_script:
2026
- pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH
21-
- cargo install --force cargo-travis && export PATH=$HOME/.cargo/bin:$PATH
27+
- export PATH=$HOME/.cargo/bin:$PATH
28+
# `cargo install` fails if the specified binary is already installed, and
29+
# doesn't yet support a `--if-not-installed` option [0], so for now assume
30+
# failures mean the package is already installed. If installation truly
31+
# failed, the build will fail later anyway, when we try to use the installed
32+
# binary. Note that `cargo install --force` is not a solution, as it always
33+
# rebuilds from scratch, ignoring the cache entirely.
34+
#
35+
# [0]: https://github.com/rust-lang/cargo/issues/2082
36+
- cargo install cargo-update || echo "cargo-update already installed"
37+
- cargo install cargo-travis || echo "cargo-travis already installed"
38+
- cargo install-update -a # updates cargo-travis, if the cached version is outdated
2239
- rustup component add clippy rustfmt
2340

2441
script:

0 commit comments

Comments
 (0)