gitlab-ci: Add caching to the ci config.

This commit is contained in:
Jordan Petridis 2017-12-22 18:49:24 +02:00
parent 31b19dd88e
commit 7aebb4d50d
No known key found for this signature in database
GPG Key ID: CEABAD9F5683B9A6

View File

@ -20,6 +20,10 @@ before_script:
- rustc --version && cargo --version - rustc --version && cargo --version
- cargo build - cargo build
- cargo test --verbose -- --test-threads=1 - cargo test --verbose -- --test-threads=1
cache:
paths:
- target/
- cargo/
variables: variables:
# RUSTFLAGS: "-C link-dead-code" # RUSTFLAGS: "-C link-dead-code"
@ -46,6 +50,10 @@ rustfmt:
- rustc --version && cargo --version - rustc --version && cargo --version
- cargo install rustfmt-nightly --force - cargo install rustfmt-nightly --force
- cargo fmt --all -- --write-mode=diff - cargo fmt --all -- --write-mode=diff
cache:
paths:
- target/
- cargo/
# Configure and run clippy on nightly # Configure and run clippy on nightly
# Only fails on errors atm. # Only fails on errors atm.
@ -56,3 +64,7 @@ clippy:
- rustc --version && cargo --version - rustc --version && cargo --version
- cargo install clippy --force - cargo install clippy --force
- cargo clippy --all - cargo clippy --all
cache:
paths:
- target/
- cargo/