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

Commit 7aab6b7

Browse files
authored
2.3.6 stable backports (#10470)
* version: bump stable * CI publish to aws (#10446) * move publish aws from gitlab.yml to gitlab scripts * gitlab.yml cleaning move publish AWS to gitlab scripts remove dependencies from android build * Ensure static validator set changes are recognized (#10467) * CI aws git checkout (#10451) * Updating the CI system with the publication of releases and binary files on github Signed-off-by: Denis S. Soldatov aka General-Beck <general.beck@gmail.com> * move publish aws from gitlab.yml to gitlab scripts Signed-off-by: Denis S. Soldatov aka General-Beck <general.beck@gmail.com> * gitlab.yml cleaning move publish AWS to gitlab scripts remove dependencies from android build Signed-off-by: Denis S. Soldatov aka General-Beck <general.beck@gmail.com> * Revert "Updating the CI system with the publication of releases and binary files on github" This reverts commit da87e06. * remove no-git for aws * microfix * no need in no_git then * Revert "CI aws git checkout (#10451)" (#10456) * Revert "CI aws git checkout (#10451)" This reverts commit 3e1d731. * Update .gitlab-ci.yml revert aws script with small fixes * Delete publish-aws.sh * Tests parallelized (#10452) * tests splitted, phase 1 * typo * fix wrong launch commands * typos * rearrangements * use `nproc` function for threads * use nproc for threads * let theads be auto, build-andriod no more in regular run * split val chain and cargo check * renamed some files * wrong phase * check rust files before test jobs * lint error * rust files modivied var * test except changes * add rust_changes except * lint error * fixes * .gitlab-ci.yml can't be excluded * pipeline shouldn't start * pipeline must go * pipeline must go 2 * pipeline must go 3 * pipeline must go 4 * pipeline must go 5 * pipeline must go 6 * pipeline must go 7 * pipeline must not go 1 * pipeline must go 8 * avoid skippng tests yet, reintroducing them after the caching * test theory * parallelized cargo check with combusting helicopters * less uploads * alias for cargo checks * nice template * Fix `ci-skip-issue` name * Fix build flag * Remove ci-skip-tests flag for stable
1 parent ebd0fd0 commit 7aab6b7

File tree

12 files changed

+109
-124
lines changed

12 files changed

+109
-124
lines changed

.gitlab-ci.yml

Lines changed: 59 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,18 @@ variables:
1212
CARGO_HOME: "${CI_PROJECT_DIR}/.cargo"
1313
CARGO_TARGET: x86_64-unknown-linux-gnu
1414

15-
.no_git: &no_git
15+
.no_git: &no_git #disable git strategy
1616
variables:
1717
GIT_STRATEGY: none
1818
GIT_SUBMODULE_STRATEGY: none
1919

20-
2120
.releaseable_branches: # list of git refs for building GitLab artifacts (think "pre-release binaries")
2221
only: &releaseable_branches
2322
- stable
2423
- beta
2524
- tags
2625
- schedules
2726

28-
2927
.collect_artifacts: &collect_artifacts
3028
artifacts:
3129
name: "${CI_JOB_NAME}_${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}"
@@ -34,34 +32,66 @@ variables:
3432
paths:
3533
- artifacts/
3634

37-
test-linux:
38-
stage: test
39-
variables:
40-
RUN_TESTS: all
41-
script:
42-
- scripts/gitlab/test-all.sh
35+
.docker-cache-status: &docker-cache-status
36+
dependencies: []
37+
before_script:
38+
- sccache -s
39+
after_script:
4340
- sccache -s
4441
tags:
4542
- linux-docker
4643

47-
test-audit:
44+
45+
cargo-check 0 3:
46+
stage: test
47+
<<: *docker-cache-status
48+
script:
49+
- time cargo check --target $CARGO_TARGET --locked --no-default-features
50+
51+
cargo-check 1 3:
52+
stage: test
53+
<<: *docker-cache-status
54+
script:
55+
- time cargo check --target $CARGO_TARGET --locked --manifest-path util/io/Cargo.toml --no-default-features
56+
57+
cargo-check 2 3:
58+
stage: test
59+
<<: *docker-cache-status
60+
script:
61+
- time cargo check --target $CARGO_TARGET --locked --manifest-path util/io/Cargo.toml --features "mio"
62+
63+
cargo-audit:
4864
stage: test
4965
script:
50-
- set -e
51-
- set -u
5266
- cargo audit
5367
tags:
5468
- linux-docker
5569

70+
validate-chainspecs:
71+
stage: test
72+
<<: *docker-cache-status
73+
script:
74+
- ./scripts/gitlab/validate-chainspecs.sh
75+
76+
test-cpp:
77+
stage: build
78+
<<: *docker-cache-status
79+
script:
80+
- ./scripts/gitlab/test-cpp.sh
81+
82+
test-linux:
83+
stage: build
84+
<<: *docker-cache-status
85+
script:
86+
- ./scripts/gitlab/test-linux.sh
87+
5688
build-linux: &build-linux
5789
stage: build
5890
only: *releaseable_branches
91+
<<: *docker-cache-status
5992
script:
60-
- scripts/gitlab/build-unix.sh
61-
- sccache -s
93+
- scripts/gitlab/build-linux.sh
6294
<<: *collect_artifacts
63-
tags:
64-
- linux-docker
6595

6696
build-linux-i386:
6797
<<: *build-linux
@@ -89,7 +119,7 @@ build-darwin:
89119
CC: gcc
90120
CXX: g++
91121
script:
92-
- scripts/gitlab/build-unix.sh
122+
- scripts/gitlab/build-linux.sh
93123
tags:
94124
- rust-osx
95125
<<: *collect_artifacts
@@ -102,7 +132,7 @@ build-windows:
102132
script:
103133
- sh scripts/gitlab/build-windows.sh
104134
tags:
105-
- rust-windows
135+
- rust-windows
106136
<<: *collect_artifacts
107137

108138
publish-docker:
@@ -178,17 +208,16 @@ publish-awss3-release:
178208
script:
179209
- echo "__________Push binaries to AWS S3____________"
180210
- case "${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" in
181-
(beta|stable|nightly)
182-
export BUCKET=releases.parity.io/ethereum;
183-
;;
184-
(*)
185-
export BUCKET=builds-parity;
186-
;;
187-
esac
211+
(beta|stable|nightly)
212+
export BUCKET=releases.parity.io/ethereum;
213+
;;
214+
(*)
215+
export BUCKET=builds-parity;
216+
;;
217+
esac
188218
- aws s3 sync ./artifacts s3://${BUCKET}/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/
189-
after_script:
190-
- aws s3 ls s3://${BUCKET}/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/
191-
--recursive --human-readable --summarize
219+
- echo "__________Read from S3____________"
220+
- aws s3 ls s3://${BUCKET}/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}} --recursive --human-readable --summarize
192221
tags:
193222
- linux-docker
194223

@@ -205,13 +234,12 @@ publish-docs:
205234
- linux-docker
206235

207236
build-android:
208-
stage: optional
237+
stage: build
209238
image: parity/rust-android:gitlab-ci
210239
variables:
211240
CARGO_TARGET: armv7-linux-androideabi
212241
script:
213-
- scripts/gitlab/build-unix.sh
242+
- scripts/gitlab/build-linux.sh
214243
tags:
215244
- linux-docker
216-
allow_failure: true
217245
<<: *collect_artifacts

Cargo.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description = "Parity Ethereum client"
33
name = "parity-ethereum"
44
# NOTE Make sure to update util/version/Cargo.toml as well
5-
version = "2.3.5"
5+
version = "2.3.6"
66
license = "GPL-3.0"
77
authors = ["Parity Technologies <admin@parity.io>"]
88

ethcore/src/engines/authority_round/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1406,8 +1406,10 @@ impl Engine<EthereumMachine> for AuthorityRound {
14061406

14071407
let first = chain_head.number() == 0;
14081408

1409-
// apply immediate transitions.
1409+
// Apply transitions that don't require finality and should be enacted immediately (e.g from chain spec)
14101410
if let Some(change) = self.validators.is_epoch_end(first, chain_head) {
1411+
info!(target: "engine", "Immediately applying validator set change signalled at block {}", chain_head.number());
1412+
self.epoch_manager.lock().note_new_epoch();
14111413
let change = combine_proofs(chain_head.number(), &change, &[]);
14121414
return Some(change)
14131415
}

ethcore/src/json_tests/skip.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
1919
use ethjson;
2020

21-
#[cfg(all(not(test), feature = "ci-skip-tests"))]
21+
#[cfg(all(not(test), feature = "ci-skip-issue"))]
2222
compile_error!("ci-skip-tests can only be enabled for testing builds.");
2323

2424
#[cfg(feature="ci-skip-issue")]
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#!/bin/bash
2+
echo "________Running rust_changes.sh________"
23
set -e # fail on any error
34
set -u # treat unset variables as error
45

6+
echo "__________Checking if Rust files were changed__________"
57
git log --graph --oneline --decorate=short -n 10
68

79
case ${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}} in
@@ -26,5 +28,3 @@ then
2628
fi
2729

2830
rustup show
29-
30-
exec ./test.sh

scripts/gitlab/test-cpp.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
echo "________Running test-cpp.sh________"
3+
set -e # fail on any error
4+
set -u # treat unset variables as error
5+
#use nproc `linux only
6+
THREADS=$(nproc)
7+
8+
echo "________Running the C++ example________"
9+
DIR=parity-clib/examples/cpp/build
10+
mkdir -p $DIR
11+
cd $DIR
12+
cmake ..
13+
make -j $THREADS
14+
# Note: we don't try to run the example because it tries to sync Kovan, and we don't want
15+
# that to happen on CI
16+
cd -
17+
rm -rf $DIR

scripts/gitlab/test-linux.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
echo "________Running test-linux.sh________"
3+
set -e # fail on any error
4+
set -u # treat unset variables as error
5+
6+
FEATURES="json-tests"
7+
OPTIONS="--release"
8+
#use nproc `linux only
9+
THREADS=$(nproc)
10+
11+
echo "________Running Parity Full Test Suite________"
12+
time cargo test $OPTIONS --features "$FEATURES" --locked --all --target $CARGO_TARGET -- --test-threads $THREADS
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
#!/usr/bin/env sh
1+
#!/bin/bash
2+
set -e # fail on any error
3+
set -u # treat unset variables as error
4+
echo "________Running validate_chainspecs.sh________"
25

36
ERR=0
4-
cargo build --release -p chainspec
7+
8+
echo "________Validate chainspecs________"
9+
time cargo build --release -p chainspec
510

611
for spec in ethcore/res/*.json; do
712
if ! ./target/release/chainspec "$spec"; then ERR=1; fi

0 commit comments

Comments
 (0)