gitlabci: Improve caching
This commit is contained in:
parent
327c907463
commit
2457e95f0e
@ -13,6 +13,11 @@ stages:
|
|||||||
before_script:
|
before_script:
|
||||||
- apt-get update -yqq
|
- apt-get update -yqq
|
||||||
- apt-get install -yqq --no-install-recommends build-essential libgtk-3-dev meson
|
- apt-get install -yqq --no-install-recommends build-essential libgtk-3-dev meson
|
||||||
|
|
||||||
|
- mkdir -p .cargo_cache
|
||||||
|
# Only stuff inside the repo directory can be cached
|
||||||
|
# Override the CARGO_HOME variable to force it location
|
||||||
|
- export CARGO_HOME="${PWD}/.cargo_cache"
|
||||||
script:
|
script:
|
||||||
- rustc -Vv && cargo -Vv
|
- rustc -Vv && cargo -Vv
|
||||||
# Force regeneration of gresources regardless of artifacts chage
|
# Force regeneration of gresources regardless of artifacts chage
|
||||||
@ -21,6 +26,14 @@ stages:
|
|||||||
- cargo build
|
- cargo build
|
||||||
- cargo test -- --test-threads=1
|
- cargo test -- --test-threads=1
|
||||||
- cargo test -- --test-threads=1 --ignored
|
- cargo test -- --test-threads=1 --ignored
|
||||||
|
cache:
|
||||||
|
# JOB_NAME - Each job will have it's own cache
|
||||||
|
# COMMIT_REF_SLUG = Lowercase name of the branch
|
||||||
|
# ^ Keep diffrerent caches for each branch
|
||||||
|
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
|
||||||
|
paths:
|
||||||
|
- target/
|
||||||
|
- .cargo_cache/
|
||||||
|
|
||||||
stable:test:
|
stable:test:
|
||||||
# https://hub.docker.com/_/rust/
|
# https://hub.docker.com/_/rust/
|
||||||
@ -50,6 +63,7 @@ flatpak:
|
|||||||
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
|
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
|
||||||
paths:
|
paths:
|
||||||
- .flatpak-builder/cache/
|
- .flatpak-builder/cache/
|
||||||
|
- target/
|
||||||
|
|
||||||
# Configure and run rustfmt on nightly
|
# Configure and run rustfmt on nightly
|
||||||
# Exits and builds fails if on bad format
|
# Exits and builds fails if on bad format
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user