mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-04 06:18:17 +00:00
Improve CI caching
We weren't making very effective use of the cache before, leading to 10m+ builds, as `cargo install --force` always busts the cache.
This commit is contained in:
parent
e753bd4f90
commit
610d6f8304
1 changed files with 12 additions and 1 deletions
13
.travis.yml
13
.travis.yml
|
@ -24,7 +24,18 @@ rust:
|
|||
|
||||
before_script:
|
||||
- pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH
|
||||
- cargo install --force cargo-travis && export PATH=$HOME/.cargo/bin:$PATH
|
||||
- export PATH=$HOME/.cargo/bin:$PATH
|
||||
# `cargo install` fails if the specified binary is already installed, and
|
||||
# doesn't yet support a `--if-not-installed` option [0], so for now assume
|
||||
# failures mean the package is already installed. If installation truly
|
||||
# failed, the build will fail later anyway, when we try to use the installed
|
||||
# binary. Note that `cargo install --force` is not a solution, as it always
|
||||
# rebuilds from scratch, ignoring the cache entirely.
|
||||
#
|
||||
# [0]: https://github.com/rust-lang/cargo/issues/2082
|
||||
- cargo install cargo-update || echo "cargo-update already installed"
|
||||
- cargo install cargo-travis || echo "cargo-travis already installed"
|
||||
- cargo install-update -a # updates cargo-travis, if the cached version is outdated
|
||||
- rustup component add clippy rustfmt
|
||||
|
||||
script:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue