"cargo test" jobs optimization (#6606)

* change (ci): 3 jobs in 1 decreases concurrency and is more effectiv; w/o release it's ~20% faster, but needs testing on prod; wasmtest tests are already running within cargo test --workspace

* fix (test): these ones were failing on nightly

* save: cargo profiles [skip ci]

* change (ci): one test to run them all

* change (ci): rebase

* Revert "change (ci): rebase"

This reverts commit 8a6b7ea043a460bf71526ccaa4c7a68899a3b2bc.

* fix (config): fix manifest

* change (ci): bench release
This commit is contained in:
Denis Pisarev
2020-07-21 16:55:54 +02:00
committed by GitHub
parent b93713d49f
commit 3b6597e0ed
3 changed files with 7 additions and 57 deletions
+5 -56
View File
@@ -221,13 +221,15 @@ test-linux-stable: &test-linux
<<: *default-vars
# Enable debug assertions since we are running optimized builds for testing
# but still want to have debug assertions.
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
RUST_BACKTRACE: 1
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
RUST_BACKTRACE: 1
WASM_BUILD_NO_COLOR: 1
except:
variables:
- $DEPLOY_TAG
script:
- WASM_BUILD_NO_COLOR=1 time cargo test --all --release --verbose --locked
# this job runs all tests in former runtime-benchmarks, frame-staking and wasmtime tests
- time cargo test --workspace --locked --release --verbose --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml
- sccache -s
unleash-check:
@@ -240,24 +242,6 @@ unleash-check:
- cargo install cargo-unleash ${CARGO_UNLEASH_INSTALL_PARAMS}
- cargo unleash check ${CARGO_UNLEASH_PKG_DEF}
test-frame-staking:
# into one job
stage: test
<<: *docker-env
variables:
<<: *default-vars
# Enable debug assertions since we are running optimized builds for testing
# but still want to have debug assertions.
RUSTFLAGS: -Cdebug-assertions=y
RUST_BACKTRACE: 1
except:
variables:
- $DEPLOY_TAG
script:
- cd frame/staking/
- WASM_BUILD_NO_COLOR=1 time cargo test --release --verbose --no-default-features --features "std"
- sccache -s
test-frame-examples-compile-to-wasm:
# into one job
stage: test
@@ -278,41 +262,6 @@ test-frame-examples-compile-to-wasm:
- cargo +nightly build --target=wasm32-unknown-unknown --no-default-features
- sccache -s
test-wasmtime:
stage: test
<<: *docker-env
variables:
<<: *default-vars
# Enable debug assertions since we are running optimized builds for testing
# but still want to have debug assertions.
RUSTFLAGS: -Cdebug-assertions=y
RUST_BACKTRACE: 1
except:
variables:
- $DEPLOY_TAG
script:
- cd client/executor
- WASM_BUILD_NO_COLOR=1 time cargo test --release --verbose --features wasmtime
- sccache -s
test-runtime-benchmarks:
# into one job
stage: test
<<: *docker-env
variables:
<<: *default-vars
# Enable debug assertions since we are running optimized builds for testing
# but still want to have debug assertions.
RUSTFLAGS: -Cdebug-assertions=y
RUST_BACKTRACE: 1
except:
variables:
- $DEPLOY_TAG
script:
- cd bin/node/cli
- WASM_BUILD_NO_COLOR=1 time cargo test --workspace --release --verbose --features runtime-benchmarks
- sccache -s
test-linux-stable-int:
<<: *test-linux
except:
@@ -15,7 +15,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//#[rustversion::attr(not(stable), ignore)]
#[rustversion::attr(not(stable), ignore)]
#[test]
fn decl_module_ui() {
// As trybuild is using `cargo check`, we don't need the real WASM binaries.
@@ -15,6 +15,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#[rustversion::attr(not(stable), ignore)]
#[test]
fn decl_storage_ui() {
// As trybuild is using `cargo check`, we don't need the real WASM binaries.