78 lines
3 KiB
YAML
78 lines
3 KiB
YAML
language: rust
|
|
env:
|
|
- CARGO_INCREMENTAL=0
|
|
# https://bheisler.github.io/post/efficient-use-of-travis-ci-cache-for-rust/
|
|
before_cache:
|
|
# Delete loose files in the debug directory
|
|
- find ./target/debug -maxdepth 1 -type f -delete
|
|
# Delete the test and benchmark executables. Finding these all might take some
|
|
# experimentation.
|
|
- rm -rf ./target/debug/deps/criterion*
|
|
- rm -rf ./target/debug/deps/bench*
|
|
# Delete the associated metadata files for those executables
|
|
- rm -rf ./target/debug/.fingerprint/criterion*
|
|
- rm -rf ./target/debug/.fingerprint/bench*
|
|
# Note that all of the above need to be repeated for `release/` instead of
|
|
# `debug/` if your build script builds artifacts in release mode.
|
|
# This is just more metadata
|
|
- rm -f ./target/.rustc_info.json
|
|
# Also delete the saved benchmark data from the test benchmarks. If you
|
|
# have Criterion.rs benchmarks, you'll probably want to do this as well, or set
|
|
# the CRITERION_HOME environment variable to move that data out of the
|
|
# `target/` directory.
|
|
- rm -rf ./target/criterion
|
|
# Also delete cargo's registry index. This is updated on every build, but it's
|
|
# way cheaper to re-download than the whole cache is.
|
|
- rm -rf "$TRAVIS_HOME/.cargo/registry/index/"
|
|
- rm -rf "$TRAVIS_HOME/.cargo/registry/src"
|
|
cache:
|
|
directories:
|
|
- ./target
|
|
- $TRAVIS_HOME/.cache/sccache
|
|
- $TRAVIS_HOME/.cargo/
|
|
- $TRAVIS_HOME/.rustup/
|
|
before_script:
|
|
- cargo install --force cargo-audit
|
|
- cargo generate-lockfile
|
|
- rustup component add clippy-preview
|
|
script:
|
|
- cargo audit
|
|
# We use OSX so that we can get a reasonably up to date version of SQLCipher.
|
|
# (The version in Travis's default Ubuntu Trusty is much too old).
|
|
os: osx
|
|
before_install:
|
|
- brew install sqlcipher
|
|
rust:
|
|
- 1.43.0
|
|
- 1.44.0
|
|
- 1.45.0
|
|
- 1.46.0
|
|
- 1.47.0
|
|
- stable
|
|
- beta
|
|
- nightly
|
|
matrix:
|
|
allow_failures:
|
|
- rust: nightly
|
|
fast_finish: true
|
|
jobs:
|
|
include:
|
|
- stage: "Test iOS"
|
|
rust: 1.47.0
|
|
script: ./scripts/test-ios.sh
|
|
- stage: "Docs"
|
|
rust: 1.47.0
|
|
script: ./scripts/cargo-doc.sh
|
|
script:
|
|
- cargo build --verbose --all
|
|
- cargo clippy --all-targets --all-features -- -D warnings -A clippy::comparison-chain -A clippy::many-single-char-names # Check tests and non-default crate features.
|
|
- cargo test --verbose --all
|
|
- cargo test --features edn/serde_support --verbose --all
|
|
# We can't pick individual features out with `cargo test --all` (At the time of this writing, this
|
|
# works but does the wrong thing because of a bug in cargo, but its fix will be to disallow doing
|
|
# this all-together, see https://github.com/rust-lang/cargo/issues/5364 for more information). To
|
|
# work around this, we run tests individually for sub-crates that rely on `rusqlite`.
|
|
- |
|
|
for crate in "" "db" "db-traits" "ffi" "public-traits" "query-projector" "query-projector-traits" "query-pull" "sql" "tolstoy" "tolstoy-traits" "transaction" "tools/cli"; do
|
|
cargo test --manifest-path ./$crate/Cargo.toml --verbose --no-default-features --features sqlcipher
|
|
done
|