Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' into ao-lmdb
Browse files Browse the repository at this point in the history
* master: (48 commits)
  ethcore: remove eth social and easthub chain configs (#10531)
  Initial support sccache for windows build (#10520)
  fix(light): make `OnDemand` generic instead of using the concrete type (#10514)
  private-tx: replace error_chain (#10510)
  Add trace information to eth_estimateGas (#10519)
  ethcore: add clique engine (#9981)
  verbose flag for cpp tests (#10524)
  Add a more realistic Batch test (#10511)
  docs: add changelogs for 2.3.{6,7,8} and 2.4.{1,2,3} (#10494)
  fix(rpc): fix a bunch of clippy lints (#10493)
  fix Sha3/keccak256 hash calculation for binaries (#10509)
  Add additional request tests (#10503)
  whisper/cli: add p2p port and ip parameters (#10057)
  fix(time-utils): add missing license (#10497)
  fix(extract `timestamp_checked_add` as lib) (#10383)
  fix(rpc): lint `unused_extern_crates` + fix warns (#10489)
  fix win&mac build (#10486)
  Сaching through docker volume (#10477)
  OpenBlock::new take IntoIterator instead of mutable ref to Iterator (#10480)
  simplify block module and usage (#10479)
  ...
  • Loading branch information
ordian committed Mar 27, 2019
2 parents 135be69 + 0199acb commit 075b8d4
Show file tree
Hide file tree
Showing 207 changed files with 12,002 additions and 14,535 deletions.
197 changes: 132 additions & 65 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,25 @@ stages:
- publish
- optional

image: parity/rust:gitlab-ci

image: parity/rust-parity-ethereum-build:xenial
variables:
GIT_STRATEGY: fetch
GIT_SUBMODULE_STRATEGY: recursive
CI_SERVER_NAME: "GitLab CI"
CARGO_HOME: "${CI_PROJECT_DIR}/.cargo"
CARGO_TARGET: x86_64-unknown-linux-gnu

.no_git: &no_git
.no_git: &no_git # disable git strategy
variables:
GIT_STRATEGY: none
GIT_SUBMODULE_STRATEGY: none


.releaseable_branches: # list of git refs for building GitLab artifacts (think "pre-release binaries")
only: &releaseable_branches
- stable
- beta
- tags
- schedules


.collect_artifacts: &collect_artifacts
artifacts:
name: "${CI_JOB_NAME}_${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}"
Expand All @@ -35,101 +31,186 @@ variables:
paths:
- artifacts/

.determine_version: &determine_version
- VERSION="$(sed -r -n '1,/^version/s/^version = "([^"]+)".*$/\1/p' Cargo.toml)"
- DATE_STR="$(date +%Y%m%d)"
- ID_SHORT="$(echo ${CI_COMMIT_SHA} | cut -c 1-7)"
- test "${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" = "nightly" && VERSION="${VERSION}-${ID_SHORT}-${DATE_STR}"
- export VERSION
- echo "Version = ${VERSION}"

test-linux:
stage: test
.docker-cache-status: &docker-cache-status
variables:
RUN_TESTS: all
script:
- scripts/gitlab/test-all.sh
CARGO_HOME: "/ci-cache/parity-ethereum/cargo/${CI_JOB_NAME}"
before_script:
- SCCACHE_ERROR_LOG=/builds/parity/parity-ethereum/sccache_error.log RUST_LOG=sccache::server=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
tags:
- linux-docker

test-audit:

cargo-check 0 3:
stage: test
<<: *docker-cache-status
script:
- time cargo check --target $CARGO_TARGET --locked --no-default-features
- 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
- 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"
- sccache -s

cargo-audit:
stage: test
<<: *docker-cache-status
script:
- set -e
- set -u
- cargo audit
tags:
- linux-docker
- sccache -s

validate-chainspecs:
stage: test
<<: *docker-cache-status
script:
- ./scripts/gitlab/validate-chainspecs.sh
- sccache -s

build-linux:
test-cpp:
stage: build
only: *releaseable_branches
<<: *docker-cache-status
script:
- ./scripts/gitlab/test-cpp.sh
- sccache -s

test-linux:
stage: build
<<: *docker-cache-status
script:
- scripts/gitlab/build-unix.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
<<: *collect_artifacts
tags:
- linux-docker

build-linux: &build-linux
stage: build
only: *releaseable_branches
<<: *docker-cache-status
<<: *collect_artifacts
script:
- scripts/gitlab/build-linux.sh
- sccache -s

build-linux-i386:
<<: *build-linux
image: parity/rust-parity-ethereum-build:i386
variables:
CARGO_TARGET: i686-unknown-linux-gnu

build-linux-arm64:
<<: *build-linux
image: parity/rust-parity-ethereum-build:arm64
variables:
CARGO_TARGET: aarch64-unknown-linux-gnu

build-linux-armhf:
<<: *build-linux
image: parity/rust-parity-ethereum-build:armhf
variables:
CARGO_TARGET: armv7-unknown-linux-gnueabihf

build-darwin:
stage: build
only: *releaseable_branches
<<: *collect_artifacts
variables:
CARGO_TARGET: x86_64-apple-darwin
CARGO_HOME: "${CI_PROJECT_DIR}/.cargo"
CC: gcc
CXX: g++
script:
- scripts/gitlab/build-unix.sh
- scripts/gitlab/build-linux.sh
tags:
- rust-osx
<<: *collect_artifacts

build-windows:
stage: build
<<: *collect_artifacts
only: *releaseable_branches
variables:
CARGO_TARGET: x86_64-pc-windows-msvc
CARGO_HOME: "C:/ci-cache/parity-ethereum/cargo/%CI_JOB_NAME%"
RUSTC_WRAPPER: sccache
SCCACHE_DIR: "C:/ci-cache/parity-ethereum/sccache"
script:
- sh scripts/gitlab/build-windows.sh
tags:
- rust-windows
<<: *collect_artifacts
- rust-windows

publish-docker:
stage: publish
only: *releaseable_branches
# <<: *no_git
cache: {}
cache: {}
dependencies:
- build-linux
tags:
- shell
script:
- scripts/gitlab/publish-docker.sh parity

publish-snap:
publish-snap: &publish-snap
stage: publish
only: *releaseable_branches
# <<: *no_git
<<: *collect_artifacts
image: snapcore/snapcraft
variables:
BUILD_ARCH: amd64
cache: {}
before_script: *determine_version
cache: {}
dependencies:
- build-linux
tags:
- rust-stable
- linux-docker
script:
- scripts/gitlab/publish-snap.sh
allow_failure: true
<<: *collect_artifacts

publish-snap-i386:
<<: *publish-snap
variables:
BUILD_ARCH: i386
dependencies:
- build-linux-i386

publish-snap-arm64:
<<: *publish-snap
variables:
BUILD_ARCH: arm64
dependencies:
- build-linux-arm64

publish-snap-armhf:
<<: *publish-snap
variables:
BUILD_ARCH: armhf
dependencies:
- build-linux-armhf

publish-onchain:
stage: publish
only: *releaseable_branches
# <<: *no_git
cache: {}
dependencies:
- build-linux
Expand All @@ -153,42 +234,28 @@ publish-awss3-release:
script:
- echo "__________Push binaries to AWS S3____________"
- case "${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" in
(beta|stable|nightly)
export BUCKET=releases.parity.io/ethereum;
;;
(*)
export BUCKET=builds-parity;
;;
esac
(beta|stable|nightly)
export BUCKET=releases.parity.io/ethereum;
;;
(*)
export BUCKET=builds-parity;
;;
esac
- aws s3 sync ./artifacts s3://${BUCKET}/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/
after_script:
- aws s3 ls s3://${BUCKET}/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/
--recursive --human-readable --summarize
- echo "__________Read from S3____________"
- aws s3 ls s3://${BUCKET}/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}} --recursive --human-readable --summarize
tags:
- linux-docker

publish-docs:
stage: publish
# <<: *no_git
only:
- tags
except:
- nightly
cache: {}
cache: {}
script:
- scripts/gitlab/publish-docs.sh
tags:
- linux-docker

build-android:
stage: optional
image: parity/rust-android:gitlab-ci
variables:
CARGO_TARGET: armv7-linux-androideabi
script:
- scripts/gitlab/build-unix.sh
tags:
- linux-docker
allow_failure: true
<<: *collect_artifacts

Loading

0 comments on commit 075b8d4

Please sign in to comment.