ci: simplify gitlab caching

This commit is contained in:
5chdn 2018-10-01 17:49:08 +01:00
parent a86d0052f0
commit 01908764f1
No known key found for this signature in database
GPG Key ID: 1A40871B597F5F80

View File

@ -8,7 +8,7 @@ image: parity/rust:gitlab-ci
variables: variables:
CI_SERVER_NAME: "GitLab CI" CI_SERVER_NAME: "GitLab CI"
CARGO_HOME: "${CI_PROJECT_DIR}/cargo" CARGO_HOME: "${CI_PROJECT_DIR}/.cargo"
BUILD_TARGET: ubuntu BUILD_TARGET: ubuntu
BUILD_ARCH: amd64 BUILD_ARCH: amd64
CARGO_TARGET: x86_64-unknown-linux-gnu CARGO_TARGET: x86_64-unknown-linux-gnu
@ -16,8 +16,8 @@ variables:
cache: cache:
key: "${CI_JOB_NAME}" key: "${CI_JOB_NAME}"
paths: paths:
- ${CI_PROJECT_DIR}/target/ - ./target
- ${CI_PROJECT_DIR}/cargo/ - ./.cargo
.releaseable_branches: # list of git refs for building GitLab artifacts (think "pre-release binaries") .releaseable_branches: # list of git refs for building GitLab artifacts (think "pre-release binaries")
only: &releaseable_branches only: &releaseable_branches
@ -77,11 +77,6 @@ build-darwin:
build-windows: build-windows:
stage: build stage: build
only: *releaseable_branches only: *releaseable_branches
cache:
key: "${CI_JOB_NAME}"
paths:
- "%CI_PROJECT_DIR%/target/"
- "%CI_PROJECT_DIR%/cargo/"
variables: variables:
CARGO_TARGET: x86_64-pc-windows-msvc CARGO_TARGET: x86_64-pc-windows-msvc
script: script:
@ -156,11 +151,6 @@ test-darwin:
test-windows: test-windows:
stage: optional stage: optional
cache:
key: "${CI_JOB_NAME}"
paths:
- "%CI_PROJECT_DIR%/target/"
- "%CI_PROJECT_DIR%/cargo/"
variables: variables:
CARGO_TARGET: x86_64-pc-windows-msvc CARGO_TARGET: x86_64-pc-windows-msvc
RUN_TESTS: "true" RUN_TESTS: "true"