ecbafb2390
* version: bump beta to 2.5.2 * [CI] allow cargo audit to fail (#10676) * [CI] allow cargo audit to fail * [.gitlab-ci.yml] add a comment about cargo audit * [Cargo.lock] cargo update -p protobuf * Reset blockchain properly (#10669) * delete BlockDetails from COL_EXTRA * better proofs * added tests * PR suggestions * new image (#10673) * Update publishing (#10644) * docker images are now built on k8s: test run * copy check_sync.sh in build-linux job * copy scripts/docker/hub/* in build-linux job * removed cache var * cleanup, no more nightly dockers * cleanup in dockerfile * some new tags * removed sccsche debug log, cleanup * no_gits, new artifacts dir, changed scripts. Test run. * define version once * one source for TRACK * stop kovan onchain updates * moved changes for two images to a new branch * rename Dockerfile * no need in libudev-dev * enable lto for release builds (#10717) * Use RUSTFLAGS to set the optimization level (#10719) * Use RUSTFLAGS to set the optimization level Cargo has a [quirk]() in how configuration settings are propagated when `cargo test` runs: local code respect the settings in `[profile.test]` but all dependencies use the `[profile.dev]` settings. Here we force `opt-level=3` for all dependencies. * Remove unused profile settings * Maybe like this? * Turn off incremental compilation * Remove colors; try again with overflow-checks on * Use quiet CI machine * Turn overflow checking back on * Be explicit about what options we use * Remove "quiet machine" override * ethcore: enable ECIP-1054 for classic (#10731) * config: enable atlantis on ethereum classic * config: enable atlantis on morden classic * config: enable atlantis on morden classic * config: enable atlantis on kotti classic * ethcore: move kotti fork block to 0xAEF49 * ethcore: move morden fork block to 0x4829BA * ethcore: move classic fork block to 0x81B320 * remove trailing comma * remove trailing comma * fix chainspec * ethcore: move classic fork block to 0x7fffffffffffffff
326 lines
10 KiB
YAML
326 lines
10 KiB
YAML
stages:
|
|
- test
|
|
- build
|
|
- publish
|
|
- optional
|
|
|
|
image: parity/parity-ci-linux:latest
|
|
variables:
|
|
GIT_STRATEGY: fetch
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
CI_SERVER_NAME: "GitLab CI"
|
|
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
|
|
|
|
.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}}"
|
|
when: on_success
|
|
expire_in: 1 mos
|
|
paths:
|
|
- artifacts/
|
|
- tools/
|
|
|
|
.docker-cache-status: &docker-cache-status
|
|
variables:
|
|
CARGO_HOME: "/ci-cache/parity-ethereum/cargo/${CI_JOB_NAME}"
|
|
dependencies: []
|
|
before_script:
|
|
- rustup show
|
|
- 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:
|
|
- linux-docker
|
|
|
|
.build-on-linux: &build-on-linux
|
|
stage: build
|
|
<<: *docker-cache-status
|
|
<<: *collect_artifacts
|
|
script:
|
|
- scripts/gitlab/build-linux.sh
|
|
- sccache -s
|
|
after_script:
|
|
- mkdir -p tools
|
|
- cp -r scripts/docker/hub/* ./tools
|
|
- cp scripts/gitlab/publish-snap.sh ./tools
|
|
- cp scripts/gitlab/publish-onchain.sh ./tools
|
|
- cp scripts/gitlab/safe-curl.sh ./tools
|
|
- echo v"$(sed -r -n '1,/^version/s/^version\s*=\s*"([^"]+)".*$/\1/p' Cargo.toml)" |
|
|
tee ./tools/VERSION
|
|
- echo "$(sed -r -n '1,/^track/s/^track\s*=\s*"([^"]+)".*$/\1/p' ./util/version/Cargo.toml)" |
|
|
tee ./tools/TRACK
|
|
|
|
|
|
cargo-check 0 3:
|
|
stage: test
|
|
<<: *docker-cache-status
|
|
script:
|
|
- 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 --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" --verbose --color=always
|
|
- sccache -s
|
|
|
|
cargo-audit:
|
|
stage: test
|
|
<<: *docker-cache-status
|
|
script:
|
|
- cargo audit
|
|
allow_failure: true # failed cargo audit shouldn't prevent a PR from being merged
|
|
|
|
validate-chainspecs:
|
|
stage: test
|
|
<<: *docker-cache-status
|
|
script:
|
|
- ./scripts/gitlab/validate-chainspecs.sh
|
|
- sccache -s
|
|
|
|
test-cpp:
|
|
stage: build
|
|
<<: *docker-cache-status
|
|
script:
|
|
- ./scripts/gitlab/test-cpp.sh
|
|
- sccache -s
|
|
|
|
test-linux:
|
|
stage: build
|
|
<<: *docker-cache-status
|
|
script:
|
|
- ./scripts/gitlab/test-linux.sh stable
|
|
- sccache -s
|
|
|
|
test-linux-beta:
|
|
stage: build
|
|
only: *releaseable_branches
|
|
<<: *docker-cache-status
|
|
script:
|
|
- ./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-on-linux
|
|
only: *releaseable_branches
|
|
image: parity/rust-parity-ethereum-build:i386
|
|
variables:
|
|
CARGO_TARGET: i686-unknown-linux-gnu
|
|
|
|
build-linux-arm64:
|
|
<<: *build-on-linux
|
|
only: *releaseable_branches
|
|
image: parity/rust-parity-ethereum-build:arm64
|
|
variables:
|
|
CARGO_TARGET: aarch64-unknown-linux-gnu
|
|
|
|
build-linux-armhf:
|
|
<<: *build-on-linux
|
|
only: *releaseable_branches
|
|
image: parity/rust-parity-ethereum-build:armhf
|
|
variables:
|
|
CARGO_TARGET: armv7-unknown-linux-gnueabihf
|
|
|
|
build-darwin:
|
|
stage: build
|
|
<<: *collect_artifacts
|
|
only: *releaseable_branches
|
|
variables:
|
|
CARGO_TARGET: x86_64-apple-darwin
|
|
CARGO_HOME: "${CI_PROJECT_DIR}/.cargo"
|
|
CC: gcc
|
|
CXX: g++
|
|
script:
|
|
- scripts/gitlab/build-linux.sh
|
|
tags:
|
|
- rust-osx
|
|
|
|
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"
|
|
GIT_SUBMODULE_STRATEGY: none
|
|
script:
|
|
- sh scripts/gitlab/build-windows.sh
|
|
tags:
|
|
- rust-windows
|
|
|
|
publish-docker:
|
|
stage: publish
|
|
<<: *no_git
|
|
only: *releaseable_branches
|
|
except:
|
|
variables:
|
|
- $SCHEDULE_TAG == "nightly"
|
|
dependencies:
|
|
- build-linux
|
|
environment:
|
|
name: parity-build
|
|
cache: {}
|
|
image: docker:stable
|
|
services:
|
|
- docker:dind
|
|
variables:
|
|
DOCKER_HOST: tcp://localhost:2375
|
|
DOCKER_DRIVER: overlay2
|
|
GIT_STRATEGY: none
|
|
# DOCKERFILE: tools/Dockerfile
|
|
# CONTAINER_IMAGE: parity/parity
|
|
script:
|
|
# we stopped pushing nightlies to dockerhub, will push to own registry prb.
|
|
- ./tools/publish-docker.sh
|
|
tags:
|
|
- kubernetes-parity-build
|
|
|
|
publish-snap: &publish-snap
|
|
stage: publish
|
|
<<: *no_git
|
|
only: *releaseable_branches
|
|
image: snapcore/snapcraft
|
|
variables:
|
|
BUILD_ARCH: amd64
|
|
cache: {}
|
|
dependencies:
|
|
- build-linux
|
|
tags:
|
|
- linux-docker
|
|
script:
|
|
- ./tools/publish-snap.sh
|
|
|
|
publish-snap-i386:
|
|
<<: *publish-snap
|
|
variables:
|
|
BUILD_ARCH: i386
|
|
CARGO_TARGET: i686-unknown-linux-gnu
|
|
dependencies:
|
|
- build-linux-i386
|
|
|
|
publish-snap-arm64:
|
|
<<: *publish-snap
|
|
variables:
|
|
BUILD_ARCH: arm64
|
|
CARGO_TARGET: aarch64-unknown-linux-gnu
|
|
dependencies:
|
|
- build-linux-arm64
|
|
|
|
publish-snap-armhf:
|
|
<<: *publish-snap
|
|
variables:
|
|
BUILD_ARCH: armhf
|
|
CARGO_TARGET: armv7-unknown-linux-gnueabihf
|
|
dependencies:
|
|
- build-linux-armhf
|
|
|
|
publish-onchain:
|
|
stage: publish
|
|
<<: *no_git
|
|
only: *releaseable_branches
|
|
cache: {}
|
|
dependencies:
|
|
- build-linux
|
|
- build-darwin
|
|
- build-windows
|
|
script:
|
|
- ./tools/publish-onchain.sh
|
|
tags:
|
|
- linux-docker
|
|
|
|
publish-awss3-release:
|
|
image: parity/awscli:latest
|
|
stage: publish
|
|
only: *releaseable_branches
|
|
<<: *no_git
|
|
cache: {}
|
|
dependencies:
|
|
- build-linux
|
|
- build-darwin
|
|
- build-windows
|
|
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
|
|
- aws s3 sync ./artifacts s3://${BUCKET}/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/
|
|
- 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
|
|
image: parity/rust-parity-ethereum-docs:xenial
|
|
only:
|
|
- tags
|
|
except:
|
|
- nightly
|
|
cache: {}
|
|
dependencies: []
|
|
script:
|
|
- scripts/gitlab/publish-docs.sh
|
|
tags:
|
|
- linux-docker
|
|
allow_failure: true
|