Switching sccache from local to Redis (#10971)
* Switching cache from local to Radis * sccache -s won't work. All the images are taken from own registry * new images addresses * statisticss after stop sccache server sccache CC&CXX
This commit is contained in:
parent
f24bff5998
commit
0bd2979c04
@ -5,16 +5,15 @@ stages:
|
|||||||
- optional
|
- optional
|
||||||
|
|
||||||
image: ${REGISTRY}/parity-ci-linux:latest
|
image: ${REGISTRY}/parity-ci-linux:latest
|
||||||
|
|
||||||
variables:
|
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-cache/${CI_PROJECT_NAME}/cargo/${CI_JOB_NAME}"
|
CARGO_HOME: "/ci-cache/${CI_PROJECT_NAME}/cargo/${CI_JOB_NAME}"
|
||||||
SCCACHE_DIR: "/ci-cache/${CI_PROJECT_NAME}/sccache"
|
|
||||||
CARGO_TARGET: x86_64-unknown-linux-gnu
|
CARGO_TARGET: x86_64-unknown-linux-gnu
|
||||||
REGISTRY: registry.parity.io/parity/infrastructure/scripts
|
REGISTRY: registry.parity.io/parity/infrastructure/scripts
|
||||||
|
|
||||||
|
|
||||||
.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
|
||||||
- stable
|
- stable
|
||||||
@ -38,22 +37,6 @@ variables:
|
|||||||
before_script:
|
before_script:
|
||||||
- rustup show
|
- rustup show
|
||||||
- cargo --version
|
- cargo --version
|
||||||
- SCCACHE_ERROR_LOG=/builds/parity/parity-ethereum/sccache_debug.log
|
|
||||||
RUST_LOG=sccache=debug
|
|
||||||
sccache --start-server
|
|
||||||
- sccache -s
|
|
||||||
after_script:
|
|
||||||
# sccache debug info
|
|
||||||
- if test -e sccache_debug.log;
|
|
||||||
then
|
|
||||||
echo "_____All crate-types:_____";
|
|
||||||
grep 'parse_arguments.*--crate-type' sccache_debug.log | sed -re 's/.*"--crate-type", "([^"]+)".*/\1/' | sort | uniq -c;
|
|
||||||
echo "_____Non-cacheable reasons:_____";
|
|
||||||
grep CannotCache sccache_debug.log | sed -re 's/.*CannotCache\((.+)\).*/\1/' | sort | uniq -c;
|
|
||||||
else
|
|
||||||
echo "_____No logs from sccache_____";
|
|
||||||
exit 0;
|
|
||||||
fi
|
|
||||||
tags:
|
tags:
|
||||||
- linux-docker
|
- linux-docker
|
||||||
|
|
||||||
@ -63,7 +46,6 @@ variables:
|
|||||||
<<: *collect_artifacts
|
<<: *collect_artifacts
|
||||||
script:
|
script:
|
||||||
- scripts/gitlab/build-linux.sh
|
- scripts/gitlab/build-linux.sh
|
||||||
- sccache -s
|
|
||||||
after_script:
|
after_script:
|
||||||
- mkdir -p tools
|
- mkdir -p tools
|
||||||
- cp -r scripts/docker/hub/* ./tools
|
- cp -r scripts/docker/hub/* ./tools
|
||||||
@ -81,21 +63,21 @@ cargo-check 0 3:
|
|||||||
<<: *docker-cache-status
|
<<: *docker-cache-status
|
||||||
script:
|
script:
|
||||||
- time cargo check --target $CARGO_TARGET --locked --no-default-features --verbose --color=always
|
- time cargo check --target $CARGO_TARGET --locked --no-default-features --verbose --color=always
|
||||||
- sccache -s
|
- sccache --stop-server
|
||||||
|
|
||||||
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 --verbose --color=always
|
- time cargo check --target $CARGO_TARGET --locked --manifest-path util/io/Cargo.toml --no-default-features --verbose --color=always
|
||||||
- sccache -s
|
- sccache --stop-server
|
||||||
|
|
||||||
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" --verbose --color=always
|
- time cargo check --target $CARGO_TARGET --locked --manifest-path util/io/Cargo.toml --features "mio" --verbose --color=always
|
||||||
- sccache -s
|
- sccache --stop-server
|
||||||
|
|
||||||
cargo-check-evmbin:
|
cargo-check-evmbin:
|
||||||
stage: test
|
stage: test
|
||||||
@ -123,21 +105,18 @@ validate-chainspecs:
|
|||||||
<<: *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 stable
|
- ./scripts/gitlab/test-linux.sh stable
|
||||||
- sccache -s
|
|
||||||
|
|
||||||
test-linux-beta:
|
test-linux-beta:
|
||||||
stage: build
|
stage: build
|
||||||
@ -145,7 +124,6 @@ test-linux-beta:
|
|||||||
<<: *docker-cache-status
|
<<: *docker-cache-status
|
||||||
script:
|
script:
|
||||||
- ./scripts/gitlab/test-linux.sh beta
|
- ./scripts/gitlab/test-linux.sh beta
|
||||||
- sccache -s
|
|
||||||
|
|
||||||
test-linux-nightly:
|
test-linux-nightly:
|
||||||
stage: build
|
stage: build
|
||||||
@ -153,7 +131,6 @@ test-linux-nightly:
|
|||||||
<<: *docker-cache-status
|
<<: *docker-cache-status
|
||||||
script:
|
script:
|
||||||
- ./scripts/gitlab/test-linux.sh nightly
|
- ./scripts/gitlab/test-linux.sh nightly
|
||||||
- sccache -s
|
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
build-android:
|
build-android:
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
set -e # fail on any error
|
set -e # fail on any error
|
||||||
set -u # treat unset variables as error
|
set -u # treat unset variables as error
|
||||||
|
|
||||||
|
export CC="sccache "$CC
|
||||||
|
export CXX="sccache "$CXX
|
||||||
echo "__________Show ENVIROMENT__________"
|
echo "__________Show ENVIROMENT__________"
|
||||||
echo "CI_SERVER_NAME: " $CI_SERVER_NAME
|
echo "CI_SERVER_NAME: " $CI_SERVER_NAME
|
||||||
echo "CARGO_HOME: " $CARGO_HOME
|
echo "CARGO_HOME: " $CARGO_HOME
|
||||||
@ -55,3 +57,5 @@ do
|
|||||||
echo "> ${binary} cannot be hashed with cross-compiled binary (keccak256)"
|
echo "> ${binary} cannot be hashed with cross-compiled binary (keccak256)"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
#show sccache statistics
|
||||||
|
sccache --stop-server
|
||||||
|
@ -4,6 +4,8 @@ set -e # fail on any error
|
|||||||
set -u # treat unset variables as error
|
set -u # treat unset variables as error
|
||||||
#use nproc `linux only
|
#use nproc `linux only
|
||||||
THREADS=$(nproc)
|
THREADS=$(nproc)
|
||||||
|
export CC="sccache gcc"
|
||||||
|
export CXX="sccache g++"
|
||||||
|
|
||||||
echo "________Running the C++ example________"
|
echo "________Running the C++ example________"
|
||||||
DIR=parity-clib/examples/cpp/build
|
DIR=parity-clib/examples/cpp/build
|
||||||
@ -15,3 +17,5 @@ make VERBOSE=1 -j $THREADS
|
|||||||
# that to happen on CI
|
# that to happen on CI
|
||||||
cd -
|
cd -
|
||||||
rm -rf $DIR
|
rm -rf $DIR
|
||||||
|
#show sccache statistics
|
||||||
|
sccache --stop-server
|
||||||
|
@ -5,7 +5,10 @@ echo "________Running test-linux.sh________"
|
|||||||
set -e # fail on any error
|
set -e # fail on any error
|
||||||
set -u # treat unset variables as error
|
set -u # treat unset variables as error
|
||||||
|
|
||||||
|
export CC="sccache gcc"
|
||||||
|
export CXX="sccache g++"
|
||||||
FEATURES="json-tests"
|
FEATURES="json-tests"
|
||||||
|
|
||||||
OPTIONS="--release"
|
OPTIONS="--release"
|
||||||
#use nproc `linux only
|
#use nproc `linux only
|
||||||
THREADS=$(nproc)
|
THREADS=$(nproc)
|
||||||
@ -16,3 +19,6 @@ rustup show
|
|||||||
echo "________Running Parity Full Test Suite________"
|
echo "________Running Parity Full Test Suite________"
|
||||||
# Why are we using RUSTFLAGS? See https://github.com/paritytech/parity-ethereum/pull/10719
|
# Why are we using RUSTFLAGS? See https://github.com/paritytech/parity-ethereum/pull/10719
|
||||||
CARGO_INCREMENTAL=0 RUSTFLAGS="-C opt-level=3 -C overflow-checks=on -C debuginfo=2 -Ctarget-feature=+aes,+sse2,+ssse3" time cargo test $OPTIONS --features "$FEATURES" --locked --all --target $CARGO_TARGET --verbose --color=never -- --test-threads $THREADS
|
CARGO_INCREMENTAL=0 RUSTFLAGS="-C opt-level=3 -C overflow-checks=on -C debuginfo=2 -Ctarget-feature=+aes,+sse2,+ssse3" time cargo test $OPTIONS --features "$FEATURES" --locked --all --target $CARGO_TARGET --verbose --color=never -- --test-threads $THREADS
|
||||||
|
|
||||||
|
#show sccache statistics
|
||||||
|
sccache --stop-server
|
||||||
|
@ -15,5 +15,6 @@ done
|
|||||||
for spec in ethcore/res/ethereum/*.json; do
|
for spec in ethcore/res/ethereum/*.json; do
|
||||||
if ! ./target/release/chainspec "$spec"; then ERR=1; fi
|
if ! ./target/release/chainspec "$spec"; then ERR=1; fi
|
||||||
done
|
done
|
||||||
|
#show sccache statistics
|
||||||
|
sccache --stop-server
|
||||||
exit $ERR
|
exit $ERR
|
||||||
|
Loading…
Reference in New Issue
Block a user