rust-postgres/.circleci/config.yml
2018-05-19 15:25:42 -07:00

44 lines
1.4 KiB
YAML

restore_registry: &RESTORE_REGISTRY
restore_cache:
key: registry
save_registry: &SAVE_REGISTRY
save_cache:
key: registry-{{ .BuildNum }}
paths:
- /usr/local/cargo/registry/index
deps_key: &DEPS_KEY
key: deps-{{ checksum "~/rust-version" }}-{{ checksum "Cargo.lock" }}
restore_deps: &RESTORE_DEPS
restore_cache:
<<: *DEPS_KEY
save_deps: &SAVE_DEPS
save_cache:
<<: *DEPS_KEY
paths:
- target
- /usr/local/cargo/registry/cache
version: 2
jobs:
build:
working_directory: ~/build
docker:
- image: rust:1.23.0
environment:
RUSTFLAGS: -D warnings
- image: sfackler/rust-postgres-test:3
steps:
- checkout
- run: apt-get update
- run: DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends jq
- *RESTORE_REGISTRY
- run: cargo generate-lockfile
- run: cargo update -p nalgebra --precise 0.14.3 # 0.14.4 requires 1.26 :(
- *SAVE_REGISTRY
- run: rustc --version > ~/rust-version
- *RESTORE_DEPS
- run: cargo test --all
- run: cargo test --manifest-path=postgres/Cargo.toml --features "$(cargo read-manifest --manifest-path=postgres/Cargo.toml | jq -r '.features|keys|map(select(. != "with-security-framework" and . != "with-schannel"))|join(" ")')"
- run: cargo test --manifest-path=tokio-postgres/Cargo.toml --all-features
- *SAVE_DEPS