ci: use sccache

This commit is contained in:
Felix Krull 2019-05-29 18:42:30 +02:00 committed by Colin Walters
parent 87bf13574f
commit 0c07616342

View File

@ -1,20 +1,24 @@
image: rust:latest
variables:
CARGO_TARGET_DIR: ${CI_PROJECT_DIR}/target
# --all-features
CURRENT_FEATURES: --features v2018_9
SCCACHE_URL: https://github.com/mozilla/sccache/releases/download/0.2.8/sccache-0.2.8-x86_64-unknown-linux-musl.tar.gz
CARGO_TARGET_DIR: ${CI_PROJECT_DIR}/target
CARGO_HOME: ${CI_PROJECT_DIR}/cargo
SCCACHE_DIR: ${CI_PROJECT_DIR}/sccache
RUSTC_WRAPPER: sccache
before_script:
- echo deb http://ftp.debian.org/debian stretch-backports main > /etc/apt/sources.list.d/backports.list
- apt-get update
- apt-get install -y -t stretch-backports cmake libostree-dev
- wget -O - ${SCCACHE_URL} | tar -C /usr/bin/ -xz --wildcards --strip-components=1 '*/sccache'
cache:
paths:
- cargo/
- target/
- sccache/
stages:
- check
@ -32,8 +36,6 @@ check:
gir:
stage: check
before_script:
- rm -f target/tools/bin/gir
script:
- rm -rf src/auto/
- make gir
@ -83,7 +85,6 @@ docs:
--extern-html-root-url glib=https://gtk-rs.org/docs
--extern-html-root-url gio=https://gtk-rs.org/docs
script:
- rm -rf target/doc
- make merge-lgpl-docs
- cargo rustdoc --verbose --package ostree-sys --features dox -- ${RUSTDOC_OPTS}
- cargo rustdoc --verbose --package ostree --features dox -- ${RUSTDOC_OPTS}