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

Tests parallelized #10452

Merged
merged 38 commits into from
Mar 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
44b1edc
tests splitted, phase 1
TriplEight Mar 6, 2019
403ee7b
typo
TriplEight Mar 6, 2019
fe585ac
fix wrong launch commands
TriplEight Mar 6, 2019
b2b1bc2
typos
TriplEight Mar 6, 2019
e76f4da
rearrangements
TriplEight Mar 6, 2019
c66f5ae
use `nproc` function for threads
General-Beck Mar 6, 2019
5d523cf
use nproc for threads
General-Beck Mar 6, 2019
69a62a6
let theads be auto, build-andriod no more in regular run
TriplEight Mar 6, 2019
b98430b
nproc threading
TriplEight Mar 6, 2019
12ff729
split val chain and cargo check
TriplEight Mar 6, 2019
02a6286
renamed some files
TriplEight Mar 7, 2019
13391e2
wrong phase
TriplEight Mar 7, 2019
dfd422b
check rust files before test jobs
TriplEight Mar 7, 2019
9fd520f
lint error
TriplEight Mar 7, 2019
2dfc800
rust files modivied var
TriplEight Mar 7, 2019
544a263
test except changes
General-Beck Mar 7, 2019
39300db
add rust_changes except
General-Beck Mar 7, 2019
0dba3cd
lint error
General-Beck Mar 7, 2019
521be22
fixes
TriplEight Mar 7, 2019
30c4f66
.gitlab-ci.yml can't be excluded
TriplEight Mar 7, 2019
69d54b9
pipeline shouldn't start
TriplEight Mar 7, 2019
ed1345e
pipeline must go
TriplEight Mar 7, 2019
1b4fc33
pipeline must go 2
TriplEight Mar 7, 2019
03d8fd4
pipeline must go 3
TriplEight Mar 7, 2019
1694c98
pipeline must go 4
TriplEight Mar 7, 2019
43db1fe
pipeline must go 5
TriplEight Mar 7, 2019
0df85b0
pipeline must go 6
TriplEight Mar 7, 2019
190ed90
pipeline must go 7
TriplEight Mar 7, 2019
24dbdb5
pipeline must not go 1
TriplEight Mar 7, 2019
e4f38ca
pipeline must go 8
TriplEight Mar 7, 2019
50a27b8
avoid skippng tests yet, reintroducing them after the caching
TriplEight Mar 7, 2019
9b4a3d1
Merge branch 'master' into tests_splitting
TriplEight Mar 7, 2019
d169e7b
test theory
TriplEight Mar 7, 2019
b1a7937
Merge branch 'tests_splitting' of github.com:paritytech/parity-ethere…
TriplEight Mar 7, 2019
afbe8b4
parallelized cargo check with combusting helicopters
TriplEight Mar 7, 2019
06e8b1e
less uploads
TriplEight Mar 7, 2019
539047a
alias for cargo checks
TriplEight Mar 7, 2019
2c78082
nice template
TriplEight Mar 11, 2019
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
69 changes: 49 additions & 20 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,43 +24,74 @@ variables:
- tags
- schedules


.collect_artifacts: &collect_artifacts
.collect_artifacts: &collect_artifacts
artifacts:
name: "${CI_JOB_NAME}_${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}"
when: on_success
expire_in: 1 mos
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:
TriplEight marked this conversation as resolved.
Show resolved Hide resolved
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 @@ -88,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 Down Expand Up @@ -203,14 +234,12 @@ publish-docs:
- linux-docker

build-android:
stage: optional
stage: build
image: parity/rust-android:gitlab-ci
variables:
CARGO_TARGET: armv7-linux-androideabi
dependencies: []
script:
- scripts/gitlab/build-unix.sh
- scripts/gitlab/build-linux.sh
tags:
- linux-docker
allow_failure: true
<<: *collect_artifacts
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

TriplEight marked this conversation as resolved.
Show resolved Hide resolved
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)
TriplEight marked this conversation as resolved.
Show resolved Hide resolved

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,ci-skip-tests"
OPTIONS="--release"
#use nproc `linux only
THREADS=$(nproc)
TriplEight marked this conversation as resolved.
Show resolved Hide resolved

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.