diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 295ac34f5..52cbbabfd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,37 +34,58 @@ variables: .docker-cache-status: &docker-cache-status variables: CARGO_HOME: "/ci-cache/parity-ethereum/cargo/${CI_JOB_NAME}" + dependencies: [] before_script: - - SCCACHE_ERROR_LOG=/builds/parity/parity-ethereum/sccache_error.log RUST_LOG=sccache::server=debug sccache --start-server + - SCCACHE_ERROR_LOG=/builds/parity/parity-ethereum/sccache_debug.log + RUST_LOG=sccache=debug + sccache --start-server - sccache -s after_script: - - 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 + # sccache debug info + - if test -e sccache_debug.log; + then + echo "_____sccache_debug.log listing start:_____"; + cat sccache_debug.log; + echo "_____sccache_debug.log listing end_____"; + 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: - linux-docker +.build-on-linux: &build-on-linux + stage: build + <<: *docker-cache-status + <<: *collect_artifacts + script: + - scripts/gitlab/build-linux.sh + - sccache -s + cargo-check 0 3: stage: test <<: *docker-cache-status script: - - time cargo check --target $CARGO_TARGET --locked --no-default-features + - time cargo check --target $CARGO_TARGET --locked --no-default-features --verbose --color=always - sccache -s cargo-check 1 3: stage: test <<: *docker-cache-status 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 --verbose --color=always - sccache -s cargo-check 2 3: stage: test <<: *docker-cache-status 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" --verbose --color=always - sccache -s cargo-audit: @@ -72,7 +93,6 @@ cargo-audit: <<: *docker-cache-status script: - cargo audit - - sccache -s validate-chainspecs: stage: test @@ -92,55 +112,64 @@ test-linux: stage: build <<: *docker-cache-status script: - - ./scripts/gitlab/test-linux.sh + - ./scripts/gitlab/test-linux.sh stable - sccache -s -build-android: - stage: build - image: parity/rust-parity-ethereum-android-build:stretch - variables: - CARGO_TARGET: armv7-linux-androideabi - <<: *docker-cache-status - <<: *collect_artifacts - script: - - scripts/gitlab/build-linux.sh - tags: - - linux-docker - -build-linux: &build-linux +test-linux-beta: stage: build only: *releaseable_branches <<: *docker-cache-status - <<: *collect_artifacts script: - - scripts/gitlab/build-linux.sh + - ./scripts/gitlab/test-linux.sh beta - sccache -s +test-linux-nightly: + stage: build + only: *releaseable_branches + <<: *docker-cache-status + script: + - ./scripts/gitlab/test-linux.sh nightly + - sccache -s + allow_failure: true + +build-android: + <<: *build-on-linux + image: parity/rust-parity-ethereum-android-build:stretch + variables: + CARGO_TARGET: armv7-linux-androideabi + +build-linux: + <<: *build-on-linux + only: *releaseable_branches + build-linux-i386: - <<: *build-linux + <<: *build-on-linux + only: *releaseable_branches image: parity/rust-parity-ethereum-build:i386 variables: CARGO_TARGET: i686-unknown-linux-gnu build-linux-arm64: - <<: *build-linux + <<: *build-on-linux + only: *releaseable_branches image: parity/rust-parity-ethereum-build:arm64 variables: CARGO_TARGET: aarch64-unknown-linux-gnu build-linux-armhf: - <<: *build-linux + <<: *build-on-linux + only: *releaseable_branches image: parity/rust-parity-ethereum-build:armhf variables: CARGO_TARGET: armv7-unknown-linux-gnueabihf build-darwin: stage: build - only: *releaseable_branches <<: *collect_artifacts + only: *releaseable_branches variables: CARGO_TARGET: x86_64-apple-darwin - CARGO_HOME: "${CI_PROJECT_DIR}/.cargo" + CARGO_HOME: "${CI_PROJECT_DIR}/.cargo" CC: gcc CXX: g++ script: @@ -260,4 +289,5 @@ publish-docs: - scripts/gitlab/publish-docs.sh tags: - linux-docker + allow_failure: true diff --git a/scripts/gitlab/publish-docs.sh b/scripts/gitlab/publish-docs.sh index 262ea8080..2508c8255 100755 --- a/scripts/gitlab/publish-docs.sh +++ b/scripts/gitlab/publish-docs.sh @@ -51,8 +51,11 @@ commit_files() { upload_files() { echo "__________Upload files__________" - git push -q origin HEAD - git push -q -f --tags + # this version of git (2.7.4) will dump the token on failure + git push -q origin HEAD 2>&1 \ + | sed -r "s|(${GITHUB_USER}):[a-f0-9]+@|\1:REDACTED@|g" + git push -q -f --tags 2>&1 \ + | sed -r "s|(${GITHUB_USER}):[a-f0-9]+@|\1:REDACTED@|g" } RPC_TRAITS_DIR="rpc/src/v1/traits"