Сaching through docker volume (#10477)
* _old codebase_ before docker update * before docker update, testing runnr * docker update, testing the caching * distributed job cargo homes * distributed job cargo homes 2 * distributed job cargo homes 3 * dockerfile with gitlab checkout, audit uses template * dockerfile gets repo in volume * change builds_dir * trying docker cache for repo * repo cached automatically * after script is not concatenated * check sccache non-cacheable reasons nature * watch cache * log sccache * log sccache 2 * debug log sccache * fix debug log sccache * fix debug log sccache 2 * debug log cache 3 * debug log cache 3 * trace log all sccache * test wo cargo cache * test w removed cargo cache * report non-cacheable reasons, cargo cache is back and empty * report non-cacheable reasons, cargo cache is back and empty 2 * report non-cacheable reasons, cargo cache is back and empty 3 * wrap into after_script * restore CI tags `qa` -> `linux-docker` * return to main runners, this will fail until config on runners And Dockerfile won't be updated * typo fix CI lint * return to docker tag
This commit is contained in:
parent
fb461659c7
commit
a8ee3c97e6
@ -9,10 +9,9 @@ variables:
|
|||||||
GIT_STRATEGY: fetch
|
GIT_STRATEGY: fetch
|
||||||
GIT_SUBMODULE_STRATEGY: recursive
|
GIT_SUBMODULE_STRATEGY: recursive
|
||||||
CI_SERVER_NAME: "GitLab CI"
|
CI_SERVER_NAME: "GitLab CI"
|
||||||
CARGO_HOME: "${CI_PROJECT_DIR}/.cargo"
|
|
||||||
CARGO_TARGET: x86_64-unknown-linux-gnu
|
CARGO_TARGET: x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
.no_git: &no_git #disable git strategy
|
.no_git: &no_git # disable git strategy
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
GIT_SUBMODULE_STRATEGY: none
|
GIT_SUBMODULE_STRATEGY: none
|
||||||
@ -32,12 +31,17 @@ variables:
|
|||||||
paths:
|
paths:
|
||||||
- artifacts/
|
- artifacts/
|
||||||
|
|
||||||
.docker-cache-status: &docker-cache-status
|
.docker-cache-status: &docker-cache-status
|
||||||
dependencies: []
|
variables:
|
||||||
|
CARGO_HOME: "/cargo/${CI_JOB_NAME}"
|
||||||
before_script:
|
before_script:
|
||||||
|
- SCCACHE_ERROR_LOG=/builds/parity/parity-ethereum/sccache_error.log RUST_LOG=sccache::server=debug sccache --start-server
|
||||||
- sccache -s
|
- sccache -s
|
||||||
after_script:
|
after_script:
|
||||||
- sccache -s
|
- echo "All crate-types:"
|
||||||
|
- grep 'parse_arguments.*--crate-type' sccache_error.log | sed -re 's/.*"--crate-type", "([^"]+)".*/\1/' | sort | uniq -c
|
||||||
|
- echo "Non-cacheable reasons:"
|
||||||
|
- grep CannotCache sccache_error.log | sed -re 's/.*CannotCache\((.+)\).*/\1/' | sort | uniq -c
|
||||||
tags:
|
tags:
|
||||||
- linux-docker
|
- linux-docker
|
||||||
|
|
||||||
@ -47,43 +51,60 @@ cargo-check 0 3:
|
|||||||
<<: *docker-cache-status
|
<<: *docker-cache-status
|
||||||
script:
|
script:
|
||||||
- time cargo check --target $CARGO_TARGET --locked --no-default-features
|
- time cargo check --target $CARGO_TARGET --locked --no-default-features
|
||||||
|
- sccache -s
|
||||||
|
|
||||||
cargo-check 1 3:
|
cargo-check 1 3:
|
||||||
stage: test
|
stage: test
|
||||||
<<: *docker-cache-status
|
<<: *docker-cache-status
|
||||||
script:
|
script:
|
||||||
- time cargo check --target $CARGO_TARGET --locked --manifest-path util/io/Cargo.toml --no-default-features
|
- time cargo check --target $CARGO_TARGET --locked --manifest-path util/io/Cargo.toml --no-default-features
|
||||||
|
- sccache -s
|
||||||
|
|
||||||
cargo-check 2 3:
|
cargo-check 2 3:
|
||||||
stage: test
|
stage: test
|
||||||
<<: *docker-cache-status
|
<<: *docker-cache-status
|
||||||
script:
|
script:
|
||||||
- time cargo check --target $CARGO_TARGET --locked --manifest-path util/io/Cargo.toml --features "mio"
|
- time cargo check --target $CARGO_TARGET --locked --manifest-path util/io/Cargo.toml --features "mio"
|
||||||
|
- sccache -s
|
||||||
|
|
||||||
cargo-audit:
|
cargo-audit:
|
||||||
stage: test
|
stage: test
|
||||||
|
<<: *docker-cache-status
|
||||||
script:
|
script:
|
||||||
- cargo audit
|
- cargo audit
|
||||||
tags:
|
- sccache -s
|
||||||
- linux-docker
|
|
||||||
|
|
||||||
validate-chainspecs:
|
validate-chainspecs:
|
||||||
stage: test
|
stage: test
|
||||||
<<: *docker-cache-status
|
<<: *docker-cache-status
|
||||||
script:
|
script:
|
||||||
- ./scripts/gitlab/validate-chainspecs.sh
|
- ./scripts/gitlab/validate-chainspecs.sh
|
||||||
|
- sccache -s
|
||||||
|
|
||||||
test-cpp:
|
test-cpp:
|
||||||
stage: build
|
stage: build
|
||||||
<<: *docker-cache-status
|
<<: *docker-cache-status
|
||||||
script:
|
script:
|
||||||
- ./scripts/gitlab/test-cpp.sh
|
- ./scripts/gitlab/test-cpp.sh
|
||||||
|
- sccache -s
|
||||||
|
|
||||||
test-linux:
|
test-linux:
|
||||||
stage: build
|
stage: build
|
||||||
<<: *docker-cache-status
|
<<: *docker-cache-status
|
||||||
script:
|
script:
|
||||||
- ./scripts/gitlab/test-linux.sh
|
- ./scripts/gitlab/test-linux.sh
|
||||||
|
- sccache -s
|
||||||
|
|
||||||
|
build-android:
|
||||||
|
stage: build
|
||||||
|
image: parity/rust-android:gitlab-ci
|
||||||
|
variables:
|
||||||
|
CARGO_TARGET: armv7-linux-androideabi
|
||||||
|
script:
|
||||||
|
- scripts/gitlab/build-linux.sh
|
||||||
|
tags:
|
||||||
|
- linux-docker
|
||||||
|
<<: *collect_artifacts
|
||||||
|
|
||||||
build-linux: &build-linux
|
build-linux: &build-linux
|
||||||
stage: build
|
stage: build
|
||||||
@ -91,6 +112,7 @@ build-linux: &build-linux
|
|||||||
<<: *docker-cache-status
|
<<: *docker-cache-status
|
||||||
script:
|
script:
|
||||||
- scripts/gitlab/build-linux.sh
|
- scripts/gitlab/build-linux.sh
|
||||||
|
- sccache -s
|
||||||
<<: *collect_artifacts
|
<<: *collect_artifacts
|
||||||
|
|
||||||
build-linux-i386:
|
build-linux-i386:
|
||||||
@ -138,7 +160,7 @@ build-windows:
|
|||||||
publish-docker:
|
publish-docker:
|
||||||
stage: publish
|
stage: publish
|
||||||
only: *releaseable_branches
|
only: *releaseable_branches
|
||||||
cache: {}
|
cache: {}
|
||||||
dependencies:
|
dependencies:
|
||||||
- build-linux
|
- build-linux
|
||||||
tags:
|
tags:
|
||||||
@ -152,7 +174,7 @@ publish-snap: &publish-snap
|
|||||||
image: snapcore/snapcraft
|
image: snapcore/snapcraft
|
||||||
variables:
|
variables:
|
||||||
BUILD_ARCH: amd64
|
BUILD_ARCH: amd64
|
||||||
cache: {}
|
cache: {}
|
||||||
dependencies:
|
dependencies:
|
||||||
- build-linux
|
- build-linux
|
||||||
tags:
|
tags:
|
||||||
@ -227,19 +249,9 @@ publish-docs:
|
|||||||
- tags
|
- tags
|
||||||
except:
|
except:
|
||||||
- nightly
|
- nightly
|
||||||
cache: {}
|
cache: {}
|
||||||
script:
|
script:
|
||||||
- scripts/gitlab/publish-docs.sh
|
- scripts/gitlab/publish-docs.sh
|
||||||
tags:
|
tags:
|
||||||
- linux-docker
|
- linux-docker
|
||||||
|
|
||||||
build-android:
|
|
||||||
stage: build
|
|
||||||
image: parity/rust-android:gitlab-ci
|
|
||||||
variables:
|
|
||||||
CARGO_TARGET: armv7-linux-androideabi
|
|
||||||
script:
|
|
||||||
- scripts/gitlab/build-linux.sh
|
|
||||||
tags:
|
|
||||||
- linux-docker
|
|
||||||
<<: *collect_artifacts
|
|
||||||
|
Loading…
Reference in New Issue
Block a user