Commit be63ea8d authored by Ben Boeckel's avatar Ben Boeckel
Browse files

gitlab-ci: use sccache

parent 3099e82b
......@@ -18,13 +18,21 @@ before_script:
- cargo fetch --locked
.cargo_clippy: &cargo_clippy
# Only use it if it's available; no need to fail the build due to something
# gone wrong here.
- .gitlab/ci/sccache.sh && export RUSTC_WRAPPER=$PWD/.gitlab/sccache
- rustup component add clippy
# - cargo clippy --frozen --tests --all --verbose -- -D warnings
- cargo clippy --frozen --tests --all --verbose
- ".gitlab/sccache --show-stats || :"
.cargo_build: &cargo_build
# Only use it if it's available; no need to fail the build due to something
# gone wrong here.
- .gitlab/ci/sccache.sh && export RUSTC_WRAPPER=$PWD/.gitlab/sccache
- cargo build $CARGO_BUILD_FROZEN --all --verbose
- cargo test --frozen --all --no-run --verbose
- ".gitlab/sccache --show-stats || :"
.cargo_test: &cargo_test
- cargo test --frozen --all --verbose
......@@ -37,6 +45,7 @@ before_script:
# remove this variable.
#CARGO_BUILD_FROZEN: --frozen
CARGO_UPDATE_POLICY: newest
SCCACHE_REDIS: redis://minmus:6379
.rust_stable: &rust_stable
image: "rust:latest"
......@@ -44,6 +53,7 @@ before_script:
variables:
CARGO_BUILD_FROZEN: --frozen
CARGO_UPDATE_POLICY: newest
SCCACHE_REDIS: redis://minmus:6379
.rust_nightly: &rust_nightly
extends: .rust_stable
......@@ -81,10 +91,6 @@ before_script:
- .cargo-cache
- Cargo.lock
- target
cache:
key: build-cache-$CI_JOB_NAME
paths:
- target
interruptible: true
.cargo_test_job: &cargo_test_job
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment