Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add miri to CI pipeline #401

Closed
wants to merge 10 commits into from
67 changes: 39 additions & 28 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
stages:
- check
- workspace
- workspace-extra
- examples
- publish

Expand Down Expand Up @@ -103,11 +104,48 @@ test:
script:
- cargo test --verbose --all-features --no-fail-fast --workspace

codecov:
clippy-std:
stage: workspace
<<: *docker-env
needs:
- check-std
script:
- for crate in ${ALL_CRATES}; do
cargo clippy --verbose --all-features --manifest-path ${crate}/Cargo.toml -- -D warnings;
done

clippy-wasm:
stage: workspace
<<: *docker-env
needs:
- check-wasm
script:
- for crate in ${ALL_CRATES}; do
cargo clippy --verbose --no-default-features --manifest-path ${crate}/Cargo.toml --target wasm32-unknown-unknown -- -D warnings;
done

fmt:
stage: workspace
<<: *docker-env
script:
- cargo fmt --verbose --all -- --check

miri:
stage: workspace-extra
<<: *docker-env
needs:
- test
script:
- cargo miri --version;
pushd core;
cargo miri test --verbose -- -- storage2;
popd

codecov:
stage: workspace-extra
<<: *docker-env
needs:
- test
variables:
# Variables partly came from https://github.com/mozilla/grcov/blob/master/README.md
CARGO_INCREMENTAL: 0
Expand Down Expand Up @@ -136,33 +174,6 @@ codecov:
- rust-covfix -o lcov-lines.info lcov-lines.info
- bash <(curl -s https://codecov.io/bash) -f lcov-lines.info

clippy-std:
stage: workspace
<<: *docker-env
needs:
- check-std
script:
- for crate in ${ALL_CRATES}; do
cargo clippy --verbose --all-features --manifest-path ${crate}/Cargo.toml -- -D warnings;
done

clippy-wasm:
stage: workspace
<<: *docker-env
needs:
- check-wasm
script:
- for crate in ${ALL_CRATES}; do
cargo clippy --verbose --no-default-features --manifest-path ${crate}/Cargo.toml --target wasm32-unknown-unknown -- -D warnings;
done

fmt:
stage: workspace
<<: *docker-env
script:
- cargo fmt --verbose --all -- --check


#### stage: examples

.update-cargo-contract: &update-cargo-contract
Expand Down