Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 59 additions & 31 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,18 @@ variables:
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 @@ -34,34 +32,66 @@ variables:
paths:
- artifacts/

test-linux:
stage: test
variables:
RUN_TESTS: all
script:
- scripts/gitlab/test-all.sh
.docker-cache-status: &docker-cache-status
dependencies: []
before_script:
- sccache -s
after_script:
- sccache -s
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

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

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"

cargo-audit:
stage: test
script:
- set -e
- set -u
- cargo audit
tags:
- linux-docker

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

test-cpp:
stage: build
<<: *docker-cache-status
script:
- ./scripts/gitlab/test-cpp.sh

test-linux:
stage: build
<<: *docker-cache-status
script:
- ./scripts/gitlab/test-linux.sh

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

build-linux-i386:
<<: *build-linux
Expand Down Expand Up @@ -89,7 +119,7 @@ build-darwin:
CC: gcc
CXX: g++
script:
- scripts/gitlab/build-unix.sh
- scripts/gitlab/build-linux.sh
tags:
- rust-osx
<<: *collect_artifacts
Expand All @@ -102,7 +132,7 @@ build-windows:
script:
- sh scripts/gitlab/build-windows.sh
tags:
- rust-windows
- rust-windows
<<: *collect_artifacts

publish-docker:
Expand Down Expand Up @@ -178,17 +208,16 @@ 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

Expand All @@ -205,13 +234,12 @@ publish-docs:
- linux-docker

build-android:
stage: optional
stage: build
image: parity/rust-android:gitlab-ci
variables:
CARGO_TARGET: armv7-linux-androideabi
script:
- scripts/gitlab/build-unix.sh
- scripts/gitlab/build-linux.sh
tags:
- linux-docker
allow_failure: true
<<: *collect_artifacts
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
description = "Parity Ethereum client"
name = "parity-ethereum"
# NOTE Make sure to update util/version/Cargo.toml as well
version = "2.3.5"
version = "2.3.6"
license = "GPL-3.0"
authors = ["Parity Technologies <admin@parity.io>"]

Expand Down
4 changes: 3 additions & 1 deletion ethcore/src/engines/authority_round/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1406,8 +1406,10 @@ impl Engine<EthereumMachine> for AuthorityRound {

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

// apply immediate transitions.
// Apply transitions that don't require finality and should be enacted immediately (e.g from chain spec)
if let Some(change) = self.validators.is_epoch_end(first, chain_head) {
info!(target: "engine", "Immediately applying validator set change signalled at block {}", chain_head.number());
self.epoch_manager.lock().note_new_epoch();
let change = combine_proofs(chain_head.number(), &change, &[]);
return Some(change)
}
Expand Down
2 changes: 1 addition & 1 deletion ethcore/src/json_tests/skip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

use ethjson;

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

#[cfg(feature="ci-skip-issue")]
Expand Down
4 changes: 2 additions & 2 deletions scripts/gitlab/test-all.sh → scripts/gitlab/rust-changes.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/bash
echo "________Running rust_changes.sh________"
set -e # fail on any error
set -u # treat unset variables as error

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

case ${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}} in
Expand All @@ -26,5 +28,3 @@ then
fi

rustup show

exec ./test.sh
17 changes: 17 additions & 0 deletions scripts/gitlab/test-cpp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
echo "________Running test-cpp.sh________"
set -e # fail on any error
set -u # treat unset variables as error
#use nproc `linux only
THREADS=$(nproc)

echo "________Running the C++ example________"
DIR=parity-clib/examples/cpp/build
mkdir -p $DIR
cd $DIR
cmake ..
make -j $THREADS
# Note: we don't try to run the example because it tries to sync Kovan, and we don't want
# that to happen on CI
cd -
rm -rf $DIR
12 changes: 12 additions & 0 deletions scripts/gitlab/test-linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
echo "________Running test-linux.sh________"
set -e # fail on any error
set -u # treat unset variables as error

FEATURES="json-tests"
OPTIONS="--release"
#use nproc `linux only
THREADS=$(nproc)

echo "________Running Parity Full Test Suite________"
time cargo test $OPTIONS --features "$FEATURES" --locked --all --target $CARGO_TARGET -- --test-threads $THREADS
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/usr/bin/env sh
#!/bin/bash
set -e # fail on any error
set -u # treat unset variables as error
echo "________Running validate_chainspecs.sh________"

ERR=0
cargo build --release -p chainspec

echo "________Validate chainspecs________"
time cargo build --release -p chainspec

for spec in ethcore/res/*.json; do
if ! ./target/release/chainspec "$spec"; then ERR=1; fi
Expand Down
79 changes: 0 additions & 79 deletions test.sh

This file was deleted.

2 changes: 1 addition & 1 deletion util/version/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[package]
name = "parity-version"
# NOTE: this value is used for Parity Ethereum version string (via env CARGO_PKG_VERSION)
version = "2.3.5"
version = "2.3.6"
authors = ["Parity Technologies <admin@parity.io>"]
build = "build.rs"

Expand Down