diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1780316370cc17c92486b2e7631f0c4873ea0c2f..7f3ce4c773be4e67527a4b487b1bdf231f1a48fc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,24 +2,19 @@ stages: - test - build -image: parity/rust:nightly +image: parity/shasper-ci:stretch variables: - CI_SERVER_NAME: "GitLab CI" - CARGO_HOME: "${CI_PROJECT_DIR}/.cargo" + GIT_STRATEGY: fetch + GIT_SUBMODULE_STRATEGY: recursive RUST_TOOLCHAIN: "stable" - GIT_SUBMODULE_STRATEGY: "recursive" - -cache: - key: "${CI_JOB_NAME}" - paths: - - ./target/ - - ./.cargo/ - + CI_SERVER_NAME: "GitLab CI" + CARGO_HOME: "/ci-cache/shasper/cargo/${CI_JOB_NAME}" + SCCACHE_CACHE_SIZE: 50G before_script: + - sccache -s - ./scripts/init.sh - - export PATH="${CI_PROJECT_DIR}/cargo/bin/:$PATH" - ./scripts/build.sh @@ -29,6 +24,7 @@ test-rust-stable: stage: test script: - time cargo test --all --release --locked + - sccache -s only: - triggers - tags @@ -37,7 +33,7 @@ test-rust-stable: - web - /^[0-9]+$/ tags: - - rust-stable + - linux-docker #### stage: build @@ -45,9 +41,10 @@ test-rust-stable: build-linux: stage: build script: - - cargo build --release + - time cargo build --release + - sccache -s tags: - - rust-stable + - linux-docker only: - master - tags