Unverified Commit adcde460 authored by Denis_P's avatar Denis_P 🏑 Committed by GitHub
Browse files

CI: add miri test; chore (#240)



* CI: add miri test; new phase; remoe CARGO_HOME cache

* add miri and falgs to test

* Update .gitlab-ci.yml
Co-authored-by: thiolliere's avatarGuillaume Thiolliere <gui.thiolliere@gmail.com>
parent b5d2ea7f
Pipeline #120477 passed with stages
in 23 minutes and 43 seconds
......@@ -2,13 +2,13 @@
#
stages:
- check
- test
- build
variables:
GIT_STRATEGY: fetch
GIT_DEPTH: "100"
CARGO_HOME: "/ci-cache/${CI_PROJECT_NAME}/cargo/${CI_COMMIT_REF_NAME}/${CI_JOB_NAME}"
CARGO_TARGET_DIR: "/ci-cache/${CI_PROJECT_NAME}/targets/${CI_COMMIT_REF_NAME}/${CI_JOB_NAME}"
CARGO_INCREMENTAL: 0
CI_SERVER_NAME: "GitLab CI"
......@@ -19,7 +19,7 @@ workflow:
- if: $CI_COMMIT_BRANCH
.docker-env: &docker-env
image: paritytech/ci-linux:production
image: paritytech/ink-ci-linux:production
before_script:
- cargo -vV
- rustc -vV
......@@ -45,41 +45,43 @@ workflow:
tags:
- linux-docker
#### stage: test
#### stage: check
test-rust-stable:
stage: test
check-rust-stable-no_derive_no_std_full:
stage: check
<<: *docker-env
script:
- time cargo test --verbose --all --features bit-vec,generic-array,derive
- time cargo +stable check --verbose --no-default-features --features bit-vec,generic-array,full
- sccache -s
test-rust-stable-no_derive:
stage: test
check-rust-stable-no_derive_no_std:
stage: check
<<: *docker-env
script:
- time cargo test --verbose --features bit-vec,generic-array
- time cargo +stable check --verbose --no-default-features --features bit-vec,generic-array
- sccache -s
check-rust-stable-no_derive_no_std_full:
stage: test
check-rust-stable-no_derive_full:
stage: check
<<: *docker-env
script:
- time cargo check --verbose --no-default-features --features bit-vec,generic-array,full
- time cargo +stable check --verbose --features bit-vec,generic-array,full
- sccache -s
check-rust-stable-no_derive_no_std:
#### stage: test
test-rust-stable:
stage: test
<<: *docker-env
script:
- time cargo check --verbose --no-default-features --features bit-vec,generic-array
- time cargo +stable test --verbose --all --features bit-vec,generic-array,derive
- sccache -s
check-rust-stable-no_derive_full:
test-rust-stable-no_derive:
stage: test
<<: *docker-env
script:
- time cargo check --verbose --features bit-vec,generic-array,full
- time cargo +stable test --verbose --features bit-vec,generic-array
- sccache -s
bench-rust-nightly:
......@@ -89,6 +91,15 @@ bench-rust-nightly:
- time cargo +nightly bench --features bit-vec,generic-array,derive
- sccache -s
miri:
stage: test
<<: *docker-env
variables:
RUST_BACKTRACE: 1
MIRIFLAGS: "-Zmiri-disable-isolation"
script:
- time cargo +nightly miri test --features bit-vec,generic-array,arbitrary --release
#### stage: build
build-linux-ubuntu-amd64:
......
......@@ -6,7 +6,7 @@ set -u
# create such directory and
# copy recursively all the files from the newest dir which has $CI_JOB_NAME, if it exists
# caches are in /ci-cache/${CI_PROJECT_NAME}/${2}/${CI_COMMIT_REF_NAME}/${CI_JOB_NAME}
# cache lives in /ci-cache/${CI_PROJECT_NAME}/${2}/${CI_COMMIT_REF_NAME}/${CI_JOB_NAME}
function prepopulate {
if [[ ! -d $1 ]]; then
......@@ -24,8 +24,4 @@ function prepopulate {
fi
}
# CARGO_HOME cache was moved to the same "project/cache_type/branch_name/job_name" level as
# CARGO_TARGET_DIR because of frequent weird data-race issues. This just means that the same cache that
# would have been used for the entire pipeline will be duplicated for the each job.
prepopulate "$CARGO_HOME" cargo
prepopulate "$CARGO_TARGET_DIR" targets
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment